老师,我在main.js里面挂载了$request,但是还是报错怎么办?
来源:2-8 环境配置

慕村8003135
2023-02-15
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘$request’)
at Login.vue:20:7
at runtime-core.esm-bundler.js:2757:40
at callWithErrorHandling (runtime-core.esm-bundler.js:173:22)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:182:21)
at hook.__weh.hook.__weh (runtime-core.esm-bundler.js:2731:29)
at flushPostFlushCbs (runtime-core.esm-bundler.js:359:46)
at flushJobs (runtime-core.esm-bundler.js:413:9)
好像没有挂载上去
写回答
1回答
-
应该是用的语法不对,你没有贴你是用的代码,我猜测你用的是ctx.$request,应该改成proxy.$request
012023-02-16
相似问题