l-tree-transfer
v0.1.4
Published
l-tree-fransfer 是一个基于 VUE , element-ui 和 vue-easy-tree 的树形穿梭框组件
Downloads
6
Maintainers
Readme
l-tree-transfer
使用方式
1.安装相关依赖
npm i l-tree-transfer
然后你可以像使用普通组件一样使用 l-tree-transfer
<template>
<div>
// 你的代码
...
// 使用树形穿梭框组件
<tree-transfer :title="title" :from_data='fromData' :to_data='toData' >
</tree-transfer>
</div>
</template>
<script>
import treeTransfer from 'el-tree-transfer' // 引入
export defult {
components:{ treeTransfer } ,// 注册
data(){
return:{
fromData:[
{
id: "1",
pid: 0,
label: "一级 1",
children: [
{
id: "1-1",
pid: "1",
label: "二级 1-1",
disabled: true,
children: []
},
{
id: "1-2",
pid: "1",
label: "二级 1-2",
children: [
{
id: "1-2-1",
pid: "1-2",
children: [],
label: "二级 1-2-1"
},
{
id: "1-2-2",
pid: "1-2",
children: [],
label: "二级 1-2-2"
}
]
}
]
},
],
toData:[]
}
},
}
</script>