Commit 1ea0731f542f4e17a66479d134734e0ecd31919b
1 parent
2320e8ea
perf: product profile transform script add search function
Showing
1 changed file
with
7 additions
and
0 deletions
| @@ -8,7 +8,9 @@ | @@ -8,7 +8,9 @@ | ||
| 8 | placeholder="请选择转换脚本" | 8 | placeholder="请选择转换脚本" |
| 9 | v-model:value="selectScript.script" | 9 | v-model:value="selectScript.script" |
| 10 | style="width: 305px" | 10 | style="width: 305px" |
| 11 | + show-search | ||
| 11 | :options="selectOptions" | 12 | :options="selectOptions" |
| 13 | + :filter-option="handleSearch" | ||
| 12 | allowClear | 14 | allowClear |
| 13 | /> | 15 | /> |
| 14 | </div> | 16 | </div> |
| @@ -113,6 +115,11 @@ | @@ -113,6 +115,11 @@ | ||
| 113 | const setFormData = (v) => { | 115 | const setFormData = (v) => { |
| 114 | selectScript.script = v?.scriptId; | 116 | selectScript.script = v?.scriptId; |
| 115 | }; | 117 | }; |
| 118 | + | ||
| 119 | + const handleSearch = (inputValue: string, option: Record<'label' | 'value', string>) => { | ||
| 120 | + return option.label.includes(inputValue); | ||
| 121 | + }; | ||
| 122 | + | ||
| 116 | defineExpose({ | 123 | defineExpose({ |
| 117 | getFormData, | 124 | getFormData, |
| 118 | resetFormData, | 125 | resetFormData, |