diff --git a/src/components/DiyEditor/components/mobile/FloatingActionButton/config.ts b/src/components/DiyEditor/components/mobile/FloatingActionButton/config.ts new file mode 100644 index 00000000..fcf129f1 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/FloatingActionButton/config.ts @@ -0,0 +1,36 @@ +import { DiyComponent } from '@/components/DiyEditor/util' + +// 悬浮按钮属性 +export interface FloatingActionButtonProperty { + // 展开方向 + direction: 'horizontal' | 'vertical' + // 是否显示文字 + showText: boolean + // 按钮列表 + list: FloatingActionButtonItemProperty[] +} + +// 悬浮按钮项属性 +export interface FloatingActionButtonItemProperty { + // 图片地址 + imgUrl: string + // 跳转连接 + url: string + // 文字 + text: string + // 文字颜色 + textColor: string +} + +// 定义组件 +export const component = { + id: 'FloatingActionButton', + name: '悬浮按钮', + icon: 'tabler:float-right', + position: 'fixed', + property: { + direction: 'vertical', + showText: true, + list: [{ textColor: '#fff' }] + } +} as DiyComponent diff --git a/src/components/DiyEditor/components/mobile/FloatingActionButton/index.vue b/src/components/DiyEditor/components/mobile/FloatingActionButton/index.vue new file mode 100644 index 00000000..19e42cb6 --- /dev/null +++ b/src/components/DiyEditor/components/mobile/FloatingActionButton/index.vue @@ -0,0 +1,74 @@ + + + + diff --git a/src/components/DiyEditor/components/mobile/FloatingActionButton/property.vue b/src/components/DiyEditor/components/mobile/FloatingActionButton/property.vue new file mode 100644 index 00000000..5db08d0e --- /dev/null +++ b/src/components/DiyEditor/components/mobile/FloatingActionButton/property.vue @@ -0,0 +1,44 @@ + + + + + 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!" /> + +
+ +