接手一个老项目,项目中使用了this.$router.onReady()
mounted() {
this.$router.onReady(() => {
this.initInfo()
})
},
我看了一下initInfo中就是取了一下query的参数来请求数据,拿不到登录信息就切回登录页,删除$router.onReady会有影响吗
接手一个老项目,项目中使用了this.$router.onReady()
mounted() {
this.$router.onReady(() => {
this.initInfo()
})
},
我看了一下initInfo中就是取了一下query的参数来请求数据,拿不到登录信息就切回登录页,删除$router.onReady会有影响吗
13 回答12.7k 阅读
2 回答4.9k 阅读✓ 已解决
7 回答1.8k 阅读
9 回答1.6k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
5 回答685 阅读
8 回答2.3k 阅读
router.onReady是为了让动态加载的路由加载完