fix: update load

pull/225/head
tangjinzhou 6 years ago
parent 3dc6b0745c
commit 90960e026f

@ -445,7 +445,7 @@ const Tree = {
// We need to get the latest state of loading/loaded keys // We need to get the latest state of loading/loaded keys
this.setState(({ _loadedKeys: loadedKeys = [], _loadingKeys: loadingKeys = [] }) => { this.setState(({ _loadedKeys: loadedKeys = [], _loadingKeys: loadingKeys = [] }) => {
const { loadData } = this.$props const { loadData } = this.$props
const { eventKey } = getOptionProps('treeNode') const { eventKey } = getOptionProps(treeNode)
if (!loadData || loadedKeys.indexOf(eventKey) !== -1 || loadingKeys.indexOf(eventKey) !== -1) { if (!loadData || loadedKeys.indexOf(eventKey) !== -1 || loadingKeys.indexOf(eventKey) !== -1) {
return {} return {}
@ -471,7 +471,7 @@ const Tree = {
}) })
return { return {
loadingKeys: arrAdd(loadingKeys, eventKey), _loadingKeys: arrAdd(loadingKeys, eventKey),
} }
}) })
}) })
@ -561,7 +561,8 @@ const Tree = {
_expandedKeys: expandedKeys = [], _expandedKeys: expandedKeys = [],
_selectedKeys: selectedKeys = [], _selectedKeys: selectedKeys = [],
_halfCheckedKeys: halfCheckedKeys = [], _halfCheckedKeys: halfCheckedKeys = [],
_loadedKeys: loadedKeys = [], _loadingKeys: loadingKeys = [], _loadedKeys: loadedKeys = [],
_loadingKeys: loadingKeys = [],
_dragOverNodeKey: dragOverNodeKey, _dragOverNodeKey: dragOverNodeKey,
_dropPosition: dropPosition, _dropPosition: dropPosition,
} = this.$data } = this.$data

Loading…
Cancel
Save