File tree Expand file tree Collapse file tree 2 files changed +31
-4
lines changed
Expand file tree Collapse file tree 2 files changed +31
-4
lines changed Original file line number Diff line number Diff line change 326326 <AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
327327 </el-tooltip> -->
328328 </div >
329- <el-switch size =" small" v-model =" applicationForm.stt_model_enable" />
329+ <el-switch size =" small" v-model =" applicationForm.stt_model_enable" @change = " sttModelEnableChange " />
330330 </div >
331331 </template >
332332 <el-select
406406 <el-icon class =" mr-4" ><Setting /></el-icon >
407407 设置
408408 </el-button >
409- <el-switch size =" small" v-model =" applicationForm.tts_model_enable" />
409+ <el-switch size =" small" v-model =" applicationForm.tts_model_enable" @change = " ttsModelEnableChange " />
410410 </div >
411411 </div >
412412 </template >
@@ -820,6 +820,19 @@ function ttsModelChange() {
820820 }
821821}
822822
823+ function ttsModelEnableChange() {
824+ if (! applicationForm .value .tts_model_enable ) {
825+ applicationForm .value .tts_model_id = ' '
826+ applicationForm .value .tts_type = ' BROWSER'
827+ }
828+ }
829+
830+ function sttModelEnableChange() {
831+ if (! applicationForm .value .stt_model_enable ) {
832+ applicationForm .value .stt_model_id = ' '
833+ }
834+ }
835+
823836function getProvider() {
824837 loading .value = true
825838 model
Original file line number Diff line number Diff line change 6060 <AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
6161 </el-tooltip> -->
6262 </div >
63- <el-switch size =" small" v-model =" form_data.stt_model_enable" />
63+ <el-switch size =" small" v-model =" form_data.stt_model_enable" @change = " sttModelEnableChange " />
6464 </div >
6565 </template >
6666
141141 </el-icon >
142142 设置
143143 </el-button >
144- <el-switch size =" small" v-model =" form_data.tts_model_enable" />
144+ <el-switch size =" small" v-model =" form_data.tts_model_enable" @change = " ttsModelEnableChange " />
145145 </div >
146146 </div >
147147 </template >
@@ -323,6 +323,20 @@ function ttsModelChange() {
323323 }
324324}
325325
326+ function ttsModelEnableChange() {
327+ if (! form_data .value .tts_model_enable ) {
328+ form_data .value .tts_model_id = ' '
329+ form_data .value .tts_type = ' BROWSER'
330+ }
331+ }
332+
333+ function sttModelEnableChange() {
334+ if (! form_data .value .stt_model_enable ) {
335+ form_data .value .stt_model_id = ' '
336+ }
337+ }
338+
339+
326340const openTTSParamSettingDialog = () => {
327341 const model_id = form_data .value .tts_model_id
328342 if (! model_id ) {
You can’t perform that action at this time.
0 commit comments