mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
refactor: 优化样式
This commit is contained in:
parent
cfbec5c44c
commit
e6c271dd81
|
|
@ -21,7 +21,12 @@ template
|
|||
:prop="key"
|
||||
:rules="getValidationRules(key)"
|
||||
>
|
||||
<el-input v-model="currentPlatform.config[key]" :default-value="''"></el-input>
|
||||
<el-input
|
||||
v-model="currentPlatform.config[key]"
|
||||
:type="isPasswordField(key) ? 'password' : 'text'"
|
||||
:show-password="isPasswordField(key)"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
|
@ -144,6 +149,10 @@ function validateConnection() {
|
|||
})
|
||||
}
|
||||
|
||||
const passwordFields = new Set(['app_secret', 'client_secret', 'secret'])
|
||||
|
||||
const isPasswordField = (key: any) => passwordFields.has(key)
|
||||
|
||||
function saveConfig() {
|
||||
platformApi.updateConfig(currentPlatform, loading).then((res: any) => {
|
||||
MsgSuccess('保存成功')
|
||||
|
|
|
|||
Loading…
Reference in New Issue