添加面包屑以及其它

This commit is contained in:
952108534@qq.com
2022-01-10 22:01:29 +08:00
parent 069d6d2531
commit be96454365
9 changed files with 528 additions and 36 deletions

View File

@@ -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))