提交 7ec941a9 authored 作者: 王鹏飞's avatar 王鹏飞

feat: add auto-refresh functionality to RecordDialog component

上级 27b5d7c9
...@@ -3,6 +3,7 @@ import { ElMessage, ElLoading } from 'element-plus' ...@@ -3,6 +3,7 @@ import { ElMessage, ElLoading } from 'element-plus'
import { useFileDialog } from '@vueuse/core' import { useFileDialog } from '@vueuse/core'
import { upload } from '@/utils/upload' import { upload } from '@/utils/upload'
import { getRecordList, saveTestRecord, getRecord } from '../api' import { getRecordList, saveTestRecord, getRecord } from '../api'
import { useIntervalFn } from '@vueuse/core'
import ImprovementPlan from './ImprovementPlan.vue' import ImprovementPlan from './ImprovementPlan.vue'
const props = defineProps(['data']) const props = defineProps(['data'])
...@@ -102,6 +103,13 @@ const handleUpload = (row) => { ...@@ -102,6 +103,13 @@ const handleUpload = (row) => {
} }
}) })
} }
// 刷新
const handleRefresh = () => {
appList.value?.refetch()
}
useIntervalFn(() => {
handleRefresh()
}, 5000)
</script> </script>
<template> <template>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论