-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.0.0-beta.13
Environment
win10-64 Google Chrome 版本 98.0.4758.82(正式版本)64 位 vue 3.2
Reproduction link
https://github.com/webvs2/ant-but
Steps to reproduce
当我准备用vue-cli新建一个项目的时候,单纯选择了vue3创建成功,在vue ui中用vue-cli-plugin-ant-design插件自动化引入ant,成功安装后报错-Trigger.js?88ee:16 Uncaught TypeError: Cannot read properties of undefined (reading 'use')
at eval (Trigger.js?88ee:16:1)
What is expected?
没有报错,正常使用ant功能
What is actually happening?
报错:Trigger.js?88ee:16 Uncaught TypeError: Cannot read properties of undefined (reading 'use')
at eval (Trigger.js?88ee:16:1)
当我尝试解决问题的,发现你不能用import Vue from 'vue';来使用vue的use,这console了undefined,只有在vue应用中,就是mian.js里面创建的vue对象才能使用,如下:
let VueApp=createApp(App).use(router)
VueApp.use(ref, { name: 'ant-ref' });
VueApp.mount('#app')
我查看了vue-router注册情况,也是如此,希望可以给到帮助