his-tree
v0.0.9
Published
his tree vue component
Downloads
10
Readme
妈咪渠道树形组件
安装
// yarn
$ yarn add his-tree
// npm
$ npm i his-tree
使用
<template>
<HisTree
:data="data" // 树形数据
:handle-check="handleCheck" // 选中回调
:append="handleAppend" // 新增回调
:remove="handleRemove" // 删除回调
/>
</template>
<script>
import HisTree from 'his-tree';
export default {
name: 'Test',
data() {
return {
value: [],
data: data
}
},
components: { HisTree },
methods: {
handleCheck({node, data, ref}) { // ref 为当前el-tree ref,可以调用tree相关方法属性
console.log(node, data, ref);
},
handleAppend({node, data, ref}) {
console.log(node, data, ref);
},
handleRemove({node, data, ref}) {
console.log(node, data, ref);
},
}
}
</script>
<style scoped lang="less">
@import './index.less';
</style>