feat(ui): add single selection and keyboard navigation to TagsSelect

Add `multiple` prop to support single-value selection
Implement keyboard navigation (Up/Down/Enter) for dropdown options
Replace native select elements with TagsSelect across views
This commit is contained in:
2026-04-30 11:07:28 +08:00
parent b94450d3ba
commit 193b4e3fd5
5 changed files with 221 additions and 64 deletions

View File

@@ -54,12 +54,14 @@ watch(query, loadPokemon);
<div class="field">
<label for="environment">喜欢的环境</label>
<select id="environment" v-model="environmentId">
<option value="">全部</option>
<option v-for="item in options.environments" :key="item.id" :value="item.id">
{{ item.name }}
</option>
</select>
<TagsSelect
id="environment"
v-model="environmentId"
:options="options.environments"
:multiple="false"
placeholder="全部"
search-placeholder="搜索喜欢的环境"
/>
</div>
<div class="field">