From 325e2e4ff20b23d8b1a64902bb19bb24c4f0190f Mon Sep 17 00:00:00 2001 From: owen Date: Wed, 8 Nov 2023 21:10:05 +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?=E5=88=97=E8=A1=A8=E5=AF=BC=E8=88=AA=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/mobile/MenuList/config.ts | 39 ++++++++++ .../components/mobile/MenuList/index.vue | 31 ++++++++ .../components/mobile/MenuList/property.vue | 74 +++++++++++++++++++ src/components/DiyEditor/util.ts | 5 +- src/components/InputWithColor/index.vue | 58 +++++++++++++++ 5 files changed, 205 insertions(+), 2 deletions(-) create mode 100644 src/components/DiyEditor/components/mobile/MenuList/config.ts create mode 100644 src/components/DiyEditor/components/mobile/MenuList/index.vue create mode 100644 src/components/DiyEditor/components/mobile/MenuList/property.vue create mode 100644 src/components/InputWithColor/index.vue diff --git a/src/components/DiyEditor/components/mobile/MenuList/config.ts b/src/components/DiyEditor/components/mobile/MenuList/config.ts new file mode 100644 index 00000000..f06adfae --- /dev/null +++ b/src/components/DiyEditor/components/mobile/MenuList/config.ts @@ -0,0 +1,39 @@ +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' + +/** 列表导航属性 */ +export interface MenuListProperty { + // 导航菜单列表 + list: MenuListItemProperty[] + // 组件样式 + style: ComponentStyle +} +/** 列表导航项目属性 */ +export interface MenuListItemProperty { + // 图标链接 + iconUrl: string + // 标题 + title: string + // 标题颜色 + titleColor: string + // 副标题 + subtitle: string + // 副标题颜色 + subtitleColor: string + // 链接 + url: string +} + +// 定义组件 +export const component = { + id: 'MenuList', + name: '列表导航', + icon: 'fa-solid:list', + property: { + list: [], + style: { + bgType: 'color', + bgColor: '#fff', + marginBottom: 8 + } as ComponentStyle + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/MenuList/index.vue b/src/components/DiyEditor/components/mobile/MenuList/index.vue new file mode 100644 index 00000000..9a56fd94 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/MenuList/index.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/src/components/DiyEditor/components/mobile/MenuList/property.vue b/src/components/DiyEditor/components/mobile/MenuList/property.vue new file mode 100644 index 00000000..51652b6e --- /dev/null +++ b/src/components/DiyEditor/components/mobile/MenuList/property.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/src/components/DiyEditor/util.ts b/src/components/DiyEditor/util.ts index 29b44cf6..96dd4dbb 100644 --- a/src/components/DiyEditor/util.ts +++ b/src/components/DiyEditor/util.ts @@ -103,8 +103,9 @@ export const PAGE_LIBS = [ components: [ 'SearchBar', 'NoticeBar', - 'GridNavigation', - 'ListNavigation', + 'MenuSwiper', + 'MenuGrid', + 'MenuList', 'Divider', 'TitleBar' ] diff --git a/src/components/InputWithColor/index.vue b/src/components/InputWithColor/index.vue new file mode 100644 index 00000000..1932fd58 --- /dev/null +++ b/src/components/InputWithColor/index.vue @@ -0,0 +1,58 @@ + + + +