2👍
✅
You’re using an object property value shorthand, so your code snippet
window.vueRoot = new Vue({
el: '#vue-root',
store,
someModuleNameSpaceHelper ,
computed: {
}
});
is equivalent to
window.vueRoot = new Vue({
el: '#vue-root',
store,
someModuleNameSpaceHelper: someModuleNameSpaceHelper,
computed: {
}
});
which is like doing
window.vueRoot = new Vue({
el: '#vue-root',
store,
someModuleNameSpaceHelper: {
computed: {...}, // vue won't see this
methods: {...} // vue won't see this
} ,
computed: {
}
});
How about changing it to
window.vueRoot = new Vue({
el: '#vue-root',
store,
computed: someModuleNameSpaceHelper.computed,
methods: someModuleNameSpaceHelper.methods
});
- [Vuejs]-Why I only get first object, when the object is in "for loop" and return its value in vuejs?
Source:stackexchange.com