Skip to content

Commit

Permalink
fix: model params config show empty config
Browse files Browse the repository at this point in the history
--bug=1050877 --user=刘瑞斌 【模型管理】-添加模型时,在高级设置中删除所有默认参数后,不展示参数添加按钮,无法再次添加参数 https://www.tapd.cn/57709429/s/1637477
  • Loading branch information
liuruibin committed Dec 26, 2024
1 parent 91afbcd commit 6fab88e
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions ui/src/views/template/component/CreateModelDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@
</el-tab-pane>
<el-tab-pane label="高级设置" name="advanced-info">
<el-empty
v-if="base_form_data.model_params_form?.length === 0"
v-if="!base_form_data.model_type || !base_form_data.model_name"
description="请先选择基础信息的模型类型和基础模型"
/>
<div class="flex-between mb-8" v-else>
<h5>模型参数</h5>
<el-button type="text" @click.stop="openAddDrawer()">
<el-button type="text" @click.stop="openAddDrawer()" :disabled="base_form_data.model_type !== 'TTS' && base_form_data.model_type !== 'LLM' && base_form_data.model_type !== 'IMAGE' && base_form_data.model_type !== 'TTI'">
<AppIcon iconName="Plus" class="add-icon" />添加
</el-button>
</div>
Expand Down Expand Up @@ -221,14 +221,7 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="close">取消</el-button>
<el-button
v-if="base_form_data.model_params_form?.length === 0"
type="primary"
@click="openAddDrawer"
>
添加
</el-button>
<el-button v-else type="primary" @click="submit" :loading="loading"> 添加 </el-button>
<el-button type="primary" @click="submit" :loading="loading"> 添加 </el-button>
</span>
</template>
</el-dialog>
Expand Down

0 comments on commit 6fab88e

Please sign in to comment.