From f20a554bdb24e9dfde9dc6a69d78595944f61d15 Mon Sep 17 00:00:00 2001 From: mark <mark18340872469@163.com> Date: 星期二, 25 十月 2022 14:53:57 +0800 Subject: [PATCH] 设备管理 样式调整 --- src/views/index/components/productLeft.vue | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/src/views/index/components/productLeft.vue b/src/views/index/components/productLeft.vue index e69b73d..e1c213e 100644 --- a/src/views/index/components/productLeft.vue +++ b/src/views/index/components/productLeft.vue @@ -2,7 +2,7 @@ <div class="productLeft" :style="{ - background: ` url(${data.pic})`, + background: ` url(${pic})`, backgroundSize: '100% 100%', backgroundRepeat: 'no-repeat', }" @@ -28,6 +28,19 @@ type: Object, }, }, + created() { + var reg = /^[0-9]/; + if (reg.test(this.data.pic)) { + this.pic = "/httpImage/" + this.data.pic; + } else { + this.pic = this.data.pic; + } + }, + data() { + return { + pic: "", + }; + }, }; </script> -- Gitblit v1.8.0