Commit 2dfc6182 authored by nick zheng's avatar nick zheng

chore: 数字人生成新建弹窗清空内容后再次打开没有默认数据

parent f884cfe2
......@@ -4,7 +4,7 @@ import CustomModal from '@/components/custom-modal/custom-modal.vue'
import { ScreenType } from '@/store/types/creation'
import { formatDateTime } from '@/utils/date-formatter'
import { FormInst } from 'naive-ui'
import { computed, reactive, ref } from 'vue'
import { computed, reactive, ref, watch } from 'vue'
interface Props {
isShowModal: boolean
......@@ -51,6 +51,16 @@ const showModal = computed({
},
})
watch(
() => showModal.value,
(newValue) => {
if (newValue) {
digitalHumanVideoFormData.title = '新建數字人視頻' + formatDateTime(new Date())
digitalHumanVideoFormData.pageLayout = ScreenType.PORTRAIT
}
},
)
function handleUpdatePageLayout(pageLayout: ScreenType) {
digitalHumanVideoFormData.pageLayout = pageLayout
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment