doum
5 天以前 fe29cab3d9bf8ddfeb1bc93a25a79c20276d8171
admin/src/store/index.js
@@ -7,6 +7,7 @@
  // 登录用户信息
  userInfo: null,
  tableHeightNew: 300,
  sysConfig: { title: '', subtitle: '' },
  primaryColor: '#2080f7',
  // 首页
  homePage: null,
@@ -39,6 +40,10 @@
    console.log('设置顶部菜单索引', index)
    state.currentIndex = index
  },
  setSysconfig (state, config) {
    state.sysConfig = { title: config.title || '', subtitle: config.subtitle || '' }
    document.title =  state.sysConfig.title+ state.sysConfig.subtitle
  },
  // 切换菜单状态
  switchCollapseMenu (state, value) {
    if (value != null) {
@@ -68,7 +73,7 @@
  },
  // 设置首页路由信息
  setTopMenuCurrent (state, current) {
    console.log("setTopMenuCurrent",current)
    console.log('setTopMenuCurrent', current)
    if(current.id !== state.topMenuCurrent.id){
      state.topMenuList.list.forEach(item => {
        console.log(item.id, item.id)