小编San*_*ặng的帖子

如何同时将mapGetters与模块和root的getter一起使用?

我知道如何在单个情况下使用mapGetters,但不能同时使用。

例如,我有firstRootGetterinside store/index.js,所以我将调用...mapGetters(['firstRootGetter'])vue组件。

如果我有firstModuleGetter和secondModuleGetter里面store/modules/post.js,我会打电话...mapGetters('post', ['firstModuleGetter', 'secondModuleGetter'])

我的问题是,我怎么称呼它们为single ...mapGetters。可能吗?

现在,我必须写两行来分别调用它们。

vue.js vuex

4
推荐指数
2
解决办法
8125
查看次数

npm install始终坚持那个提取:time-grunt

我正在学习Keystone并尝试在真正的数字海洋液滴上练习它.一切顺利,直到我坚持下去npm install.

npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated cross-spawn-async@2.2.4: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm …
Run Code Online (Sandbox Code Playgroud)

node.js ubuntu-16.04 keystonejs

0
推荐指数
1
解决办法
2304
查看次数

标签 统计

keystonejs ×1

node.js ×1

ubuntu-16.04 ×1

vue.js ×1

vuex ×1