Commit 1a02d4675bf17d205ad2a9bd91ffdc83147a9b4c

Authored by ww
1 parent 2876552a

fix: 修复场景联动设备属性未使用物模型标识符名称

... ... @@ -372,7 +372,7 @@ export const trigger_condition_schema: FormSchema[] = [
372 372 {
373 373 field: 'type2',
374 374 label: '',
375   - component: 'AutoComplete',
  375 + component: 'Select',
376 376 componentProps: {
377 377 placeholder: '请选择属性',
378 378 },
... ...
... ... @@ -7,12 +7,20 @@ export default () => {
7 7 componentProps: {
8 8 placeholder: '请选择属性',
9 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 20 if (Array.isArray(res)) {
13 21 opt = res.map((m) => {
14 22 return {
15   - label: m?.identifier,
  23 + label: m?.name,
16 24 value: m?.identifier,
17 25 };
18 26 });
... ...