!385 !1 refactor(AppHeader): 优化搜索输入框交互及样式

Merge pull request !385 from xiyidaiwa/Erotica
This commit is contained in:
xiyidaiwa
2026-04-15 02:45:07 +00:00
committed by shenmo
parent 78c9679f88
commit bd8b50677e

View File

@@ -18,9 +18,8 @@
<input <input
id="searchBox" id="searchBox"
v-model="localSearchQuery" v-model="localSearchQuery"
class="w-full rounded-2xl border border-slate-200/70 bg-white/80 py-3 pl-12 pr-24 text-sm text-slate-700 shadow-sm outline-none transition placeholder:text-slate-400 focus:border-brand/50 focus:ring-4 focus:ring-brand/10 dark:border-slate-800/70 dark:bg-slate-900/60 dark:text-slate-200" class="w-full rounded-2xl border border-slate-200/70 bg-white/80 py-3 pl-12 pr-20 text-sm text-slate-700 shadow-sm outline-none transition placeholder:text-slate-400 focus:border-brand/50 focus:ring-4 focus:ring-brand/10 dark:border-slate-800/70 dark:bg-slate-900/60 dark:text-slate-200"
placeholder="搜索应用名 / 包名 / 标签,按回车键搜索" placeholder="搜索应用名 / 包名 / 标签"
@keydown.enter="handleSearch"
@focus="handleSearchFocus" @focus="handleSearchFocus"
@input="handleInput" @input="handleInput"
/> />
@@ -80,10 +79,6 @@ const emit = defineEmits<{
const localSearchQuery = ref(props.searchQuery || ""); const localSearchQuery = ref(props.searchQuery || "");
const handleSearch = () => {
emit("update-search", localSearchQuery.value);
};
const handleSearchFocus = () => { const handleSearchFocus = () => {
emit("search-focus"); emit("search-focus");
}; };