From 28b58646c29e7985b3f33bbc625b2198dcdef4d4 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 15 Jan 2025 10:09:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/swiper-manage/index.vue | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/views/swiper-manage/index.vue b/src/views/swiper-manage/index.vue index ea91c7e5..1a146f3a 100644 --- a/src/views/swiper-manage/index.vue +++ b/src/views/swiper-manage/index.vue @@ -119,6 +119,44 @@ export default { cancel() { this.addSwiperVisible = false; }, + // 上传之前 + handleBeforeUpload(file) { + // const isSvg = this.fileType.some((e) => file.type.includes(e)); + // if (!isSvg) { + // this.$modal.msgError( + // `文件格式不正确, 请上传${this.fileType.join("、")}格式的文件!` + // ); + // return false; + // } + // const isLt = file.size / 1024 / 1024 < 3; + // if (!isLt) { + // this.$modal.msgError(`LOGO大小不能超过 3 MB`); + // return false; + // } + // this.$modal.loading("图片正在上传,请稍候..."); + }, + // 移除 + handleRemove(file) { + // this.addOrEditForm.fileList = this.addOrEditForm.fileList.filter( + // (item) => item.uid !== file.uid + // ); + // this.addOrEditForm.logo = ""; + }, + // 预览 LOGO + handlePreview(file) { + // this.dialogInnerVisible = true; + // this.previewUrl = file.url; + }, + // 上传成功 + handleSuccess(res) { + // if (res.code === 200) { + // this.addOrEditForm.logo = res.data.url; + // } else { + // this.addOrEditForm.fileList = []; + // this.addOrEditForm.logo = ""; + // } + // this.$modal.closeLoading(); + }, }, };