defineAsyncComponent加载网络组件问题 #8361
Replies: 2 comments 3 replies
-
Can you provide a minimum reproduction or git repository? |
Beta Was this translation helpful? Give feedback.
-
我有一个链接 https://imotor01.oss-cn-qingdao.aliyuncs.com/test/components/button1046.es.js 可以下载到一个打包好的vue的按钮组件,接下来调用这个方法 |
Beta Was this translation helpful? Give feedback.
-
在使用defineAsyncComponent加载网络组件的时候,已经加载到的组件报错 defineComponent方法没有,因为无法找到vue这个依赖,请问大哥们要怎么处理一下这个问题
const RemoteComponent = (src: string, props: any = {}) => defineAsyncComponent({ loader: () => import(src).then(module => ({ ...module.default, ...props })), props })
这个是我的加载组件的方法
Beta Was this translation helpful? Give feedback.
All reactions