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`, + };