bug: 下拉搜索框
This commit is contained in:
parent
cdf349aabb
commit
e390000c9b
@ -25,6 +25,7 @@
|
||||
style="width: 40%"
|
||||
show-search
|
||||
:options="options"
|
||||
:filter-option="filterOption"
|
||||
@deselect="removeEvent($event)"
|
||||
@select="insertEvent($event)"
|
||||
></a-select>
|
||||
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user