From 33162a12c0569056730bd7d06d3c5ea2b1bcb650 Mon Sep 17 00:00:00 2001 From: owen Date: Fri, 15 Dec 2023 13:26:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=A5=E9=94=80=EF=BC=9A=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E8=A3=85=E4=BF=AE=E7=BB=84=E4=BB=B6=E3=80=90?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=A0=8F=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/mobile/TitleBar/config.ts | 26 ++- .../components/mobile/TitleBar/index.vue | 21 +- .../components/mobile/TitleBar/property.vue | 190 +++++++++--------- 3 files changed, 120 insertions(+), 117 deletions(-) diff --git a/src/components/DiyEditor/components/mobile/TitleBar/config.ts b/src/components/DiyEditor/components/mobile/TitleBar/config.ts index 3d486cc3..d9f0672c 100644 --- a/src/components/DiyEditor/components/mobile/TitleBar/config.ts +++ b/src/components/DiyEditor/components/mobile/TitleBar/config.ts @@ -1,7 +1,13 @@ -import { DiyComponent } from '@/components/DiyEditor/util' +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' /** 标题栏属性 */ export interface TitleBarProperty { + // 背景图 + bgImgUrl: string + // 偏移 + marginLeft: number + // 显示位置 + textAlign: 'left' | 'center' // 主标题 title: string // 副标题 @@ -12,18 +18,12 @@ export interface TitleBarProperty { descriptionSize: number // 标题粗细 titleWeight: number - // 显示位置 - position: 'left' | 'center' // 描述粗细 descriptionWeight: number // 标题颜色 titleColor: string // 描述颜色 descriptionColor: string - // 背景颜色 - backgroundColor: string - // 底部分割线 - showBottomBorder: false // 查看更多 more: { // 是否显示查看更多 @@ -35,6 +35,8 @@ export interface TitleBarProperty { // 链接 url: string } + // 组件样式 + style: ComponentStyle } // 定义组件 @@ -48,18 +50,20 @@ export const component = { titleSize: 16, descriptionSize: 12, titleWeight: 400, - position: 'left', + textAlign: 'left', descriptionWeight: 200, titleColor: 'rgba(50, 50, 51, 10)', descriptionColor: 'rgba(150, 151, 153, 10)', - backgroundColor: 'rgba(255, 255, 255, 10)', - showBottomBorder: false, more: { //查看更多 show: false, type: 'icon', text: '查看更多', url: '' - } + }, + style: { + bgType: 'color', + bgColor: '#fff' + } as ComponentStyle } } as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/TitleBar/index.vue b/src/components/DiyEditor/components/mobile/TitleBar/index.vue index 047a6c06..5bf52f49 100644 --- a/src/components/DiyEditor/components/mobile/TitleBar/index.vue +++ b/src/components/DiyEditor/components/mobile/TitleBar/index.vue @@ -1,19 +1,14 @@