ElementUI / babel-plugin-component

Modular element-ui build plugin for babel.
452 stars 96 forks source link

If you are using bothon-demand and importing all, make sure to invoke the importing all first #62

Closed xcsweb closed 4 years ago

xcsweb commented 4 years ago

我按需重写了element-input ,element.js的顺序的引入顺序也是对的,不知道为啥报这个错

xcsweb commented 4 years ago

我把ElementUI里面我用不到的全部都排除了,重新注册的,再把新的input覆盖原来的element-input

xcsweb commented 4 years ago

https://pic4.zhimg.com/80/v2-7c2b496e2220334b95c75baa404da5c2_720w.png ,查出来了,element-ui@2.4.1 跟element-ui@2.13.1 element-ui.d.ts , https://pic3.zhimg.com/80/v2-4e30e528d18f93ae0af82992d9fb42e4_720w.png ,因为我有babel-plugin-component,导致 https://pic1.zhimg.com/80/v2-391550ac6b7ff919b17ba65bf42c9db6_720w.png https://pic2.zhimg.com/80/v2-30fe989eb1758677e7923e7aabe3a658_720w.png https://pic1.zhimg.com/80/v2-ece7017f05d93325d82a8b2f53159dd1_720w.png 我的使用和官网提示的区别不大

Liubasara commented 2 years ago

https://pic4.zhimg.com/80/v2-7c2b496e2220334b95c75baa404da5c2_720w.png ,查出来了,element-ui@2.4.1 跟element-ui@2.13.1 element-ui.d.ts , https://pic3.zhimg.com/80/v2-4e30e528d18f93ae0af82992d9fb42e4_720w.png ,因为我有babel-plugin-component,导致 https://pic1.zhimg.com/80/v2-391550ac6b7ff919b17ba65bf42c9db6_720w.png https://pic2.zhimg.com/80/v2-30fe989eb1758677e7923e7aabe3a658_720w.png https://pic1.zhimg.com/80/v2-ece7017f05d93325d82a8b2f53159dd1_720w.png 我的使用和官网提示的区别不大

我这边也遇到了相同的问题,请问大佬是如何解决的?

chenkitchen commented 2 years ago

全局注册的element,改成按需引用