From 96bd19e9bf6001776cb756c99501dc1e13236847 Mon Sep 17 00:00:00 2001 From: "mo.duan" Date: Thu, 29 Aug 2019 11:42:30 +0800 Subject: [PATCH] #6139 bug fixed #6139 bug fixed --- examples/routers/tree.vue | 100 ++++++++++++++++++++++++----------- src/components/tree/node.vue | 8 ++- 2 files changed, 75 insertions(+), 33 deletions(-) diff --git a/examples/routers/tree.vue b/examples/routers/tree.vue index 9e748358..ead7331c 100644 --- a/examples/routers/tree.vue +++ b/examples/routers/tree.vue @@ -1,43 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/tree/node.vue b/src/components/tree/node.vue index 0cb6aa21..cafda5fc 100644 --- a/src/components/tree/node.vue +++ b/src/components/tree/node.vue @@ -71,7 +71,9 @@ data () { return { prefixCls: prefixCls, - appearByClickArrow: false + appearByClickArrow: false, + // #6139 + loadingChildrenState : true }; }, computed: { @@ -105,7 +107,7 @@ ]; }, showArrow () { - return (this.data[this.childrenKey] && this.data[this.childrenKey].length) || ('loading' in this.data && !this.data.loading); + return (this.data[this.childrenKey] && this.data[this.childrenKey].length) || ('loading' in this.data && !this.data.loading && this.loadingChildrenState); }, showLoading () { return 'loading' in this.data && this.data.loading; @@ -188,6 +190,8 @@ if (children.length) { this.$set(this.data, this.childrenKey, children); this.$nextTick(() => this.handleExpand()); + }else{ + this.loadingChildrenState = false; } }); return;