摘要:
原因:内部判断,导致路由产生了死循环 错误代码: router.beforeEach((to, from, next) => { if (store.getters.token) { if (to.path '/login') { next('/') } else { next() } } else 阅读全文
posted @ 2022-08-18 17:05
最爱小虾
阅读(416)
评论(0)
推荐(0)
摘要:
官方文档: https://cn.vitejs.dev/guide/features.html#glob-import 导入模块: import.meta.glob 为过动态导入,构建时,会分离为独立的 chunk const files = import.meta.glob('./modules/ 阅读全文
posted @ 2022-08-18 11:01
最爱小虾
阅读(1076)
评论(0)
推荐(0)
摘要:
文档: https://cn.vitejs.dev/guide/features.html#glob-import 场景:store/index.js中,如果有多个modules,这样一个一个导入确实麻烦。 import user from './modules/user.js' import us 阅读全文
posted @ 2022-08-18 10:36
最爱小虾
阅读(10800)
评论(0)
推荐(0)

浙公网安备 33010602011771号