老师,我的this.commit 报这个错误:
Property ‘commit’ does not exist on type ‘{ login(context: any, userInfo: any): Promise; }’
我在控制台打印this的时候,是有commit这方法,我执行了this.commit(“user/token”, “token…”)就没有报错。
我还尝试用context.commit也不会报错,只是要去掉user/
context.commit(“token”, “token…”)
这两种有什么区别吗?
基于Vue3重写Vue-element-admin,打造后台前端综合解决方案
了解课程