mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-16 23:53:48 +08:00
添加面包屑以及其它
This commit is contained in:
@@ -1,4 +1,17 @@
|
||||
const state = () => ({position: {}})
|
||||
const state = () => ({
|
||||
// 这里是全局数据保存的地方
|
||||
tabsList: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'index',
|
||||
meta:{
|
||||
title: '首页',
|
||||
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
})
|
||||
|
||||
const mutations = {
|
||||
// changeLogin(state, val) {
|
||||
@@ -19,6 +32,14 @@ const mutations = {
|
||||
localStorage.setItem('message', val.data);
|
||||
console.log(state,val);
|
||||
},
|
||||
selectMenu(state, val) {
|
||||
let result = state.tabsList.findIndex(item => item.name === val.data.name)
|
||||
result === -1 ? state.tabsList.push(val.data) : ''
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
// changeMenu(state, user){
|
||||
// // console.log("vuex存储的变化",JSON.parse(user))
|
||||
|
||||
Reference in New Issue
Block a user