mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
31 lines
544 B
JavaScript
31 lines
544 B
JavaScript
import { createStore } from 'vuex'
|
|
|
|
export default createStore({
|
|
state: {
|
|
openpages: localStorage.getItem('openpages') ? JSON.parse(localStorage.getItem('openpages')) : [{
|
|
pagename: "学习路径",
|
|
href: "/learningpath",
|
|
active: true,
|
|
},],
|
|
|
|
routerId: null,
|
|
},
|
|
getters: {
|
|
|
|
},
|
|
mutations: {
|
|
chengeOpenpages(state, list) {
|
|
// console.log('list', list)
|
|
state.openpages = list
|
|
},
|
|
chengeRouterId(state, routerId) {
|
|
// console.log('list', list)
|
|
state.routerId = routerId
|
|
},
|
|
},
|
|
actions: {
|
|
},
|
|
modules: {
|
|
}
|
|
})
|