feat:仪表盘不活跃时不刷新 && 网盘整理联动刮削

This commit is contained in:
jxxghp
2024-06-24 09:13:22 +08:00
parent 8efeb77102
commit 6fad85e957
8 changed files with 71 additions and 7 deletions

View File

@@ -2,6 +2,15 @@
import api from '@/api'
import type { ScheduleInfo } from '@/api/types'
// 输入参数
const props = defineProps({
// 是否允许刷新数据
allowRefresh: {
type: Boolean,
default: true,
},
})
// 定时服务列表
const schedulerList = ref<ScheduleInfo[]>([])
@@ -10,6 +19,9 @@ let refreshTimer: NodeJS.Timeout | null = null
// 调用API加载定时服务列表
async function loadSchedulerList() {
if (!props.allowRefresh) {
return
}
try {
const res: ScheduleInfo[] = await api.get('dashboard/schedule')