问题描述:
在electron-vue中,使用vuex,调用this.$store.dispatch("changeLogin");
无法修改登录状态。
方法定义:
修改登录状态:
输出结果:
isLogin
初始是false,调用this.$store.dispatch("changeLogin");
后输出结果还是false。
看到控制台这边有这个提示,是否有关?
Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (<anonymous>:2:14)
Ran into this problem myself, I had to import the store inside of my electron index.js
The issue is with the createSharedMutations() from the vuex-electron package
src -> main -> index.js