diff --git a/components/aigc/generation/TitlesTemplate.vue b/components/aigc/generation/TitlesTemplate.vue index 66865ae..e21bee9 100644 --- a/components/aigc/generation/TitlesTemplate.vue +++ b/components/aigc/generation/TitlesTemplate.vue @@ -17,18 +17,55 @@ const emit = defineEmits({ }) const loginState = useLoginState() + +const isPreviewModalOpen = ref(false) +const previewVideoUrl = ref(null) + +const previewVideo = (url: string) => { + previewVideoUrl.value = url + setTimeout(() => { + isPreviewModalOpen.value = true + }, 100) +} + +const closePreview = () => { + isPreviewModalOpen.value = false + setTimeout(() => { + previewVideoUrl.value = null + }, 100) +}