提交 0cc1c593 authored 作者: vipcxj's avatar vipcxj

fix: layout信息缓存出错

上级 771be436
...@@ -76,15 +76,19 @@ export const invalidateInfos = () => { ...@@ -76,15 +76,19 @@ export const invalidateInfos = () => {
}; };
export const getModuleLayout = async (name) => { export const getModuleLayout = async (name) => {
if (!data.flags.layout) { if (!data.flags.layout[name]) {
data.layout = await fetchModuleLayout(name); data.layout[name] = await fetchModuleLayout(name);
data.flags.layout = true; data.flags.layout[name] = true;
} }
return data.layout; return data.layout[name];
}; };
export const invalidateLayout = () => { export const invalidateLayout = (name) => {
data.flags.layout = false; delete data.flags.layout[name];
};
export const invalidateLayouts = () => {
data.flags.layout = {};
}; };
// export const setModules = (modules) => { // export const setModules = (modules) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论