Skip to content

Commit e6c271d

Browse files
committed
refactor: 优化样式
1 parent cfbec5c commit e6c271d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ui/src/views/authentication/component/EditModal.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ template
2121
:prop="key"
2222
:rules="getValidationRules(key)"
2323
>
24-
<el-input v-model="currentPlatform.config[key]" :default-value="''"></el-input>
24+
<el-input
25+
v-model="currentPlatform.config[key]"
26+
:type="isPasswordField(key) ? 'password' : 'text'"
27+
:show-password="isPasswordField(key)"
28+
>
29+
</el-input>
2530
</el-form-item>
2631
</el-form>
2732
<template #footer>
@@ -144,6 +149,10 @@ function validateConnection() {
144149
})
145150
}
146151
152+
const passwordFields = new Set(['app_secret', 'client_secret', 'secret'])
153+
154+
const isPasswordField = (key: any) => passwordFields.has(key)
155+
147156
function saveConfig() {
148157
platformApi.updateConfig(currentPlatform, loading).then((res: any) => {
149158
MsgSuccess('保存成功')

0 commit comments

Comments
 (0)