fix: 恢复搜索框原有的动态搜索功能,并与指定字段精确搜索前缀完美融合

This commit is contained in:
dxc
2026-03-11 13:43:43 +08:00
parent b1cc280a71
commit 31d91bceb0
4 changed files with 8 additions and 8 deletions

View File

@ -8,10 +8,10 @@
placeholder="请输入搜索关键字"
style="width: 320px; margin-right: 10px;"
clearable
@keyup.enter="handleQuery"
@input="handleInputSearch"
>
<template #prepend>
<el-select v-model="queryParams.searchField" style="width: 90px">
<el-select v-model="queryParams.searchField" style="width: 90px" @change="handleQuery">
<el-option label="全部" value="all" />
<el-option label="名称" value="name" />
<el-option label="俗名" value="common_name" />

View File

@ -20,12 +20,12 @@
placeholder="请输入搜索关键字"
class="filter-item-input"
clearable
@input="handleInputSearch"
@clear="fetchData"
@keyup.enter="fetchData"
style="width: 280px;"
>
<template #prepend>
<el-select v-model="queryParams.searchField" style="width: 90px">
<el-select v-model="queryParams.searchField" style="width: 90px" @change="fetchData">
<el-option label="全部" value="all" />
<el-option label="名称" value="name" />
<el-option label="规格" value="spec" />

View File

@ -19,12 +19,12 @@
placeholder="请输入搜索关键字"
class="filter-item-input"
clearable
@input="handleInputSearch"
@clear="fetchData"
@keyup.enter="fetchData"
style="width: 280px;"
>
<template #prepend>
<el-select v-model="queryParams.searchField" style="width: 90px">
<el-select v-model="queryParams.searchField" style="width: 90px" @change="fetchData">
<el-option label="全部" value="all" />
<el-option label="名称" value="name" />
<el-option label="规格" value="spec" />

View File

@ -20,12 +20,12 @@
placeholder="请输入搜索关键字"
class="filter-item-input"
clearable
@input="handleInputSearch"
@clear="fetchData"
@keyup.enter="fetchData"
style="width: 280px;"
>
<template #prepend>
<el-select v-model="queryParams.searchField" style="width: 90px">
<el-select v-model="queryParams.searchField" style="width: 90px" @change="fetchData">
<el-option label="全部" value="all" />
<el-option label="名称" value="name" />
<el-option label="规格" value="spec" />