暫時去除緩存
This commit is contained in:
@@ -131,17 +131,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getMenu() {
|
||||
let parentMenus = getStore({ name: 'parent_menus' });
|
||||
let childMenus = getStore({ name: 'child_menus' });
|
||||
if (parentMenus && childMenus && parentMenus.length > 0 && childMenus.length > 0) {
|
||||
this.parentMenus = parentMenus;
|
||||
this.childMenus = childMenus;
|
||||
} else {
|
||||
// let parentMenus = getStore({ name: 'parent_menus' });
|
||||
// let childMenus = getStore({ name: 'child_menus' });
|
||||
// if (parentMenus && childMenus && parentMenus.length > 0 && childMenus.length > 0) {
|
||||
// this.parentMenus = parentMenus;
|
||||
// this.childMenus = childMenus;
|
||||
// } else {
|
||||
store.dispatch('getMenu').then(res => {
|
||||
this.parentMenus = res.parents;
|
||||
this.childMenus = res.childs;
|
||||
});
|
||||
}
|
||||
// }
|
||||
},
|
||||
getChilds(parentId) {
|
||||
return this.childMenus.filter(v => v.parentid == parentId);
|
||||
|
Reference in New Issue
Block a user