From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目
---
src/components/DiyEditor/components/mobile/MenuSwiper/config.ts | 66 +++++++++++++++++++++++++++++++++
1 files changed, 66 insertions(+), 0 deletions(-)
diff --git a/src/components/DiyEditor/components/mobile/MenuSwiper/config.ts b/src/components/DiyEditor/components/mobile/MenuSwiper/config.ts
new file mode 100644
index 0000000..fe5f4e8
--- /dev/null
+++ b/src/components/DiyEditor/components/mobile/MenuSwiper/config.ts
@@ -0,0 +1,66 @@
+import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
+import { cloneDeep } from 'lodash-es'
+
+/** 鑿滃崟瀵艰埅灞炴�� */
+export interface MenuSwiperProperty {
+ // 甯冨眬锛� 鍥炬爣+鏂囧瓧 | 鍥炬爣
+ layout: 'iconText' | 'icon'
+ // 琛屾暟
+ row: number
+ // 鍒楁暟
+ column: number
+ // 瀵艰埅鑿滃崟鍒楄〃
+ list: MenuSwiperItemProperty[]
+ // 缁勪欢鏍峰紡
+ style: ComponentStyle
+}
+/** 鑿滃崟瀵艰埅椤圭洰灞炴�� */
+export interface MenuSwiperItemProperty {
+ // 鍥炬爣閾炬帴
+ iconUrl: string
+ // 鏍囬
+ title: string
+ // 鏍囬棰滆壊
+ titleColor: string
+ // 閾炬帴
+ url: string
+ // 瑙掓爣
+ badge: {
+ // 鏄惁鏄剧ず
+ show: boolean
+ // 瑙掓爣鏂囧瓧
+ text: string
+ // 瑙掓爣鏂囧瓧棰滆壊
+ textColor: string
+ // 瑙掓爣鑳屾櫙棰滆壊
+ bgColor: string
+ }
+}
+
+export const EMPTY_MENU_SWIPER_ITEM_PROPERTY = {
+ title: '鏍囬',
+ titleColor: '#333',
+ badge: {
+ show: false,
+ textColor: '#fff',
+ bgColor: '#FF6000'
+ }
+} as MenuSwiperItemProperty
+
+// 瀹氫箟缁勪欢
+export const component = {
+ id: 'MenuSwiper',
+ name: '鑿滃崟瀵艰埅',
+ icon: 'bi:grid-3x2-gap',
+ property: {
+ layout: 'iconText',
+ row: 1,
+ column: 3,
+ list: [cloneDeep(EMPTY_MENU_SWIPER_ITEM_PROPERTY)],
+ style: {
+ bgType: 'color',
+ bgColor: '#fff',
+ marginBottom: 8
+ } as ComponentStyle
+ }
+} as DiyComponent<MenuSwiperProperty>
--
Gitblit v1.8.0