请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

关于getCurrentInstance

getCurrentInstance 下没有route

    const {ctx} = getCurrentInstance()
    console.log(ctx.$router) //undefined

图片描述

正在回答 回答被采纳积分+3

2回答

fengyunzhu 2021-12-04 14:42:54

getCurrentInstance().appContext.config.globalProperties 可以获取到 route

生产模式下请不要使用 getCurrentInstance()

0 回复 有任何疑惑可以回复我~
扬_灵 2021-06-07 18:06:12

同学你好,可以把你的项目代码上传到github或是码云这些代码托管平台,把地址发我一下,我在本地帮你测试定位一下问题。

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号