mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 关闭语音开关后清除模型id
--bug=1047571 --user=刘瑞斌 【github#1376】【应用】在应用处关闭语音模型开关,去模型处删除模型,提示关联了一个应用,无法删除该模型。 https://www.tapd.cn/57709429/s/1601917
This commit is contained in:
parent
a377ce6e7b
commit
7ed2d11630
|
|
@ -326,7 +326,7 @@
|
|||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||
</el-tooltip> -->
|
||||
</div>
|
||||
<el-switch size="small" v-model="applicationForm.stt_model_enable" />
|
||||
<el-switch size="small" v-model="applicationForm.stt_model_enable" @change="sttModelEnableChange"/>
|
||||
</div>
|
||||
</template>
|
||||
<el-select
|
||||
|
|
@ -406,7 +406,7 @@
|
|||
<el-icon class="mr-4"><Setting /></el-icon>
|
||||
设置
|
||||
</el-button>
|
||||
<el-switch size="small" v-model="applicationForm.tts_model_enable" />
|
||||
<el-switch size="small" v-model="applicationForm.tts_model_enable" @change="ttsModelEnableChange"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -820,6 +820,19 @@ function ttsModelChange() {
|
|||
}
|
||||
}
|
||||
|
||||
function ttsModelEnableChange() {
|
||||
if (!applicationForm.value.tts_model_enable) {
|
||||
applicationForm.value.tts_model_id = ''
|
||||
applicationForm.value.tts_type = 'BROWSER'
|
||||
}
|
||||
}
|
||||
|
||||
function sttModelEnableChange() {
|
||||
if (!applicationForm.value.stt_model_enable) {
|
||||
applicationForm.value.stt_model_id = ''
|
||||
}
|
||||
}
|
||||
|
||||
function getProvider() {
|
||||
loading.value = true
|
||||
model
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||
</el-tooltip> -->
|
||||
</div>
|
||||
<el-switch size="small" v-model="form_data.stt_model_enable" />
|
||||
<el-switch size="small" v-model="form_data.stt_model_enable" @change="sttModelEnableChange"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -141,7 +141,7 @@
|
|||
</el-icon>
|
||||
设置
|
||||
</el-button>
|
||||
<el-switch size="small" v-model="form_data.tts_model_enable" />
|
||||
<el-switch size="small" v-model="form_data.tts_model_enable" @change="ttsModelEnableChange"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -323,6 +323,20 @@ function ttsModelChange() {
|
|||
}
|
||||
}
|
||||
|
||||
function ttsModelEnableChange() {
|
||||
if (!form_data.value.tts_model_enable) {
|
||||
form_data.value.tts_model_id = ''
|
||||
form_data.value.tts_type = 'BROWSER'
|
||||
}
|
||||
}
|
||||
|
||||
function sttModelEnableChange() {
|
||||
if (!form_data.value.stt_model_enable) {
|
||||
form_data.value.stt_model_id = ''
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const openTTSParamSettingDialog = () => {
|
||||
const model_id = form_data.value.tts_model_id
|
||||
if (!model_id) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue