From 90960e026ff102a8c71b9f0e194459b3e1af32e4 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 27 Sep 2018 21:44:44 +0800 Subject: [PATCH] fix: update load --- components/vc-tree/src/Tree.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/vc-tree/src/Tree.jsx b/components/vc-tree/src/Tree.jsx index e9b55f11d..b369f2dfb 100644 --- a/components/vc-tree/src/Tree.jsx +++ b/components/vc-tree/src/Tree.jsx @@ -445,7 +445,7 @@ const Tree = { // We need to get the latest state of loading/loaded keys this.setState(({ _loadedKeys: loadedKeys = [], _loadingKeys: loadingKeys = [] }) => { const { loadData } = this.$props - const { eventKey } = getOptionProps('treeNode') + const { eventKey } = getOptionProps(treeNode) if (!loadData || loadedKeys.indexOf(eventKey) !== -1 || loadingKeys.indexOf(eventKey) !== -1) { return {} @@ -471,7 +471,7 @@ const Tree = { }) return { - loadingKeys: arrAdd(loadingKeys, eventKey), + _loadingKeys: arrAdd(loadingKeys, eventKey), } }) }) @@ -561,7 +561,8 @@ const Tree = { _expandedKeys: expandedKeys = [], _selectedKeys: selectedKeys = [], _halfCheckedKeys: halfCheckedKeys = [], - _loadedKeys: loadedKeys = [], _loadingKeys: loadingKeys = [], + _loadedKeys: loadedKeys = [], + _loadingKeys: loadingKeys = [], _dragOverNodeKey: dragOverNodeKey, _dropPosition: dropPosition, } = this.$data