mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 04:22:33 +08:00
fix: 不自动刷新任务标志
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user