update 新增了全局静态变量

This commit is contained in:
2021-04-25 17:02:45 +08:00
parent 4e3148eb2d
commit 41dab4a662
2 changed files with 4 additions and 3 deletions

View File

@@ -0,0 +1 @@
export const EMPTY_ID = '00000000-0000-0000-0000-000000000000'

View File

@@ -42,6 +42,8 @@ import Setting from './setting';
import { setGlobal } from '@/common/login';
import { APP_MENU_KEY } from '@/common/storage';
import { EMPTY_ID } from '@/util/global';
const getNewID = () => {
return Math.random().toString(16).slice(2);
};
@@ -260,9 +262,7 @@ export default {
return m;
};
const rootId = '00000000-0000-0000-0000-000000000000';
this.nav.menus = children[rootId] ? serialize(children[rootId]) : new Array();
this.nav.menus = children[EMPTY_ID] ? serialize(children[EMPTY_ID]) : new Array();
},
},
};