fix Tree bug

This commit is contained in:
梁灏 2020-01-13 08:56:38 +08:00
parent 6a6525483c
commit 94767f6cde
3 changed files with 10 additions and 6 deletions

View file

@ -1,21 +1,24 @@
<template> <template>
<Tree :data="data2" check-directly show-checkbox></Tree> <Tree :data="data4" show-checkbox multiple></Tree>
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
data2: [ data4: [
{ {
title: 'parent 1', title: 'parent 1',
expand: true, expand: true,
selected: true,
children: [ children: [
{ {
title: 'parent 1-1', title: 'parent 1-1',
expand: true, expand: true,
disabled: true,
children: [ children: [
{ {
title: 'leaf 1-1-1' title: 'leaf 1-1-1',
disabled: true
}, },
{ {
title: 'leaf 1-1-2' title: 'leaf 1-1-2'
@ -27,7 +30,8 @@
expand: true, expand: true,
children: [ children: [
{ {
title: 'leaf 1-2-1' title: 'leaf 1-2-1',
checked: true
}, },
{ {
title: 'leaf 1-2-1' title: 'leaf 1-2-1'

View file

@ -175,7 +175,7 @@
methods: { methods: {
handleExpand () { handleExpand () {
const item = this.data; const item = this.data;
if (item.disabled) return; // if (item.disabled) return;
// Vue.js 2.6.9 transition appear iView appear appear false // Vue.js 2.6.9 transition appear iView appear appear false
this.appearByClickArrow = true; this.appearByClickArrow = true;

View file

@ -67,7 +67,7 @@
// } // }
//} //}
&-disabled{ &-disabled{
cursor: @cursor-disabled; //cursor: @cursor-disabled;
} }
} }