【发布时间】:2021-01-07 11:00:43
【问题描述】:
这是我的代码: 我不知道到底是什么问题,也许有人知道如何解决它!
const vuexLocal = new window.VuexPersistence.VuexPersistence({
storage: window.localStorage,
});
const visits = {
state: {
visit: []
},
mutations: {
addVisit(state, data) {
state.visit.push({
"id": data["id"],
"full_name": data["full_name"],
"entranceweight": data["entranceweight"],
"dispatched": data["dispatched"],
"vehicletype": data["vehicletype"],
});
},
},
};
const visitStore = new Vuex.Store({
modules: {
visit: visits,
},
plugins: [ vuexLocal.plugin, ]
});
它说 Uncaught TypeError: s is not a function | vuex-persist.js 1:657
【问题讨论】:
-
你能在 CodePen 中重现这个问题吗?
标签: javascript html vue.js vuex