wl-micro-frontends icon indicating copy to clipboard operation
wl-micro-frontends copied to clipboard

主应用将element-ui传给子应用,子应用报错

Open daichunlin1995 opened this issue 5 years ago • 3 comments

warn $listeners and $attrs is readonly

error

daichunlin1995 avatar Apr 08 '20 09:04 daichunlin1995

会这样,百度说要么是两个应用vue版本不同,另一种是啥我忘了,我还是推荐开发时公用一个library,线上整出来用npm,下发资源耦合度太高

At 2020-04-08 17:06:52, "daichunlin" [email protected] wrote:

warn $listeners and $attrs is readonly

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

hql7 avatar Apr 08 '20 09:04 hql7

好 谢谢

daichunlin1995 avatar Apr 09 '20 00:04 daichunlin1995

library 预期效果: 目前我们项目element版本都是同一个版本 想要只用main项目里下载一次element,子应用就不用重复下载

目前的做法 所有项目的element都是通过 webpack 的 externals 去window上获取, 主应用负责引入,但是会出现 同样的问题“warn $listeners and $attrs is readonly”

library的方式跟这个是类似吧?

这个问题是由于vue.use 是单实例的原因?

mango-csl avatar Jun 28 '20 08:06 mango-csl