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

fix: layout信息缓存出错

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