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
 }
Logo

前往低代码交流专区

更多推荐