From b73a057a9beccfa95ff917a6744e9e5b4ffc09f0 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Fri, 27 Dec 2024 15:09:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8C=E6=AD=A5=E5=8A=9F?= =?UTF-8?q?=E8=83=BDBUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/prepare/index.vue | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index 7a39828..142ad98 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -188,7 +188,7 @@ import FileListItem from '@/views/prepare/container/file-list-item.vue' import KjListItem from '@/views/prepare/container/kj-list-item.vue' import { getSmarttalkPage, moveSmarttalk, creatAPT } from '@/api/file' import { toTimeText } from '@/utils/date' -import { ElMessage } from 'element-plus' +import { ElMessage, ElMessageBox } from 'element-plus' import {parseCataByNode, creatPPT, asyncLocalFile, removeLocalFiles} from '@/utils/talkFile' import FileOperBatch from '@/views/prepare/container/file-oper-batch.vue' import SetHomework from '@/components/set-homework/index.vue' @@ -936,10 +936,21 @@ export default { }, reloadFiles() { // TODO清除当前页所有文件缓存 - removeLocalFiles(this.currentSCFileList) - this.currentSCFileList.filter((item) => { - item.async = false - }) + ElMessageBox.confirm( + '是否确认重载当前资源,重载后将清除本页资源从新下载线上资源?', + '提示', + { + confirmButtonText: '是', + cancelButtonText: '取消', + type: 'warning', + } + ) + .then(() => { + removeLocalFiles(this.currentSCFileList) + this.currentSCFileList.filter((item) => { + item.async = false + }) + }) }, asyncAllFile() { this.isLoading = true