<a-select v-model="queryParam.sourceId" placeholder="请选择" :filterOption="optionInput" showSearch>
<a-select-option v-for="(item,index) in sourceOptions" :key="index" :value="item.id">{{ item.source_name }}</a-select-option>
</a-select>
mixins: [optionInputSearch],
// 选择框输入搜索已有数据
const optionInputSearch = {
methods: {
optionInput(val, opt) {
let componentOptions = opt.componentOptions.children || opt[0].children;
// 循环知道最后一层
while (componentOptions[0].children && componentOptions[0].children.length > 0) {
componentOptions = componentOptions[0].children;
}
return componentOptions[0].text.toLowerCase().indexOf(val) >= 0;
}
}
}
export {
optionInputSearch,
}
vue + Ant Design 表格多选 mixin
vue 富文本图片上传处理
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。