接手一个老项目,项目中使用了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会有影响吗
10 回答11.1k 阅读
6 回答3k 阅读
5 回答4.8k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
3 回答5.1k 阅读✓ 已解决
3 回答1.8k 阅读✓ 已解决
router.onReady是为了让动态加载的路由加载完