@@ -19,7 +19,7 @@ import { useI18n } from '@tap/i18n'
1919import dayjs from ' dayjs'
2020import { ElMessage , ElMessageBox } from ' element-plus'
2121import { escapeRegExp , uniqBy } from ' lodash-es'
22- import { computed , inject , onMounted , onUnmounted , ref , watch } from ' vue'
22+ import { inject , onBeforeMount , onMounted , onUnmounted , ref , watch } from ' vue'
2323import { useRoute , useRouter } from ' vue-router'
2424import PageContainer from ' ../../components/PageContainer.vue'
2525import TablePage from ' ../../components/TablePage.vue'
@@ -57,7 +57,7 @@ const multipleSelection = ref<any[]>([])
5757
5858// ── Computed ──────────────────────────────────────────────────────────────────
5959
60- const filterItems = computed (() => [
60+ const filterItems = ref ( [
6161 {
6262 label: t (' public_status' ),
6363 key: ' status' ,
@@ -96,12 +96,14 @@ const filterItems = computed(() => [
9696 },
9797 },
9898 {
99- placeholder: t (' public_task_name ' ),
99+ placeholder: t (' packages_business_shared_cache_placeholder_task_name ' ),
100100 key: ' name' ,
101101 type: ' input' ,
102102 },
103103 {
104- placeholder: t (' public_connectionName' ),
104+ placeholder: t (
105+ ' packages_business_shared_cache_placeholder_connection_name' ,
106+ ),
105107 key: ' connectionName' ,
106108 type: ' input' ,
107109 },
@@ -285,24 +287,21 @@ const handleImport = () => {
285287 upload .value ?.show ()
286288}
287289
288- // ── Lifecycle & Watchers ──────────────────────────────────────────────────────
289-
290290watch (
291291 () => route .query ,
292292 () => {
293- searchParams .value = {
294- ... searchParams .value ,
295- name: (route .query ?.keyword as string ) || ' ' ,
296- }
297293 table .value ?.fetch (1 )
298294 },
299295)
300296
297+ onBeforeMount (() => {
298+ Object .assign (searchParams .value , route .query )
299+ })
300+
301301onMounted (() => {
302302 timer = setInterval (() => {
303303 withPassive (() => table .value ?.fetch (null , 0 , true ))
304304 }, 8000 )
305- Object .assign (searchParams .value , { name: route .query ?.keyword || ' ' })
306305})
307306
308307onUnmounted (() => {
0 commit comments