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>
|
<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'
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
&-disabled{
|
&-disabled{
|
||||||
cursor: @cursor-disabled;
|
//cursor: @cursor-disabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue