mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-29 18:57:36 +08:00
Transfer: fix component crash when target order is push (#13333)
* Transfer: fix bug sometimes component crash when target order is push(#13320) * update code
This commit is contained in:
parent
c1b869d7ce
commit
465ec7c695
@ -142,9 +142,17 @@
|
||||
},
|
||||
|
||||
targetData() {
|
||||
return this.targetOrder === 'original'
|
||||
? this.data.filter(item => this.value.indexOf(item[this.props.key]) > -1)
|
||||
: this.value.map(key => this.dataObj[key]);
|
||||
if (this.targetOrder === 'original') {
|
||||
return this.data.filter(item => this.value.indexOf(item[this.props.key]) > -1);
|
||||
} else {
|
||||
return this.value.reduce((arr, cur) => {
|
||||
const val = this.dataObj[cur];
|
||||
if (val) {
|
||||
arr.push(val);
|
||||
}
|
||||
return arr;
|
||||
}, []);
|
||||
}
|
||||
},
|
||||
|
||||
hasButtonTexts() {
|
||||
|
Loading…
Reference in New Issue
Block a user