select filter 时候,如果点开 select 没抉择,然而失去焦点,会使 query 残留在 select 中
<Select
filterable
v-model="formData.template"
clearable
ref="templateSelect"
@on-open-change="handleOpenChange"
>
<Option value="custom">
自定义
</Option>
<Option
v-for="item in poolTemplateList"
:key="item.id"
:value="item.id"
>
{{item.name}}
</Option>
</Select>
handleOpenChange(state) {if (!state && this.formData.template === "custom") {this.$refs.templateSelect.query = ""}
},