**背景:**当开开心心的使用el-tree完成了需求,自认为还做得不错,提测过程中测试发现输入搜索的时候组织树搜索很慢
百思不得其解 百度发现网上有针对卡顿的解决方案:vue+easy+tree
项目中简单使用:
1:安装
业务中使用
打包成组件后,发布npm,通过
npm install @wchbrad/vue-easy-tree
或
yarn add @wchbrad/vue-easy-tree
2:使用
//引入
import VueEasyTree from '@wchbrad/vue-easy-tree'
// 样式文件,可以根据需要自定义样式或主题
// 注册 components: {
VueEasyTree
},
<vue-easy-tree
class="filter-tree"
:data="data"
node-key="deptId"
:default-expanded-keys="defaultExpandedKeys"
:default-checked-keys="defaultCheckedKeys"
:props="defaultProps"
:highlight-current="true"<

最低0.47元/天 解锁文章
7468

被折叠的 条评论
为什么被折叠?



