[update] 修改bug80040

This commit is contained in:
lideqin
2024-01-08 09:57:12 +08:00
parent 1420c5a51e
commit bfba78facb
2 changed files with 14 additions and 2 deletions
@@ -23,7 +23,10 @@
<a-col :span="12"> <a-col :span="12">
<!-- 项目--> <!-- 项目-->
<a-form-item :label="$t('project')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :label="$t('project')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select :placeholder="$t('pleaseSelect') + $t('project')" v-decorator="['project', validatorRules.project]"> <a-select :placeholder="$t('pleaseSelect') + $t('project')"
v-decorator="['project', validatorRules.project]"
show-search
:filter-option="filterOption">
<a-select-option v-for="item in projectSelectOptions" :key="item.id" :title="item.projectName">{{ item.projectName }}</a-select-option> <a-select-option v-for="item in projectSelectOptions" :key="item.id" :title="item.projectName">{{ item.projectName }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
@@ -176,6 +179,9 @@ export default {
}, },
close () { close () {
this.visible = false this.visible = false
},
filterOption (input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
} }
} }
} }
@@ -23,7 +23,10 @@
<a-col :span="12"> <a-col :span="12">
<!-- 项目--> <!-- 项目-->
<a-form-item :label="$t('project')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :label="$t('project')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select :placeholder="$t('pleaseSelect') + $t('project')" v-decorator="['project', validatorRules.project]"> <a-select :placeholder="$t('pleaseSelect') + $t('project')"
v-decorator="['project', validatorRules.project]"
show-search
:filter-option="filterOption">
<a-select-option v-for="item in projectSelectOptions" :key="item.id" :title="item.projectName">{{ item.projectName }}</a-select-option> <a-select-option v-for="item in projectSelectOptions" :key="item.id" :title="item.projectName">{{ item.projectName }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
@@ -189,6 +192,9 @@ export default {
}, },
close () { close () {
this.visible = false this.visible = false
},
filterOption (input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
} }
} }
} }