1. 因为是自定义导航栏,所以信息是储存在vuex中。 避坑1:在page.json 的 llist 里 不需要加 '/', 在 vuex 的list 里需要加 '/' 2.
function copySelf(obj) { var newobj = obj.constructor === Array ? [] : {}; if (typeof obj !== "object") { return; } for (var i in
在 js 里引入 import { mapState } from 'vuex'; 然后添加一个计算属性 computed: { ...mapState(['state里的变量名']) },
在 mutations 里 写个方法 参数就是 state mutations: { aaa(state){ state.hasLogin = false; } }, 如何调用? this.$store.commit('aaa');
参考 https://www.cnblogs.com/angenstern/p/11798647.html