From a1a037174cddb1c397a90f9057b88d594578a4f8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 21:35:28 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy=20editor?= =?UTF-8?q?=20=E7=9A=84=20title-bar=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/mobile/title-bar/config.ts | 56 +++++++------------ .../components/mobile/title-bar/property.vue | 9 ++- 2 files changed, 23 insertions(+), 42 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/config.ts index f442e7dc5..2ef0eb772 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/config.ts @@ -2,46 +2,28 @@ import type { ComponentStyle, DiyComponent } from '../../../util'; /** 标题栏属性 */ export interface TitleBarProperty { - // 背景图 - bgImgUrl: string; - // 偏移 - marginLeft: number; - // 显示位置 - textAlign: 'center' | 'left'; - // 主标题 - title: string; - // 副标题 - description: string; - // 标题大小 - titleSize: number; - // 描述大小 - descriptionSize: number; - // 标题粗细 - titleWeight: number; - // 描述粗细 - descriptionWeight: number; - // 标题颜色 - titleColor: string; - // 描述颜色 - descriptionColor: string; - // 高度 - height: number; - // 查看更多 + bgImgUrl: string; // 背景图 + marginLeft: number; // 偏移 + textAlign: 'center' | 'left'; // 显示位置 + title: string; // 主标题 + description: string; // 副标题 + titleSize: number; // 标题大小 + descriptionSize: number; // 描述大小 + titleWeight: number; // 标题粗细 + descriptionWeight: number; // 描述粗细 + titleColor: string; // 标题颜色 + descriptionColor: string; // 描述颜色 + height: number; // 高度 more: { - // 是否显示查看更多 - show: false; - // 自定义文字 - text: string; - // 样式选择 - type: 'all' | 'icon' | 'text'; - // 链接 - url: string; - }; - // 组件样式 - style: ComponentStyle; + show: false; // 是否显示查看更多 + text: string; // 自定义文字 + type: 'all' | 'icon' | 'text'; // 样式选择 + url: string; // 链接 + }; // 查看更多 + style: ComponentStyle; // 组件样式 } -// 定义组件 +/** 定义组件 */ export const component = { id: 'TitleBar', name: '标题栏', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue index 1fdafb90a..9ff872301 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue @@ -24,15 +24,16 @@ import { import ComponentContainerProperty from '../../component-container-property.vue'; -// 导航栏属性面板 +/** 导航栏属性面板 */ defineOptions({ name: 'TitleBarProperty' }); const props = defineProps<{ modelValue: TitleBarProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); -// 表单校验 -const rules = {}; +const rules = {}; // 表单校验 - -