mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-02 12:18:46 +08:00
Cascader: fix filter
This commit is contained in:
parent
f457cd7f57
commit
2fae006ba1
@ -10,9 +10,13 @@
|
||||
arr.forEach(item => {
|
||||
const itemCopy = {};
|
||||
configurableProps.forEach(prop => {
|
||||
const propName = props[prop] || prop;
|
||||
const value = item[propName];
|
||||
if (value !== undefined) itemCopy[propName] = value;
|
||||
let name = props[prop];
|
||||
let value = item[name];
|
||||
if (value === undefined) {
|
||||
name = prop;
|
||||
value = item[name];
|
||||
}
|
||||
if (value !== undefined) itemCopy[name] = value;
|
||||
});
|
||||
if (Array.isArray(item[childrenProp])) {
|
||||
itemCopy[childrenProp] = copyArray(item[childrenProp], props);
|
||||
|
Loading…
Reference in New Issue
Block a user