From 19d3cb33e2d3f78b2399c87b4032eaa650acfd60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com>
Date: Sun, 11 Aug 2024 14:03:20 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E3=80=91=E4=BF=AE=E5=A4=8D=E8=A3=85=E4=BF=AE=E7=94=A8?=
=?UTF-8?q?=E6=88=B7=E5=8D=A1=E7=89=87=E4=BD=BF=E7=94=A8=E5=9B=BE=E7=89=87?=
=?UTF-8?q?=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/s-block-item/s-block-item.vue | 2 +-
sheep/components/s-user-card/s-user-card.vue | 28 +++++++++++++++----
2 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/sheep/components/s-block-item/s-block-item.vue b/sheep/components/s-block-item/s-block-item.vue
index 9cd60073..ee1ff8de 100644
--- a/sheep/components/s-block-item/s-block-item.vue
+++ b/sheep/components/s-block-item/s-block-item.vue
@@ -47,7 +47,7 @@
-
+
diff --git a/sheep/components/s-user-card/s-user-card.vue b/sheep/components/s-user-card/s-user-card.vue
index d2340985..2d32745e 100644
--- a/sheep/components/s-user-card/s-user-card.vue
+++ b/sheep/components/s-user-card/s-user-card.vue
@@ -1,6 +1,6 @@
-
+
@@ -70,9 +70,15 @@
const isLogin = computed(() => sheep.$store('user').isLogin);
// 接收参数
const props = defineProps({
- background: {
- type: String,
- default: '',
+ // 装修数据
+ data: {
+ type: Object,
+ default: () => ({}),
+ },
+ // 装修样式
+ styles: {
+ type: Object,
+ default: () => ({}),
},
// 头像
avatar: {
@@ -96,7 +102,19 @@
default: '1',
},
});
-
+ // 设置背景样式
+ const style = computed(() => {
+ // 直接从 props.styles 解构
+ const { bgType, bgImg, bgColor } = props.styles;
+
+ // 根据 bgType 返回相应的样式
+ return {
+ background: bgType === 'img'
+ ? `url(${bgImg}) no-repeat top center / 100% 100%`
+ : bgColor
+ };
+ });
+ // 绑定手机号
function onBind() {
showAuthModal('changeMobile');
}
From 35c75338ee5da4bdbf25718d823a7536b05d7806 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com>
Date: Sun, 11 Aug 2024 14:59:08 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E3=80=91=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7=E8=AE=A2?=
=?UTF-8?q?=E5=8D=95=E5=8D=A1=E7=89=87=E8=A3=85=E4=BF=AE=E7=9A=84=E8=83=8C?=
=?UTF-8?q?=E6=99=AF=E5=9B=BE=E7=89=87=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/s-block-item/s-block-item.vue | 2 +-
.../components/s-order-card/s-order-card.vue | 28 +++++++++++++++++--
2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/sheep/components/s-block-item/s-block-item.vue b/sheep/components/s-block-item/s-block-item.vue
index ee1ff8de..09b069c3 100644
--- a/sheep/components/s-block-item/s-block-item.vue
+++ b/sheep/components/s-block-item/s-block-item.vue
@@ -49,7 +49,7 @@
-
+
diff --git a/sheep/components/s-order-card/s-order-card.vue b/sheep/components/s-order-card/s-order-card.vue
index 095e6cfd..b3d851bd 100644
--- a/sheep/components/s-order-card/s-order-card.vue
+++ b/sheep/components/s-order-card/s-order-card.vue
@@ -1,6 +1,6 @@
-