bug: 下拉搜索框
All checks were successful
Release / lint (push) Successful in 28s
Release / Release (push) Successful in 1m18s

This commit is contained in:
my_ong 2024-12-18 17:17:53 +08:00
parent cdf349aabb
commit e390000c9b

View File

@ -25,6 +25,7 @@
style="width: 40%" style="width: 40%"
show-search show-search
:options="options" :options="options"
:filter-option="filterOption"
@deselect="removeEvent($event)" @deselect="removeEvent($event)"
@select="insertEvent($event)" @select="insertEvent($event)"
></a-select> ></a-select>
@ -175,6 +176,10 @@
} }
} }
} }
//
const filterOption = (input: string, option: { label: string; value: number }) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
// table // table
const removeEvent = (value: Insert) => { const removeEvent = (value: Insert) => {