Commit 465ec7c6 authored by Harlan's avatar Harlan Committed by hetech

Transfer: fix component crash when target order is push (#13333)

* Transfer: fix bug sometimes component crash when target order is push(#13320)

* update code
parent c1b869d7
...@@ -142,9 +142,17 @@ ...@@ -142,9 +142,17 @@
}, },
targetData() { targetData() {
return this.targetOrder === 'original' if (this.targetOrder === 'original') {
? this.data.filter(item => this.value.indexOf(item[this.props.key]) > -1) return this.data.filter(item => this.value.indexOf(item[this.props.key]) > -1);
: this.value.map(key => this.dataObj[key]); } else {
return this.value.reduce((arr, cur) => {
const val = this.dataObj[cur];
if (val) {
arr.push(val);
}
return arr;
}, []);
}
}, },
hasButtonTexts() { hasButtonTexts() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment