1.在src/store/index.js中
const store = new Vuex.Store({
modules: {
app,
security,
user,
permission,
tagsView
},
getters,
state: {
isHome: '测试案例'
},
});
2.在需要的页面写{{this.$store.state.isHome}}
3.页面显示测试案例