diff --git a/src/components/AppLinkInput/AppLinkSelectDialog.vue b/src/components/AppLinkInput/AppLinkSelectDialog.vue index a536ac13..41a43590 100644 --- a/src/components/AppLinkInput/AppLinkSelectDialog.vue +++ b/src/components/AppLinkInput/AppLinkSelectDialog.vue @@ -32,7 +32,7 @@ > {{ appLink.name }} @@ -63,7 +63,7 @@ + + diff --git a/src/components/DiyEditor/components/mobile/HotZone/config.ts b/src/components/DiyEditor/components/mobile/HotZone/config.ts new file mode 100644 index 00000000..9dcebcc2 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/HotZone/config.ts @@ -0,0 +1,42 @@ +import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' + +/** 热区属性 */ +export interface HotZoneProperty { + // 图片地址 + imgUrl: string + // 导航菜单列表 + list: HotZoneItemProperty[] + // 组件样式 + style: ComponentStyle +} +/** 热区项目属性 */ +export interface HotZoneItemProperty { + // 链接的名称 + name: string + // 链接 + url: string + // 宽 + width: number + // 高 + height: number + // 上 + top: number + // 左 + left: number +} + +// 定义组件 +export const component = { + id: 'HotZone', + name: '热区', + icon: 'tabler:hand-click', + property: { + imgUrl: '', + list: [] as HotZoneItemProperty[], + style: { + bgType: 'color', + bgColor: '#fff', + marginBottom: 8 + } as ComponentStyle + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/HotZone/index.vue b/src/components/DiyEditor/components/mobile/HotZone/index.vue new file mode 100644 index 00000000..3a9b842e --- /dev/null +++ b/src/components/DiyEditor/components/mobile/HotZone/index.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/src/components/DiyEditor/components/mobile/HotZone/property.vue b/src/components/DiyEditor/components/mobile/HotZone/property.vue new file mode 100644 index 00000000..495cbdce --- /dev/null +++ b/src/components/DiyEditor/components/mobile/HotZone/property.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/components/DiyEditor/util.ts b/src/components/DiyEditor/util.ts index 940ece4a..8bca9726 100644 --- a/src/components/DiyEditor/util.ts +++ b/src/components/DiyEditor/util.ts @@ -124,7 +124,15 @@ export const PAGE_LIBS = [ { name: '图文组件', extended: true, - components: ['ImageBar', 'Carousel', 'TitleBar', 'VideoPlayer', 'Divider', 'MagicCube'] + components: [ + 'ImageBar', + 'Carousel', + 'TitleBar', + 'VideoPlayer', + 'Divider', + 'MagicCube', + 'HotZone' + ] }, { name: '商品组件', extended: true, components: ['ProductCard', 'ProductList'] }, {