electron-vue 中 vuex 赋值失败的问题

文档中明确注明了:

In case if you enabled createSharedMutations() plugin you need to create an instance of store in the main process. To do it just add this line into your main process (for example src/main.js):
import ‘./path/to/your/store’

意思是:

如果你启用了这个插件,需要在主进程导出(export )store的实例。

于是在主进程中加上这一句:

import '../renderer/store'

再次运行,赋值成功!