mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
fix(settings): 修复系统设置中邮件没有更改就无法更新的问题
This commit is contained in:
@@ -94,11 +94,17 @@ export default {
|
||||
getMethod() {
|
||||
return 'put'
|
||||
},
|
||||
// 不清理的话,编辑secret,在删除提交会报错
|
||||
cleanFormValue(data) {
|
||||
if (!data['EMAIL_HOST_PASSWORD']) {
|
||||
delete data['EMAIL_HOST_PASSWORD']
|
||||
}
|
||||
Object.keys(data).forEach(
|
||||
function(key) {
|
||||
if (data[key] === null) {
|
||||
delete data[key]
|
||||
}
|
||||
}
|
||||
)
|
||||
return data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
:fields-meta="fieldsMeta"
|
||||
:get-method="getMethod"
|
||||
:has-detail-in-msg="false"
|
||||
:clean-form-value="cleanFormValue"
|
||||
/>
|
||||
</IBox>
|
||||
</template>
|
||||
@@ -56,9 +57,18 @@ export default {
|
||||
methods: {
|
||||
getMethod() {
|
||||
return 'put'
|
||||
},
|
||||
cleanFormValue(data) {
|
||||
Object.keys(data).forEach(
|
||||
function(key) {
|
||||
if (data[key] === null) {
|
||||
delete data[key]
|
||||
}
|
||||
}
|
||||
)
|
||||
return data
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user