update Tree

update Tree
This commit is contained in:
梁灏 2017-02-07 15:29:53 +08:00
parent b566d106c5
commit ce03ac5278
4 changed files with 23 additions and 35 deletions

View file

@ -3,21 +3,22 @@
:data.sync="treeData"
:show-checkbox="true"
:multiple="true"
:on-select="selectFn"
:on-check="checkFn"></Tree>
@on-select-change="selectFn"
@on-check-change="checkFn"></Tree>
</template>
<script>
export default {
data: function() {
return {
treeData: [{
expand: true,
title: 'parent 1',
selected: false,
node: [{
children: [{
title: 'parent 1-0',
expand: true,
disabled: true,
node: [{
children: [{
title: 'leaf',
disableCheckbox: true
}, {
@ -26,7 +27,7 @@
}, {
title: 'parent 1-1',
checked: true,
node: [{
children: [{
title: '<span style="color: red">sss</span>',
}]
}]
@ -35,10 +36,10 @@
},
methods: {
selectFn(data){
// console.log(data);
console.log(data);
},
checkFn(data){
// console.log(data);
console.log(data);
}
}
}