- 博客(8)
- 收藏
- 关注
原创 vue3项目中开发阶段ctx代替this,生产阶段const { ctx } = getCurrentInstance()如何获取路由挂载问题
解决方案一:开发阶段 const { ctx } = getCurrentInstance() 生产阶段 const {proxy} = getCurrentInstance()ctx相当于Vue2的this,我们都知道vue3中不支持this。所以把ctx改成proxy.解决方案二:as anyconst {proxy} = getCurrentInstance() as any...
2022-03-16 09:37:16 3813
原创 解决vue3中用debugger报错
解决方案:package.json中找到"rules": {}改为一下"rules": { "no-debugger": "off", "no-console": "off"}
2021-12-29 14:36:14 1541 1
原创 vue3启动错误: ERROR Error: Cannot find module ‘vue-loader-v16/package.json‘
解决方案cmd命令执行:cnpm i vue-loader-v16
2021-12-29 14:27:58 430
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人