feat: add search button toggle

This commit is contained in:
YunYouJun
2023-07-30 05:21:21 +08:00
parent 2c7f3c94c6
commit 0224e78669
2 changed files with 14 additions and 1 deletions

View File

@@ -1,5 +1,10 @@
<script lang="ts" setup>
const rStore = useRecipeStore()
const searchInput = ref<HTMLInputElement>()
onMounted(() => {
searchInput.value?.focus()
})
</script>
<template>
@@ -14,6 +19,7 @@ const rStore = useRecipeStore()
</div>
<input
id="input"
ref="searchInput"
v-model="rStore.keyword"
placeholder="关键字过滤"
aria-label="搜索关键字"