namespaced 不要漏了最后的d!!!
不要拼写错误,否则在dispatch时,会出现 unknown action type 错误。
created () {
this.$store.dispatch('products/getAllProducts')
product
export default {
namespaced:true,
state,
getters,
actions,
mutations
}
namespaced 不要漏了最后的d!!!
不要拼写错误,否则在dispatch时,会出现 unknown action type 错误。
created () {
this.$store.dispatch('products/getAllProducts')
product
export default {
namespaced:true,
state,
getters,
actions,
mutations
}