fix Tree bug
This commit is contained in:
parent
6a6525483c
commit
94767f6cde
3 changed files with 10 additions and 6 deletions
|
@ -1,21 +1,24 @@
|
|||
<template>
|
||||
<Tree :data="data2" check-directly show-checkbox></Tree>
|
||||
<Tree :data="data4" show-checkbox multiple></Tree>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
data2: [
|
||||
data4: [
|
||||
{
|
||||
title: 'parent 1',
|
||||
expand: true,
|
||||
selected: true,
|
||||
children: [
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
expand: true,
|
||||
disabled: true,
|
||||
children: [
|
||||
{
|
||||
title: 'leaf 1-1-1'
|
||||
title: 'leaf 1-1-1',
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
title: 'leaf 1-1-2'
|
||||
|
@ -27,7 +30,8 @@
|
|||
expand: true,
|
||||
children: [
|
||||
{
|
||||
title: 'leaf 1-2-1'
|
||||
title: 'leaf 1-2-1',
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
title: 'leaf 1-2-1'
|
||||
|
|
|
@ -175,7 +175,7 @@
|
|||
methods: {
|
||||
handleExpand () {
|
||||
const item = this.data;
|
||||
if (item.disabled) return;
|
||||
// if (item.disabled) return;
|
||||
|
||||
// Vue.js 2.6.9 对 transition 的 appear 进行了调整,导致 iView 初始化时无动画,加此方法来判断通过点击箭头展开时,加 appear,否则初始渲染时 appear 为 false
|
||||
this.appearByClickArrow = true;
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
// }
|
||||
//}
|
||||
&-disabled{
|
||||
cursor: @cursor-disabled;
|
||||
//cursor: @cursor-disabled;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue