From 8ef7c8973590721cbfe0287e2aa6d0b0ea96a080 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 1 May 2025 10:24:52 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E3=80=91=E5=BA=97=E9=93=BA=E8=A3=85=E4=BF=AE-=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E6=A0=8F=EF=BC=9A=E5=A2=9E=E5=8A=A0=20skew=20?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=A0=8F=E3=80=82=E5=90=8C=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=9B=9E=E5=88=B0=20titleStyles=E3=80=81desc?= =?UTF-8?q?Styles=20=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../s-title-block/s-title-block.vue | 63 +++++++++++-------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/sheep/components/s-title-block/s-title-block.vue b/sheep/components/s-title-block/s-title-block.vue index e9544662..36680061 100644 --- a/sheep/components/s-title-block/s-title-block.vue +++ b/sheep/components/s-title-block/s-title-block.vue @@ -7,31 +7,11 @@ > - - {{ data.title }} - + {{ data.title }} - - {{ data.description }} - + {{ + data.description + }} - {{ data.more.text }} + {{ data.more.text }} @@ -50,7 +30,7 @@ /** * 标题栏 */ - import { computed, reactive } from 'vue'; + import { reactive, computed } from 'vue'; import sheep from '@/sheep'; // 数据 @@ -84,13 +64,42 @@ background: bgType === 'img' ? `url(${bgImg}) no-repeat top center / 100% 100%` : bgColor, }; }); + + // 标题样式 + const titleStyles = { + color: props.data.titleColor, + fontSize: `${props.data.titleSize}px`, + textAlign: props.data.textAlign, + marginLeft: `${props.data.skew || 0}px`, + }; + + // 副标题 + const descStyles = { + color: props.data.descriptionColor, + textAlign: props.data.textAlign, + fontSize: `${props.data.descriptionSize}px`, + fontWeight: `${props.data.descriptionWeight}`, + marginLeft: `${props.data.skew || 0}px`, + };