vue beforeRouter中使用store
2019-05-05 本文已影响0人
五洋捉鳖zz
import store from '../../store/index'
...
router.beforeEach((to, from, next) => {
store.commit('UPDATE_CURRENT_PATH', to.fullPath)
})
...
import store from '../../store/index'
...
router.beforeEach((to, from, next) => {
store.commit('UPDATE_CURRENT_PATH', to.fullPath)
})
...