From b24af1f71fa01fed71b74a9719a405a1b3c8cebb Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 5 Dec 2024 15:38:40 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E3=80=90=E7=BC=BA=E9=99=B7=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E5=95=86=E5=9F=8E=E8=A3=85=E4=BF=AE:=20Title?= =?UTF-8?q?Bar=20=E6=A0=B7=E5=BC=8F=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../s-title-block/s-title-block.vue | 61 ++++++++----------- 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/sheep/components/s-title-block/s-title-block.vue b/sheep/components/s-title-block/s-title-block.vue index 58f999db..e9544662 100644 --- a/sheep/components/s-title-block/s-title-block.vue +++ b/sheep/components/s-title-block/s-title-block.vue @@ -7,11 +7,31 @@ > - {{ data.title }} + + {{ data.title }} + - {{ - data.description - }} + + {{ data.description }} + - {{ data.more.text }} + {{ data.more.text }} @@ -30,7 +50,7 @@ /** * 标题栏 */ - import { reactive, computed } from 'vue'; + import { computed, reactive } from 'vue'; import sheep from '@/sheep'; // 数据 @@ -64,40 +84,13 @@ 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, - }; - - // 副标题 - const descStyles = { - color: props.data.descriptionColor, - textAlign: props.data.textAlign, - fontSize: `${props.data.descriptionSize}px`, - fontWeight: `${props.data.descriptionWeight}`, - };