From 7ff46ff8044f44badaa03d67db22146744cf65f0 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Sat, 8 May 2021 11:06:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=83=8C=E6=99=AF=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=A9=BAurl=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/panel/template/component/TemplateItem.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/panel/template/component/TemplateItem.vue b/frontend/src/views/panel/template/component/TemplateItem.vue index 504d0f6e0f..88bd484aec 100644 --- a/frontend/src/views/panel/template/component/TemplateItem.vue +++ b/frontend/src/views/panel/template/component/TemplateItem.vue @@ -22,9 +22,13 @@ export default { }, computed: { classBackground() { - return { - background: `url(${this.template.snapshot}) no-repeat`, - 'background-size': `100% 100%` + if (this.template.snapshot) { + return { + background: `url(${this.template.snapshot}) no-repeat`, + 'background-size': `100% 100%` + } + } else { + return {} } } },