ui: 收敛Dify配置项并补充字段说明
变更项: 1. Dify 应用配置区保留刚需字段:name、provider_template、app_key、workflow_output_key(out key)。 2. 隐藏非刚需覆盖字段(mode/endpoint/response_mode/request_timeout),降低维护复杂度。 3. app_key 输入改为密码样式:默认小圆点展示,支持眼睛按钮切换明文。 4. 在 Provider 模板与 Dify 应用区新增字段说明提示,便于快速理解配置含义。
This commit is contained in:
@@ -43,6 +43,10 @@
|
||||
</div>
|
||||
<el-button size="mini" @click="addProvider">新增模板</el-button>
|
||||
</div>
|
||||
<div class="field-tips">
|
||||
<span>字段说明:</span>
|
||||
<span>`api_base_url`=Dify 服务地址;`endpoint`=工作流接口(常用 `workflows/run`);`mode`=workflow/chat;`request_timeout`=秒。</span>
|
||||
</div>
|
||||
<div class="section-list" v-if="catalog.providers.length">
|
||||
<el-card v-for="(item, index) in catalog.providers" :key="item.uid" class="entry-card" shadow="never">
|
||||
<div slot="header" class="entry-header">
|
||||
@@ -75,6 +79,10 @@
|
||||
</div>
|
||||
<el-button size="mini" @click="addDifyApp">新增应用</el-button>
|
||||
</div>
|
||||
<div class="field-tips">
|
||||
<span>字段说明:</span>
|
||||
<span>`name`=应用标识;`provider_template`=复用哪个公共模板;`app_key`=Dify 应用 Key;`workflow_output_key`=工作流输出字段(常用 `text`)。</span>
|
||||
</div>
|
||||
<div class="section-list" v-if="catalog.dify_apps.length">
|
||||
<el-card v-for="(item, index) in catalog.dify_apps" :key="item.uid" class="entry-card" shadow="never">
|
||||
<div slot="header" class="entry-header">
|
||||
@@ -86,12 +94,13 @@
|
||||
<el-select v-model="item.provider_template" placeholder="绑定 Provider 模板" filterable>
|
||||
<el-option v-for="name in providerNameOptions" :key="name" :label="name" :value="name"></el-option>
|
||||
</el-select>
|
||||
<el-input v-model="item.app_key" placeholder="Dify app key,例如:app-xxxx"></el-input>
|
||||
<el-input
|
||||
v-model="item.app_key"
|
||||
type="password"
|
||||
show-password
|
||||
placeholder="Dify app key,例如:app-xxxx">
|
||||
</el-input>
|
||||
<el-input v-model="item.workflow_output_key" placeholder="workflow_output_key,例如:text"></el-input>
|
||||
<el-input v-model="item.config.mode" placeholder="覆盖 mode(可选)"></el-input>
|
||||
<el-input v-model="item.config.endpoint" placeholder="覆盖 endpoint(可选)"></el-input>
|
||||
<el-input v-model="item.config.response_mode" placeholder="覆盖 response_mode(可选)"></el-input>
|
||||
<el-input-number v-model="item.config.request_timeout" :min="1" :step="1" placeholder="覆盖 request_timeout(可选)"></el-input-number>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -475,6 +484,18 @@
|
||||
.workspace-header h3 { font-size: 18px; margin-bottom: 4px; }
|
||||
.workspace-header p { font-size: 13px; color: #64748b; }
|
||||
.config-meta { display: flex; gap: 12px; color: #64748b; font-size: 12px; flex-wrap: wrap; }
|
||||
.field-tips {
|
||||
margin: 0 0 12px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 10px;
|
||||
background: rgba(15, 23, 42, 0.04);
|
||||
color: #475569;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.section-list { display: flex; flex-direction: column; gap: 12px; }
|
||||
.entry-card { border: 1px solid rgba(148,163,184,0.16); border-radius: 14px; }
|
||||
.entry-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
||||
|
||||
Reference in New Issue
Block a user