mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-23 15:43:54 +08:00
feat(模型管理): 添加模型副本创建功能
在模型编辑对话框中增加副本创建功能,当选择创建副本时自动在原模型名称和代码后添加'_副本'后缀,并通过新增API接口保存为新模型
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
class="center-dialog" >
|
||||
<div style="margin: 0 18px; text-align: left; padding: 10px; border-radius: 10px;">
|
||||
<div style="font-size: 30px; color: #3d4566; margin-top: -10px; margin-bottom: 10px; text-align: center;">
|
||||
修改模型
|
||||
{{ modelData.duplicateMode ? '创建副本' : '修改模型' }}
|
||||
</div>
|
||||
|
||||
<button class="custom-close-btn" @click="dialogVisible = false">
|
||||
@@ -190,6 +190,11 @@ export default {
|
||||
Api.model.getModelConfig(this.modelData.id, ({ data }) => {
|
||||
if (data.code === 0 && data.data) {
|
||||
const model = data.data;
|
||||
|
||||
if (this.modelData.duplicateMode) {
|
||||
model.modelName = this.modelData.modelName + '_副本';
|
||||
model.modelCode = this.modelData.modelCode + '_副本';
|
||||
}
|
||||
this.pendingProviderType = model.configJson.type;
|
||||
this.pendingModelData = model;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user