fix: IDLPAD

This commit is contained in:
xingyu4j
2026-01-26 11:06:38 +08:00
parent a0019cef04
commit 02c977f969
2 changed files with 19 additions and 2 deletions

View File

@@ -166,8 +166,17 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'AutoComplete',
componentProps: {
clearable: true,
filterOption(input: string, option: { value: string }) {
return option.value.toLowerCase().includes(input.toLowerCase());
fetchSuggestions(queryString: string, cb: any) {
const options = componentKeys.map((v) => ({ value: v }));
const createFilter = (qs: string) => {
return (restaurant: any) => {
return restaurant.value.toLowerCase().includes(qs.toLowerCase());
};
};
const results = queryString
? options.filter(createFilter(queryString))
: options;
cb(results);
},
placeholder: '请选择组件名称',
options: componentKeys.map((v) => ({ value: v })),