update 优化 重构抽出一些常用hooks组件简化页面编码

This commit is contained in:
疯狂的狮子Li
2026-04-17 15:09:17 +08:00
parent 2ce3786ee0
commit 6a3394bdc5
33 changed files with 1062 additions and 968 deletions
+17
View File
@@ -0,0 +1,17 @@
export function useSearchToggle(initialValue = true) {
const showSearch = ref(initialValue);
const toggleSearch = () => {
showSearch.value = !showSearch.value;
};
const setShowSearch = (value: boolean) => {
showSearch.value = value;
};
return {
showSearch,
toggleSearch,
setShowSearch
};
}