关于getCurrentInstance
来源:10-6 vue3+vue-router使用方法

LoveFen
2021-05-24
getCurrentInstance 下没有route
const {ctx} = getCurrentInstance()
console.log(ctx.$router) //undefined
写回答
2回答
-
fengyunzhu
2021-12-04
getCurrentInstance().appContext.config.globalProperties 可以获取到 route
生产模式下请不要使用 getCurrentInstance()
00 -
扬_灵
2021-06-07
同学你好,可以把你的项目代码上传到github或是码云这些代码托管平台,把地址发我一下,我在本地帮你测试定位一下问题。
00
相似问题