警告信息:
[Vue warn]: inject() can only be used inside setup() or functional components. at <RouterView> at <ElMain class="page-content" > at <ElContainer class="page" > at <ElContainer class="main-content" > at <MainComp onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< Proxy(Object) {__v_skip: true} > > at <RouterView> at <App>
[Vue warn]: inject() can only be used inside setup() or functional components. at <UserManage onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< Proxy(Object) {__v_skip: true} > > at <RouterView> at <ElMain class="page-content" > at <ElContainer class="page" > at <ElContainer class="main-content" > at <MainComp onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< Proxy(Object) {__v_skip: true} > > at <RouterView> at <App>
但是项目里都没有用provide() /inject()
函数
依赖版本信息
dependencies: '@element-plus/icons-vue': specifier: ^2.0.6 version: 2.1.0(vue@3.2.37) axios: specifier: ^0.27.2 version: 0.27.2 core-js: specifier: ^3.8.3 version: 3.29.0 dayjs: specifier: ^1.11.3 version: 1.11.7 echarts: specifier: ^5.3.3 version: 5.4.1 element-plus: specifier: ^2.2.6 version: 2.2.33(vue@3.2.37) normalize.css: specifier: ^8.0.1 version: 8.0.1 pinia: specifier: ^2.0.14 version: 2.0.32(typescript@4.5.5)(vue@3.2.37) sass: specifier: ^1.71.1 version: 1.71.1 sass-loader: specifier: ^14.1.1 version: 14.1.1(sass@1.71.1)(webpack@5.75.0) vue: specifier: 3.2.37 version: 3.2.37 vue-router: specifier: ^4.0.16 version: 4.1.6(vue@3.2.37)