Commit ccc65637 authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

fix: 弹窗清空内容后再次打开没有默认数据

See merge request !22
parents 845b5a98 f884cfe2
<script setup lang="ts">
import { computed, reactive, ref } from 'vue'
import { computed, reactive, ref, watch } from 'vue'
import { FormInst } from 'naive-ui'
import CustomModal from '@/components/custom-modal/custom-modal.vue'
import CustomIcon from '@/components/custom-icon/custom-icon.vue'
......@@ -50,6 +50,16 @@ const showModal = computed({
},
})
watch(
() => showModal.value,
(newValue) => {
if (newValue) {
digitalHumanDialogueFormData.title = '新建對話' + formatDateTime(new Date())
digitalHumanDialogueFormData.pageLayout = 'vertical'
}
},
)
function handleUpdatePageLayout(pageLayout: 'vertical' | 'horizontal') {
digitalHumanDialogueFormData.pageLayout = pageLayout
}
......
......@@ -39,9 +39,9 @@ const showModal = computed({
})
watch(
() => props.configTitle,
(newValue) => {
digitalHumanDialogueFormData.title = (newValue + '副本').slice(0, 30)
() => showModal.value,
() => {
digitalHumanDialogueFormData.title = (props.configTitle + '副本').slice(0, 30)
},
)
......
......@@ -39,9 +39,9 @@ const showModal = computed({
})
watch(
() => props.draftName,
(newValue) => {
digitalHumanDraftFormData.draftName = (newValue + '副本').slice(0, 30)
() => showModal.value,
() => {
digitalHumanDraftFormData.draftName = (props.draftName + '副本').slice(0, 30)
},
)
......
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