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/MenuGrid/config.ts | 79 +++++++++++++++++++++++++++++++++++++++
1 files changed, 79 insertions(+), 0 deletions(-)
diff --git a/src/components/DiyEditor/components/mobile/MenuGrid/config.ts b/src/components/DiyEditor/components/mobile/MenuGrid/config.ts
new file mode 100644
index 0000000..9f91ceb
--- /dev/null
+++ b/src/components/DiyEditor/components/mobile/MenuGrid/config.ts
@@ -0,0 +1,79 @@
+import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
+import { cloneDeep } from 'lodash-es'
+
+/** 瀹牸瀵艰埅灞炴�� */
+export interface MenuGridProperty {
+ // 鍒楁暟
+ column: number
+ // 瀵艰埅鑿滃崟鍒楄〃
+ list: MenuGridItemProperty[]
+ // 缁勪欢鏍峰紡
+ style: ComponentStyle
+}
+
+/** 瀹牸瀵艰埅椤圭洰灞炴�� */
+export interface MenuGridItemProperty {
+ // 鍥炬爣閾炬帴
+ iconUrl: string
+ // 鏍囬
+ title: string
+ // 鏍囬棰滆壊
+ titleColor: string
+ // 鍓爣棰�
+ subtitle: string
+ // 鍓爣棰橀鑹�
+ subtitleColor: string
+ // 閾炬帴
+ url: string
+ // 瑙掓爣
+ badge: {
+ // 鏄惁鏄剧ず
+ show: boolean
+ // 瑙掓爣鏂囧瓧
+ text: string
+ // 瑙掓爣鏂囧瓧棰滆壊
+ textColor: string
+ // 瑙掓爣鑳屾櫙棰滆壊
+ bgColor: string
+ }
+}
+
+export const EMPTY_MENU_GRID_ITEM_PROPERTY = {
+ title: '鏍囬',
+ titleColor: '#333',
+ subtitle: '鍓爣棰�',
+ subtitleColor: '#bbb',
+ badge: {
+ show: false,
+ textColor: '#fff',
+ bgColor: '#FF6000'
+ }
+} as MenuGridItemProperty
+
+// 瀹氫箟缁勪欢
+export const component = {
+ id: 'MenuGrid',
+ name: '瀹牸瀵艰埅',
+ icon: 'bi:grid-3x3-gap',
+ property: {
+ column: 3,
+ list: [cloneDeep(EMPTY_MENU_GRID_ITEM_PROPERTY)],
+ style: {
+ bgType: 'color',
+ bgColor: '#fff',
+ marginBottom: 8,
+ marginLeft: 8,
+ marginRight: 8,
+ padding: 8,
+ paddingTop: 8,
+ paddingRight: 8,
+ paddingBottom: 8,
+ paddingLeft: 8,
+ borderRadius: 8,
+ borderTopLeftRadius: 8,
+ borderTopRightRadius: 8,
+ borderBottomRightRadius: 8,
+ borderBottomLeftRadius: 8
+ } as ComponentStyle
+ }
+} as DiyComponent<MenuGridProperty>
--
Gitblit v1.8.0