diff --git a/src/views/stock/component/apply-form.vue b/src/views/stock/component/apply-form.vue index 85ffbd7..8cc1d55 100644 --- a/src/views/stock/component/apply-form.vue +++ b/src/views/stock/component/apply-form.vue @@ -25,6 +25,7 @@ style="width: 40%" show-search :options="options" + :filter-option="filterOption" @deselect="removeEvent($event)" @select="insertEvent($event)" > @@ -175,6 +176,10 @@ } } } + // 过滤选项 + const filterOption = (input: string, option: { label: string; value: number }) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + } // 取消选中时,删除table中的行 const removeEvent = (value: Insert) => {