企业网站建设策划书标准版,阿里接外包吗网站开发,微信 网站提成方案点做,设计装饰公司背景
记录一下 大屏项目中#xff0c;下拉数据过多#xff0c;想使用下拉搜索功能#xff1b; 输入汉字#xff0c;匹配对应的项目#xff1b;
解决方案
关键代码如下#xff1a; a-select控件 a-selectv-model:valuestate.schemeInfo.monitorListsho…背景
记录一下 大屏项目中下拉数据过多想使用下拉搜索功能 输入汉字匹配对应的项目
解决方案
关键代码如下 a-select控件
a-selectv-model:valuestate.schemeInfo.monitorListshow-search:optionsstate.monitorOptions:filter-optionmonitorFilterOptionchangeonSelectIndex/a-selectprojectFilterOption 匹配事件
const projectFilterOption (input: string, option: any) {const label state.polderOptions.find(item item.value option.value)?.label || // 根据label来过滤return label.toLowerCase().includes(input.toLowerCase())
}