|
@@ -7,12 +7,20 @@ export default () => { |
|
@@ -7,12 +7,20 @@ export default () => { |
7
|
componentProps: {
|
7
|
componentProps: {
|
8
|
placeholder: '请选择属性',
|
8
|
placeholder: '请选择属性',
|
9
|
options,
|
9
|
options,
|
|
|
10
|
+ showSearch: true,
|
|
|
11
|
+ filterOption: (inputValue: string, option: Record<'label' | 'value', string>) => {
|
|
|
12
|
+ let { label, value } = option;
|
|
|
13
|
+ label = label.toLowerCase();
|
|
|
14
|
+ value = value.toLowerCase();
|
|
|
15
|
+ inputValue = inputValue.toLowerCase();
|
|
|
16
|
+ return label.includes(inputValue) || value.includes(inputValue);
|
|
|
17
|
+ },
|
10
|
},
|
18
|
},
|
11
|
});
|
19
|
});
|
12
|
if (Array.isArray(res)) {
|
20
|
if (Array.isArray(res)) {
|
13
|
opt = res.map((m) => {
|
21
|
opt = res.map((m) => {
|
14
|
return {
|
22
|
return {
|
15
|
- label: m?.identifier,
|
23
|
+ label: m?.name,
|
16
|
value: m?.identifier,
|
24
|
value: m?.identifier,
|
17
|
};
|
25
|
};
|
18
|
});
|
26
|
});
|