feat: 功能优化
This commit is contained in:
@@ -113,8 +113,11 @@ import { MaterialService } from '@/api/material'
|
||||
import { useUpload } from '@/composables/useUpload'
|
||||
import dayjs from 'dayjs'
|
||||
import BasicLayout from '@/layouts/components/BasicLayout.vue'
|
||||
import { VOICE_PROVIDER_OPTIONS, DEFAULT_VOICE_PROVIDER } from '@/config/voiceConfig'
|
||||
|
||||
// ========== 常量 ==========
|
||||
const PROVIDER_OPTIONS = VOICE_PROVIDER_OPTIONS
|
||||
|
||||
const DEFAULT_FORM_DATA = {
|
||||
id: null,
|
||||
name: '',
|
||||
@@ -122,7 +125,8 @@ const DEFAULT_FORM_DATA = {
|
||||
autoTranscribe: true,
|
||||
language: 'zh-CN',
|
||||
gender: 'female',
|
||||
note: ''
|
||||
note: '',
|
||||
providerType: DEFAULT_VOICE_PROVIDER
|
||||
}
|
||||
|
||||
// ========== 响应式数据 ==========
|
||||
@@ -183,7 +187,8 @@ const fillFormData = (data) => {
|
||||
fileId: data.fileId || null,
|
||||
language: data.language || 'zh-CN',
|
||||
gender: data.gender || 'female',
|
||||
note: data.note || ''
|
||||
note: data.note || '',
|
||||
providerType: data.providerType || DEFAULT_VOICE_PROVIDER
|
||||
})
|
||||
}
|
||||
|
||||
@@ -363,7 +368,8 @@ const handleSubmit = async () => {
|
||||
autoTranscribe: formData.autoTranscribe,
|
||||
language: formData.language,
|
||||
gender: formData.gender,
|
||||
note: formData.note
|
||||
note: formData.note,
|
||||
providerType: formData.providerType
|
||||
}
|
||||
: {
|
||||
id: formData.id,
|
||||
|
||||
Reference in New Issue
Block a user