vue-admin-template配置快捷导航的代码(标签导航栏)

vue-element-admin有关快捷导航说明

1、添加标签
@/layout/components/AppMain.vue添加:

2、复制admin项目中的文件
@/layout/components/TagsView
@/store/modules/tagsView.js
到template对应的目录下
3、修改文件
@store/getters.js

const getters = {
 sidebar: state => state.app.sidebar,
 device: state => state.app.device,
 token: state => state.user.token,
 avatar: state => state.user.avatar,
 name: state => state.user.name,
 visitedviews: state => state.tagsview.visitedviews //新增
}
export default getters

@store/index.js

import tagsView from './modules/tagsView' //新增

Vue.use(Vuex)

const store = new Vuex.Store({
 modules: {
  app,
  settings,
  user,
  tagsView  //新增
 },
 getters
})

export default store 

@\layout\index.vue




                    
                    

你可能感兴趣的:(vue-admin-template配置快捷导航的代码(标签导航栏))