From 06309e40b858bbf1992b0c368a10b1638b167ff5 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 3 Nov 2025 22:53:13 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90antd=E3=80=91=E3=80=90mal?= =?UTF-8?q?l=E3=80=91diy-editor=20=E7=9A=84=20config.ts=20=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/component-library.vue | 90 +++++++------------ .../components/mobile/Carousel/config.ts | 41 ++++----- .../components/mobile/Divider/config.ts | 17 ++-- .../components/mobile/Popover/config.ts | 14 ++- .../components/mobile/coupon-card/config.ts | 31 +++---- .../mobile/floating-action-button/config.ts | 27 +++--- .../components/mobile/hot-zone/config.ts | 29 +++--- .../components/mobile/image-bar/config.ts | 11 +-- .../components/mobile/magic-cube/config.ts | 39 +++----- .../components/mobile/menu-grid/config.ts | 43 ++++----- .../components/mobile/menu-list/config.ts | 27 +++--- .../components/mobile/menu-swiper/config.ts | 54 +++++------ .../mobile/navigation-bar/config.ts | 68 ++++++-------- .../components/mobile/notice-bar/config.ts | 23 ++--- .../components/mobile/page-config/config.ts | 11 +-- .../components/mobile/product-card/config.ts | 81 ++++++----------- .../components/mobile/product-list/config.ts | 51 ++++------- .../mobile/promotion-article/config.ts | 8 +- .../mobile/promotion-combination/config.ts | 76 ++++++---------- .../mobile/promotion-point/config.ts | 75 ++++++---------- .../mobile/promotion-seckill/config.ts | 76 ++++++---------- .../components/mobile/search-bar/config.ts | 4 +- .../components/mobile/tab-bar/config.ts | 42 ++++----- .../components/mobile/title-bar/config.ts | 56 ++++-------- .../components/mobile/user-card/config.ts | 5 +- .../components/mobile/user-order/config.ts | 5 +- .../components/mobile/user-wallet/config.ts | 5 +- .../components/mobile/video-player/config.ts | 19 ++-- .../promotion/components/diy-editor/index.vue | 40 ++++++--- 29 files changed, 394 insertions(+), 674 deletions(-) diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-library.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-library.vue index 56907c105..9c6959f75 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-library.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-library.vue @@ -14,16 +14,15 @@ import { componentConfigs } from './mobile/index'; /** 组件库:目前左侧的【基础组件】、【图文组件】部分 */ defineOptions({ name: 'ComponentLibrary' }); -// 组件列表 +/** 组件列表 */ const props = defineProps<{ list: DiyComponentLibrary[]; }>(); -// 组件分组 -const groups = reactive([]); -// 展开的折叠面板 -const extendGroups = reactive([]); -// 监听 list 属性,按照 DiyComponentLibrary 的 name 分组 +const groups = reactive([]); // 组件分组 +const extendGroups = reactive([]); // 展开的折叠面板 + +/** 监听 list 属性,按照 DiyComponentLibrary 的 name 分组 */ watch( () => props.list, () => { @@ -53,7 +52,7 @@ watch( }, ); -// 克隆组件 +/** 克隆组件 */ const handleCloneComponent = (component: DiyComponent) => { const instance = cloneDeep(component); instance.uid = Date.now(); @@ -62,7 +61,9 @@ const handleCloneComponent = (component: DiyComponent) => {