From d7cea8be392b0f3c5fef0171df0422b8f70a58ed Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Nov 2025 21:42:23 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91video-player?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/mobile/video-player/config.ts | 19 +++++++------------ .../components/mobile/video-player/index.vue | 13 ++----------- .../mobile/video-player/property.vue | 8 ++++---- 3 files changed, 13 insertions(+), 27 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/config.ts index bc9195575..ab7ccd311 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/config.ts +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/config.ts @@ -2,23 +2,18 @@ import type { ComponentStyle, DiyComponent } from '../../../util'; /** 视频播放属性 */ export interface VideoPlayerProperty { - // 视频链接 - videoUrl: string; - // 封面链接 - posterUrl: string; - // 是否自动播放 - autoplay: boolean; - // 组件样式 - style: VideoPlayerStyle; + videoUrl: string; // 视频链接 + posterUrl: string; // 封面链接 + autoplay: boolean; // 是否自动播放 + style: VideoPlayerStyle; // 组件样式 } -// 视频播放样式 +/** 视频播放样式 */ export interface VideoPlayerStyle extends ComponentStyle { - // 视频高度 - height: number; + height: number; // 视频高度 } -// 定义组件 +/** 定义组件 */ export const component = { id: 'VideoPlayer', name: '视频播放', diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/index.vue index ddd448d96..b58577d5b 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/index.vue @@ -11,13 +11,13 @@ defineProps<{ property: VideoPlayerProperty }>(); - - diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue index 67c355905..c576d8f76 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/video-player/property.vue @@ -9,11 +9,13 @@ import UploadImg from '#/components/upload/image-upload.vue'; import ComponentContainerProperty from '../../component-container-property.vue'; -// 视频播放属性面板 +/** 视频播放属性面板 */ defineOptions({ name: 'VideoPlayerProperty' }); const props = defineProps<{ modelValue: VideoPlayerProperty }>(); + const emit = defineEmits(['update:modelValue']); + const formData = useVModel(props, 'modelValue', emit); @@ -58,6 +60,4 @@ const formData = useVModel(props, 'modelValue', emit); - - - + \ No newline at end of file