修复搜索清空后列表未恢复

This commit is contained in:
smail 2026-09-24 11:51:04 +08:00
parent 42bc754b08
commit 6812f9edb7

View File

@ -1,6 +1,7 @@
import { useRouter } from "vue-router";
import { ref, watch, computed } from "vue";
import { storeToRefs } from "pinia";
import useGroupStore from "../../../stores/group";
@ -47,7 +48,7 @@ export function usePage() {
const data = ref([]);
const searchQuery = ref(groupStore.keyword);
const { keyword: searchQuery } = storeToRefs(groupStore);
const submitSearch = () => {
groupStore.keyword = searchQuery.value.trim();
router.push({ name: "list" });