From 76025b6821983d0ae0407a734e48d6f5088543ff Mon Sep 17 00:00:00 2001 From: owen Date: Sat, 9 Dec 2023 16:45:54 +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=BC=B9=E7=AA=97=E5=B9=BF=E5=91=8A=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/mobile/Popover/config.ts | 26 ++++++++ .../components/mobile/Popover/index.vue | 38 +++++++++++ .../components/mobile/Popover/property.vue | 38 +++++++++++ src/components/DiyEditor/index.vue | 65 +++++++++++++++++++ src/components/DiyEditor/util.ts | 11 +++- 5 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 src/components/DiyEditor/components/mobile/Popover/config.ts create mode 100644 src/components/DiyEditor/components/mobile/Popover/index.vue create mode 100644 src/components/DiyEditor/components/mobile/Popover/property.vue diff --git a/src/components/DiyEditor/components/mobile/Popover/config.ts b/src/components/DiyEditor/components/mobile/Popover/config.ts new file mode 100644 index 00000000..e8140900 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/Popover/config.ts @@ -0,0 +1,26 @@ +import { DiyComponent } from '@/components/DiyEditor/util' + +/** 弹窗广告属性 */ +export interface PopoverProperty { + list: PopoverItemProperty[] +} + +export interface PopoverItemProperty { + // 图片地址 + imgUrl: string + // 跳转连接 + url: string + // 显示类型:仅显示一次、每次启动都会显示 + showType: 'once' | 'always' +} + +// 定义组件 +export const component = { + id: 'Popover', + name: '弹窗广告', + icon: 'carbon:popup', + position: 'fixed', + property: { + list: [{ showType: 'once' }] + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/Popover/index.vue b/src/components/DiyEditor/components/mobile/Popover/index.vue new file mode 100644 index 00000000..347599b3 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/Popover/index.vue @@ -0,0 +1,38 @@ + + + + diff --git a/src/components/DiyEditor/components/mobile/Popover/property.vue b/src/components/DiyEditor/components/mobile/Popover/property.vue new file mode 100644 index 00000000..6535e3b2 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/Popover/property.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/src/components/DiyEditor/index.vue b/src/components/DiyEditor/index.vue index 6cb5d6bd..2e353c87 100644 --- a/src/components/DiyEditor/index.vue +++ b/src/components/DiyEditor/index.vue @@ -47,6 +47,18 @@ class="cursor-pointer!" /> + +
+ +