| | |
| | | const common = { |
| | | |
| | | state: { |
| | | language: getStore({name: 'language'}) || 'zh', |
| | | isCollapse: false, |
| | | language: getStore({ name: 'language' }) || 'zh', |
| | | isCollapse: true,//默认菜单是否打开 |
| | | isFullScren: false, |
| | | isMenu: true, |
| | | isShade: false, |
| | | screen: -1, |
| | | isLock: getStore({name: 'isLock'}) || false, |
| | | isLock: getStore({ name: 'isLock' }) || false, |
| | | showTag: true, |
| | | showDebug: true, |
| | | showCollapse: true, |
| | |
| | | showTheme: true, |
| | | showMenu: true, |
| | | showColor: true, |
| | | colorName: getStore({name: 'colorName'}) || '#409EFF', |
| | | themeName: getStore({name: 'themeName'}) || 'theme-default', |
| | | lockPasswd: getStore({name: 'lockPasswd'}) || '', |
| | | colorName: getStore({ name: 'colorName' }) || '#409EFF', |
| | | themeName: getStore({ name: 'themeName' }) || 'theme-bule', |
| | | lockPasswd: getStore({ name: 'lockPasswd' }) || '', |
| | | website: website, |
| | | }, |
| | | mutations: { |
| | |
| | | SET_SHADE: (state, active) => { |
| | | state.isShade = active; |
| | | }, |
| | | SET_COLLAPSE: (state) => { |
| | | state.isCollapse = !state.isCollapse; |
| | | SET_COLLAPSE: (state, val = 3) => { |
| | | // console.log(val) |
| | | if (val == 3) { |
| | | state.isCollapse = !state.isCollapse; |
| | | } else { |
| | | state.isCollapse = val; |
| | | } |
| | | }, |
| | | SET_FULLSCREN: (state) => { |
| | | state.isFullScren = !state.isFullScren; |