直接在组件内使用时,引入的不是一个正常的ElTreeSelect组件
Closed this issue · 3 comments
jxgahxs commented
ayiaq1 commented
没看懂呢,什么问题?源码全局引入之后使用 el-tree-select 报空?
参考一下 main.js
import ElTreeSelect from './components/src/ElTreeSelect';
...
Vue.component(ElTreeSelect.name, ElTreeSelect);
使用:
treeSelect.vue
jxgahxs commented
我在组件内部引入,没有在main.js中。看到index.js有export出Components(组件列表)。此时我想应该可以按需引入。
ayiaq1 commented
如果内部用的话可以只对components的源码放到项目里面。目前打包没有做处理。
或者你工程内安装 babel-plugin-component, 然后参考element-ui官网修改配置。