Commit 885b10beb352f858bfb58c2b7568edd62b2e51d8
Merge branch 'fix/DEFECT-2250' into 'main_dev'
fix: 修复云端 模板和组态产品搜索输入数字结果没有进行筛选 See merge request yunteng/thingskit-front!1394
Showing
2 changed files
with
4 additions
and
8 deletions
... | ... | @@ -6,6 +6,7 @@ import { useComponentRegister } from '/@/components/Form'; |
6 | 6 | import { OrgTreeSelect } from '../../common/OrgTreeSelect'; |
7 | 7 | import { getDeviceProfile } from '/@/api/alarm/position'; |
8 | 8 | import { buildUUID } from '/@/utils/uuid'; |
9 | +import { createPickerSearch } from '/@/utils/pickerSearch'; | |
9 | 10 | |
10 | 11 | useComponentRegister('OrgTreeSelect', OrgTreeSelect); |
11 | 12 | export enum Platform { |
... | ... | @@ -219,14 +220,7 @@ export const formSchema: FormSchema[] = [ |
219 | 220 | labelField: 'name', |
220 | 221 | valueField: 'id', |
221 | 222 | placeholder: '请选择产品', |
222 | - getPopupContainer: (triggerNode) => triggerNode.parentNode, | |
223 | - filterOption: (inputValue: string, option: Record<'label' | 'value', string>) => { | |
224 | - let { label, value } = option; | |
225 | - label = label.toLowerCase(); | |
226 | - value = value.toLowerCase(); | |
227 | - inputValue = inputValue.toLowerCase(); | |
228 | - return label.includes(inputValue) || value.includes(inputValue); | |
229 | - }, | |
223 | + ...createPickerSearch(), | |
230 | 224 | }, |
231 | 225 | ifShow: ({ values }) => values['enableTemplate'] === 0, |
232 | 226 | }, | ... | ... |
... | ... | @@ -6,6 +6,7 @@ import { useComponentRegister } from '/@/components/Form'; |
6 | 6 | import { OrgTreeSelect } from '../../common/OrgTreeSelect'; |
7 | 7 | import { getDeviceProfile } from '/@/api/alarm/position'; |
8 | 8 | import { Platform } from '../center/center.data'; |
9 | +import { createPickerSearch } from '/@/utils/pickerSearch'; | |
9 | 10 | |
10 | 11 | useComponentRegister('OrgTreeSelect', OrgTreeSelect); |
11 | 12 | |
... | ... | @@ -140,6 +141,7 @@ export const formSchema: FormSchema[] = [ |
140 | 141 | mode: 'multiple', |
141 | 142 | labelField: 'name', |
142 | 143 | valueField: 'id', |
144 | + ...createPickerSearch(), | |
143 | 145 | }, |
144 | 146 | }, |
145 | 147 | { | ... | ... |