vue-命名空間

解答爲什麼this.$store.dispatch(‘user/login’, this.loginForm)中的’user/login’ 默認情況下,模塊內部的 action、mutation 和 getter 是註冊在全局命名空間的——這樣使得多個模塊能夠對同一 mutation 或 action 作出響應。 如果希望你的模塊具有更高的封裝度和複用性,你可以通過添加 namespaced: t
相關文章
相關標籤/搜索