我在vuex 的action中使用this.$router.push() 报错了 因为这里面的this是store 所以想要在vuex中使用
router.push() 那么单独引用一下 全局的router模块
import router from ‘@/router’
图不是我的
解决 TypeError: Cannot read properties of undefined (reading ‘push‘) 错误提示
最新推荐文章于 2024-05-28 11:56:29 发布
我在vuex 的action中使用this.$router.push() 报错了 因为这里面的this是store 所以想要在vuex中使用
router.push() 那么单独引用一下 全局的router模块
import router from ‘@/router’
图不是我的