refactor: 优化样式
This commit is contained in:
parent
cfbec5c44c
commit
e6c271dd81
@ -21,7 +21,12 @@ template
|
|||||||
:prop="key"
|
:prop="key"
|
||||||
:rules="getValidationRules(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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<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() {
|
function saveConfig() {
|
||||||
platformApi.updateConfig(currentPlatform, loading).then((res: any) => {
|
platformApi.updateConfig(currentPlatform, loading).then((res: any) => {
|
||||||
MsgSuccess('保存成功')
|
MsgSuccess('保存成功')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user