From 6611a000d7df9eed6cd8ed9d292205ff56167db4 Mon Sep 17 00:00:00 2001 From: "wu.jian2" Date: Thu, 6 Jul 2023 12:32:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E5=A1=AB=E5=85=A5URL=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E4=B8=8A=E4=BC=A0=E7=BB=84=E4=BB=B6=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E9=A2=84=E8=A7=88=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasicComponents/Picture/index.vue | 10 ---- .../BasicComponents/Picture/setting.vue | 51 +++++++++++-------- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/data-room-ui/packages/BasicComponents/Picture/index.vue b/data-room-ui/packages/BasicComponents/Picture/index.vue index 07805dae..62d50f44 100644 --- a/data-room-ui/packages/BasicComponents/Picture/index.vue +++ b/data-room-ui/packages/BasicComponents/Picture/index.vue @@ -19,16 +19,6 @@ 加载中··· - diff --git a/data-room-ui/packages/BasicComponents/Picture/setting.vue b/data-room-ui/packages/BasicComponents/Picture/setting.vue index c4cd6121..5c0f6879 100644 --- a/data-room-ui/packages/BasicComponents/Picture/setting.vue +++ b/data-room-ui/packages/BasicComponents/Picture/setting.vue @@ -16,7 +16,6 @@ 标题
@@ -100,17 +99,6 @@ :step="0.01" /> - - - - - - - - - - -
@@ -170,7 +158,20 @@ export default { } } }, - watch: {}, + watch: { + 'config.customize.url': function (val) { + if (val) { + this.fileList = [ + { + name: this.config.title, + url: this.config.customize.url + } + ] + } else { + this.fileList = [] + } + } + }, mounted () { if (this.config.customize.url) { this.fileList = [ @@ -195,8 +196,12 @@ export default { ] } else { this.$message.error(res.msg) + this.fileList = [] } }, + handleUploadError () { + this.$message.error('上传失败') + }, handleRemove () { this.fileList = [] this.config.customize.url = '' @@ -207,9 +212,6 @@ export default { this.$message.error('上传图片大小不能超过 2MB!') } return isLt2M - }, - handleUrlChange (val) { - this.config.customize.url = val } } } @@ -217,6 +219,7 @@ export default {