新增模型配置启用开关禁用判断

This commit is contained in:
lww155
2026-02-05 16:46:10 +08:00
parent fa523dc615
commit 75e24af858
6 changed files with 21 additions and 0 deletions
@@ -97,7 +97,23 @@
</el-table-column>
<el-table-column :label="$t('modelConfig.isEnabled')" align="center">
<template slot-scope="scope">
<el-tooltip
v-if="scope.row.isDefault === 1 && scope.row.isEnabled === 1"
:content="$t('modelConfig.defaultModelCannotDisable')"
placement="top"
effect="light"
>
<el-switch
v-model="scope.row.isEnabled"
class="custom-switch"
:active-value="1"
:inactive-value="0"
disabled
@change="handleStatusChange(scope.row)"
/>
</el-tooltip>
<el-switch
v-else
v-model="scope.row.isEnabled"
class="custom-switch"
:active-value="1"