44 v-click-outside =" handleClickOutside"
55 class =" default-model-setting-menu workflow-dropdown-menu border border-r-6 white-bg"
66 >
7- <div class =" title" >{{ $t('workflow.setting.defaultModelSetting') }}</div >
8- <el-alert :title =" $t('workflow.setting.defaultModelSettingTip')" type =" info" :closable =" false" />
7+ <div class =" title" >
8+ <h4 class =" mb-4" >{{ $t('workflow.setting.defaultModelSetting') }}</h4 >
9+ <p class =" mb-8" >
10+ <el-text type =" info" >{{ $t('workflow.setting.defaultModelSettingTip') }}</el-text >
11+ </p >
12+ </div >
13+
914 <el-scrollbar max-height =" calc(100vh - 220px)" >
1015 <el-form label-position =" top" class =" p-12" >
1116 <el-form-item v-for =" item in defaultModelTypes" :key =" item.type" :label =" item.label" >
@@ -78,11 +83,22 @@ const defaulTypeLabels: Record<string, string> = {
7883 ITV: t (' workflow.setting.modelType.ITV' ),
7984 RERANKER: t (' workflow.setting.modelType.RERANKER' ),
8085}
81- const defaultModelTypes = [' LLM' , ' TTS' , ' STT' , ' IMAGE' , ' TTI' , ' TTV' , ' ITV' , ' RERANKER' ].map ((type ) => ({
82- type ,
83- label: defaulTypeLabels [type ] || type ,
84- }))
85- const EMPTY_SETTING = { LLM: {}, TTS: {}, STT: {}, IMAGE: {}, TTI: {}, TTV: {}, ITV: {}, RERANKER: {} }
86+ const defaultModelTypes = [' LLM' , ' TTS' , ' STT' , ' IMAGE' , ' TTI' , ' TTV' , ' ITV' , ' RERANKER' ].map (
87+ (type ) => ({
88+ type ,
89+ label: defaulTypeLabels [type ] || type ,
90+ }),
91+ )
92+ const EMPTY_SETTING = {
93+ LLM: {},
94+ TTS: {},
95+ STT: {},
96+ IMAGE: {},
97+ TTI: {},
98+ TTV: {},
99+ ITV: {},
100+ RERANKER: {},
101+ }
86102
87103const modelSetting = ref <any >({ ... EMPTY_SETTING })
88104const defaultModelOptions = ref <Record <string , any >>({})
@@ -149,7 +165,8 @@ const hasChanges = computed(
149165 const base = (props .modelValue || {})[type ] || {}
150166 return (
151167 (cur .model_id || ' ' ) !== (base .model_id || ' ' ) ||
152- JSON .stringify (cur .model_params_setting || {}) !== JSON .stringify (base .model_params_setting || {})
168+ JSON .stringify (cur .model_params_setting || {}) !==
169+ JSON .stringify (base .model_params_setting || {})
153170 )
154171 }),
155172)
@@ -172,11 +189,12 @@ function handleSave() {
172189}
173190
174191function applyDefaultModelToAll() {
175- MsgConfirm (
176- t (' workflow.setting.applyToAll' ),
177- t (' workflow.setting.applyToAllConfirmMsg' ),
178- { type: ' warning' , customClass: ' apply-to-all-confirm' , center: true , confirmButtonText: t (' workflow.setting.apply' ) },
179- ).then (() => {
192+ MsgConfirm (t (' workflow.setting.applyToAll' ), t (' workflow.setting.applyToAllConfirmMsg' ), {
193+ type: ' warning' ,
194+ customClass: ' apply-to-all-confirm' ,
195+ center: true ,
196+ confirmButtonText: t (' workflow.setting.apply' ),
197+ }).then (() => {
180198 const graph = props .workflowRef ?.getGraphData ()
181199 let count = 0
182200 // 栈式遍历,循环节点内嵌 graph(loop_body)也入栈覆盖,与发布校验 validate_workflow_default_models 保持一致
0 commit comments