提问人:Amr 提问时间:9/22/2023 最后编辑:Mohammad RoshaniAmr 更新时间:9/22/2023 访问量:39
如何使用 global-store
How to use global-store
问:
我正在使用vue3
options api
我正在学习如何使用我参考的官方网站,并在论坛上阅读了一些帖子。
如以下链接中的代码所示:global-store
vue
我创建为可组合的,但我收到此错误StoreMajorEnableState.vue
app.js:191 Uncaught TypeError: Cannot read properties of undefined (reading '__vccOpts')
at exports.default (exportHelper.js:6:1)
at eval (StoreMajorEnableState.vue:5:1)
at ./src/store/StoreMajorEnableState.vue (app.js:99:1)
at __webpack_require__ (app.js:188:33)
at fn (app.js:422:21)
at eval (index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/HelloWorld.vue?vue&type=script&lang=js:2:90)
at ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/HelloWorld.vue?vue&type=script&lang=js (app.js:29:1)
at __webpack_require__ (app.js:188:33)
at fn (app.js:422:21)
at eval (HelloWorld.vue?vue&type=script&lang=js:5:213)
我不知道如何解决它
请帮我解决这个错误,请告诉我如何正确使用globla-store
答: 暂无答案
评论
this.$watch(this.storeMajorEnableState_.getters.getMajorEnableState, () => ...)