You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
当我准备用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注册情况,也是如此,希望可以给到帮助
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
es文件里面 Vue.use(ref, { name: 'ant-ref' });注册插件报错
In the es file, Vue.use(ref, { name: 'ant-ref' }); error when registering the plugin
Mar 5, 2022
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注册情况,也是如此,希望可以给到帮助
The text was updated successfully, but these errors were encountered: