Commit 9ed0e7cfb825fedb9f9aa08fe4fe1fad2d1a7b97

Authored by loveumiko
1 parent 31e1fde6

fix: 修改apiSelect不能搜索

... ... @@ -60,7 +60,7 @@ export const formSchemas = (componentKey?: string): FormSchema[] => {
60 60 formModel[ContentDataFieldsEnum.ATTR] = null
61 61 },
62 62 filterOption: (inputValue: string, option: DeviceItemType) => {
63   - option.alias?.includes?.(inputValue) || option.name?.includes?.(inputValue)
  63 + return option.alias?.includes?.(inputValue) || option.name?.includes?.(inputValue)
64 64 },
65 65 }
66 66 },
... ... @@ -89,8 +89,9 @@ export const formSchemas = (componentKey?: string): FormSchema[] => {
89 89 onSelect(value: string, option: ThingsModelItemType) {
90 90 formModel[ContentDataFieldsEnum.ATTR_INFO] = value && option ? toRaw(unref(option)) : null
91 91 },
92   - filterOption: (inputValue: string, option: ThingsModelItemType) =>
93   - option.name.includes(inputValue),
  92 + filterOption: (inputValue: string, option: ThingsModelItemType) => {
  93 + return option.name.includes(inputValue)
  94 + },
94 95 }
95 96 },
96 97 },
... ...