Ant Design of Vue Select 选择器
1、Select组件<a-select showSearch placeholder="请选择仓库" optionFilterProp="children" allowClear v-decorator="[ 'whsIds',{rules: [{ required: true, message: '请选择仓库' }]} ]" @focus="handleDeliverFocus" @bl.
·
1,Select组件
<a-select showSearch placeholder="请选择仓库" optionFilterProp="children" allowClear
v-decorator="[ 'whsIds',{rules: [{ required: true, message: '请选择仓库' }]} ]"
@focus="handleDeliverFocus"
@blur="handleDeliverBlur"
@change="handleDeliverChange"
:filterOption="filterDeliverOption">
<a-select-option v-for="val in warehouseData" v-bind:key="val.whsId" :value="val.whsId">
{{val.whsName}}
</a-select-option>
</a-select>
2,change事件
handleDeliverChange(value) {
console.log(`selected ${value}`);
}
3,blur事件
handleDeliverBlur() {
}
4,focus事件
handleDeliverFocus() {
}
5,filterDeliverOption事件
filterDeliverOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
更多推荐
已为社区贡献3条内容
所有评论(0)