From 1999ac4ea9c9d5599d9e7fe797ce01c9f206ed7c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 13 Nov 2022 10:21:45 +0800 Subject: [PATCH] =?UTF-8?q?v3.8.4:=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E7=BB=84=E4=BB=B6src=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E4=B8=BAnull=E5=80=BC=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98(I5KBAS)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/src/components/ImagePreview/index.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/yudao-ui-admin/src/components/ImagePreview/index.vue b/yudao-ui-admin/src/components/ImagePreview/index.vue index a88fdab55..0d2ebe075 100644 --- a/yudao-ui-admin/src/components/ImagePreview/index.vue +++ b/yudao-ui-admin/src/components/ImagePreview/index.vue @@ -19,7 +19,7 @@ export default { props: { src: { type: String, - required: true + default: "" }, width: { type: [Number, String], @@ -32,6 +32,9 @@ export default { }, computed: { realSrc() { + if (!this.src) { + return; + } let real_src = this.src.split(",")[0]; if (isExternal(real_src)) { return real_src; @@ -39,6 +42,9 @@ export default { return process.env.VUE_APP_BASE_API + real_src; }, realSrcList() { + if (!this.src) { + return; + } let real_src_list = this.src.split(","); let srcList = []; real_src_list.forEach(item => {