2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 04:22:33 +08:00

fix: 不自动刷新任务标志

This commit is contained in:
2026-01-11 02:05:28 +08:00
parent fc3b508b07
commit f068ccb627

View File

@@ -5,23 +5,11 @@ import { useGettext } from 'vue3-gettext'
const { $gettext } = useGettext()
const router = useRouter()
const { data, send } = useRequest(() => task.status(), { initialData: { task: false } })
const { data } = useRequest(() => task.status(), { initialData: { task: false } })
const goToTask = () => {
router.push({ path: '/task', query: { tab: 'task' } })
}
let timer: ReturnType<typeof setInterval> | null = null
onMounted(() => {
timer = setInterval(send, 5000)
})
onUnmounted(() => {
if (timer) {
clearInterval(timer)
}
})
</script>
<template>