vue中的context和store区别在哪里

根据文档,vuex中的context拥有store的所有属性和方法,那么他们的区别在哪里呢?

new vuex.store({
    state: {},
    getters: {},
    mutations:{},
    actions:{
        increase(context){
            // 拥有state、getters、commit、dispatch
            // replaceState、registerModule、unregisterModule
            context.commit()
        }
    },
    modules:{}
})
待解决 悬赏分:40 - 离问题结束还有 52天6小时31分27秒
反对 0举报 0 收藏 0

我来回答

回答2