From 84dcac77b16ccb6ff8e9cec14ac077d0cc60fdb8 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sun, 16 Apr 2023 22:32:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BA=8B=E4=BB=B6=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E5=91=BD=E5=90=8D=EF=BC=9AonXxx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mp/material/components/UploadFile.vue | 31 +++++++++++++------ .../mp/material/components/UploadVideo.vue | 22 +++++++------ src/views/mp/material/components/upload.ts | 1 - 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/src/views/mp/material/components/UploadFile.vue b/src/views/mp/material/components/UploadFile.vue index 93e6dd41..be7e323b 100644 --- a/src/views/mp/material/components/UploadFile.vue +++ b/src/views/mp/material/components/UploadFile.vue @@ -6,13 +6,13 @@ :limit="1" :file-list="fileList" :data="uploadData" - :on-progress="() => (uploading = true)" - :on-error="(err: Error) => message.error(`上传失败: ${err.message}`)" - :before-upload="beforeUpload" - :on-success="handleUploadSuccess" + :on-progress="(isUploading = true)" + :on-error="onUploadError" + :before-upload="onBeforeUpload" + :on-success="onUploadSuccess" > - - {{ uploading ? '正在上传' : '点击上传' }} + + {{ isUploading ? '正在上传' : '点击上传' }}