nuxtServerInit no work

作者: 望穿秋水小作坊 | 来源:发表于2019-03-16 22:29 被阅读0次

     在 nuxt.js 2.4版本之后对 vuex 的配置方式进行了优化。store 更加简洁明了,但是有些时候因为某些原因可能导致nuxtServerInit 不被调用的问题。

     nuxtServerInit 这个钩子方法必须放在 index.js 中才会被调用。如果在采用 modules 了,在其他模块下写是无效的。

    可以参考文档说明:

    只有在 store/index.js 目录才生效哟

    tip: 有帮助的话,点个赞吧。😀

    相关文章

      网友评论

        本文标题:nuxtServerInit no work

        本文链接:https://www.haomeiwen.com/subject/nbmemqtx.html