gemercheung 9 meses atrás
pai
commit
900ff15330

+ 3 - 2
src/App.vue

@@ -15,7 +15,7 @@
             <n-icon size="24" :component="ChevronBackOutline" />
             <span style="position: relative; top: -6px">返回我的场景</span>
           </div>
-          <n-button type="primary"> 保存</n-button>
+          <n-button type="primary"> 保存 </n-button>
         </div>
       </n-layout-header>
       <n-layout
@@ -58,7 +58,8 @@
               ref="sceneRef"
               :style="{
                 width: sceneRefWidth,
-                display: showScene ? 'none' : 'block'
+                visibility: showScene ? 'hidden' : 'visible',
+                // display: showScene ? 'none' : 'block'
               }"
             >
               <iframe

+ 5 - 0
src/views/digitalHuman/index.vue

@@ -147,6 +147,7 @@ import { useMainStore } from '@/store'
 defineProps<{ msg: string }>()
 const main = useMainStore()
 const active = ref(true)
+
 const editData = reactive({
   show: false,
   type: '',
@@ -170,8 +171,12 @@ const editData = reactive({
     fileList: []
   }
 })
+
+
+
 const activeType = ref('list')
 const { setWidthSceneRef } = main
+
 const digitalHumanList = computed(() => {
   return main.digitalHumanList
 })

+ 4 - 0
src/views/textToaudio/index.vue

@@ -21,11 +21,15 @@
     />
     <TtsModel
       :show="showTTSModel.show"
+      :is-editing="showTTSModel.isEditing"
+      :data="showTTSModel.data"
       @close="showTTSModel.show = false"
     ></TtsModel>
 
     <SttModel
       :show="showSTTModel.show"
+      :is-editing="showSTTModel.isEditing"
+      :data="showSTTModel.data"
       @close="showSTTModel.show = false"
     ></SttModel>
   </div>

+ 8 - 0
src/views/textToaudio/sttModel.vue

@@ -76,6 +76,14 @@ const props = defineProps({
   show: {
     type: Boolean,
     default: false
+  },
+  isEditing: {
+    type: Boolean,
+    default: false
+  },
+  data: {
+    type: Object,
+    default: () => {}
   }
 })
 const handleShow = (show: boolean) => {

+ 16 - 1
src/views/textToaudio/ttsModel.vue

@@ -111,6 +111,7 @@ import { useMainStore } from '@/store'
 const main = useMainStore()
 const showModal = ref(false)
 
+const formId = ref()
 const form = reactive({
   document: '',
   voiceType: 0,
@@ -118,12 +119,20 @@ const form = reactive({
   volume: 0.5
 })
 
-const emits = defineEmits(['close','submit'])
+const emits = defineEmits(['close', 'submit'])
 
 const props = defineProps({
   show: {
     type: Boolean,
     default: false
+  },
+  isEditing: {
+    type: Boolean,
+    default: false
+  },
+  data: {
+    type: Object,
+    default: () => {}
   }
 })
 const handleShow = (show: boolean) => {
@@ -177,6 +186,12 @@ const activeType = computed(() => (type) => form.voiceType === type)
 
 watchEffect(() => {
   showModal.value = props.show
+  if (props.isEditing) {
+    formId.value = props.data.id
+    console.log('props.data', props.data)
+    form.document = props.data.document
+    // form.document = props.data.document
+  }
 })
 </script>
 <style scoped lang="scss">