Skip to content

Commit 62901ba

Browse files
committed
Revert "visiable 调整为计算属性,以使得可以跟随prop动态改变"
This reverts commit 852c5f8.
1 parent 852c5f8 commit 62901ba

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/components/app.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,12 @@
116116
},
117117
data () {
118118
return {
119+
visiable: this.currentDeep <= this.deep,
119120
treeContentBackground: 'transparent',
120121
checkboxVal: this.pathChecked.includes(this.path) // 复选框的值
121122
}
122123
},
123124
computed: {
124-
// 当前树是否可展开
125-
visiable () {
126-
return this.currentDeep <= this.deep
127-
},
128125
// 获取当前 data 中最后一项的 key 或 索引, 便于界面判断是否添加 ","
129126
lastIndex () {
130127
if (Array.isArray(this.parentData)) {

0 commit comments

Comments
 (0)