vue2.0 组织机构树形选择组件(类似elementui el-transfer 与 el-tree 两个标签的结合)...
1. 效果圖
?
2. 實現:? ?三級(部門或人員的樹形選擇)
3. 模擬數據說明:? fake.js
name:? 顯示的名稱(同時也是源碼中 for 循環單一的key ,? 如果真實數據存在名字有重復的情況, 建議加入ID字段作為主鍵)
type:? department 為部門? ?human 為個人
children: 數據類型必須為 數組,? ?type 為 human 個人時, 值為空數組 [],? 為department 部門時? ?值為對象 或者為空數組
以上4個鍵為必須, 最多三級嵌套
4. 源碼?https://github.com/IceGogh/vue-components
?
5. 直接引入時, 將父組件的真實數據 通過props方式 傳入??organization組件
5.1.文件位置:
components/OrganizationTree
?
5.2. 引入
import Organ from "@/components/OrganizationTree"
?
5.3.調用
<organization-tree dataList:"dataArray"></organization-tree>
?
轉載于:https://www.cnblogs.com/qq4535292/p/8448091.html
總結
以上是生活随笔為你收集整理的vue2.0 组织机构树形选择组件(类似elementui el-transfer 与 el-tree 两个标签的结合)...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 70周年纪念钞面值多少
- 下一篇: 商城出金收入什么意思 建行