diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/config.ts similarity index 58% rename from apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/config.ts rename to apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/config.ts index 6f365b735..52bbeacdb 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/config.ts @@ -2,19 +2,17 @@ import type { DiyComponent } from '../../../util'; /** 弹窗广告属性 */ export interface PopoverProperty { - list: PopoverItemProperty[]; + list: PopoverItemProperty[]; // 弹窗列表 } +/** 弹窗广告项目属性 */ export interface PopoverItemProperty { - // 图片地址 - imgUrl: string; - // 跳转连接 - url: string; - // 显示类型:仅显示一次、每次启动都会显示 - showType: 'always' | 'once'; + imgUrl: string; // 图片地址 + url: string; // 跳转连接 + showType: 'always' | 'once'; // 显示类型:仅显示一次、每次启动都会显示 } -// 定义组件 +/** 定义组件 */ export const component = { id: 'Popover', name: '弹窗广告', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/index.vue similarity index 81% rename from apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/index.vue rename to apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/index.vue index bc724eca9..694f77ed2 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/index.vue @@ -9,18 +9,20 @@ import { ElImage } from 'element-plus'; /** 弹窗广告 */ defineOptions({ name: 'Popover' }); -// 定义属性 -defineProps<{ property: PopoverProperty }>(); -// 处理选中 -const activeIndex = ref(0); -const handleActive = (index: number) => { +const props = defineProps<{ property: PopoverProperty }>(); + +const activeIndex = ref(0); // 选中 index + +/** 处理选中 */ +function handleActive(index: number) { activeIndex.value = index; -}; +} + - - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/property.vue similarity index 96% rename from apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/property.vue rename to apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/property.vue index 7f41d413c..189b6b068 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/popover/property.vue @@ -13,11 +13,13 @@ import { import UploadImg from '#/components/upload/image-upload.vue'; import { AppLinkInput, Draggable } from '#/views/mall/promotion/components'; -// 弹窗广告属性面板 +/** 弹窗广告属性面板 */ defineOptions({ name: 'PopoverProperty' }); const props = defineProps<{ modelValue: PopoverProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); @@ -53,5 +55,3 @@ const formData = useVModel(props, 'modelValue', emit); - -