Compare commits

...

4 Commits

Author SHA1 Message Date
Michael Bai
45fddd8b34 fix: 修复邮件测试参数传递 2021-09-24 14:14:47 +08:00
ibuler
1243b920fc perf: 修复 asset select 2021-09-24 13:14:31 +08:00
ibuler
ee3f15ea0a perf: 修复dialog 不能滚动问题 2021-09-22 17:02:01 +08:00
ibuler
76b53ddddf fix: 修复select2初始可能报错的bug
perf: 去掉debug
2021-09-18 15:03:11 +08:00
4 changed files with 21 additions and 36 deletions

View File

@@ -1,6 +1,13 @@
<template> <template>
<div class="asset-select-dialog"> <div class="asset-select-dialog">
<Select2 ref="select2" v-bind="select2Config" @input="onInputChange" @focus.stop="handleFocus" v-on="$listeners" /> <Select2
ref="select2"
v-model="select2Config.value"
v-bind="select2Config"
@input="onInputChange"
@focus.stop="handleFocus"
v-on="$listeners"
/>
<Dialog <Dialog
v-if="dialogVisible" v-if="dialogVisible"
:title="this.$t('assets.Assets')" :title="this.$t('assets.Assets')"

View File

@@ -114,7 +114,8 @@ export default {
}, },
iValue: { iValue: {
set(val) { set(val) {
if (!val) { const noValue = !this.value || this.value.length === 0
if (noValue && !this.initialized) {
return return
} }
this.$emit('input', val) this.$emit('input', val)

View File

@@ -458,9 +458,3 @@ a {
.el-table-filter__list-item:hover { .el-table-filter__list-item:hover {
color: $--color-text-primary; color: $--color-text-primary;
} }
.el-dialog__wrapper {
display: flex;
align-items: center;
justify-content: center;
}

View File

@@ -79,18 +79,9 @@ export default {
{ {
title: this.$t('setting.emailTest'), title: this.$t('setting.emailTest'),
callback: function(value, form) { callback: function(value, form) {
if (value['EMAIL_HOST_PASSWORD'] === undefined) { const testValue = {}
value['EMAIL_HOST_PASSWORD'] = '' testValue['EMAIL_FROM'] = value['EMAIL_FROM']
} testValue['EMAIL_RECIPIENT'] = value['EMAIL_RECIPIENT']
if (value['EMAIL_USE_SSL'] === undefined) {
value['EMAIL_USE_SSL'] = false
}
if (value['EMAIL_USE_TLS'] === undefined) {
value['EMAIL_USE_TLS'] = false
}
if (value['EMAIL_FROM'] === undefined) {
value['EMAIL_FROM'] = value['EMAIL_HOST_USER']
}
testEmailSetting(value).then(res => { testEmailSetting(value).then(res => {
vm.$message.success(res['msg']) vm.$message.success(res['msg'])
}).catch(res => { }).catch(res => {
@@ -100,26 +91,18 @@ export default {
} }
], ],
cleanFormValue(data) { cleanFormValue(data) {
if (!data['EMAIL_HOST_PASSWORD']) { const submitValue = {}
delete data['EMAIL_HOST_PASSWORD'] submitValue['EMAIL_RECIPIENT'] = data['EMAIL_RECIPIENT']
} submitValue['EMAIL_FROM'] = data['EMAIL_FROM']
if (!data['EMAIL_USE_SSL']) { submitValue['EMAIL_SUBJECT_PREFIX'] = data['EMAIL_SUBJECT_PREFIX']
data['EMAIL_USE_SSL'] = false Object.keys(submitValue).forEach(
}
if (!data['EMAIL_USE_TLS']) {
data['EMAIL_USE_TLS'] = false
}
if (!data['EMAIL_FROM']) {
data['EMAIL_FROM'] = data['EMAIL_HOST_USER']
}
Object.keys(data).forEach(
function(key) { function(key) {
if (data[key] === null) { if (submitValue[key] === null) {
delete data[key] delete submitValue[key]
} }
} }
) )
return data return submitValue
}, },
submitMethod() { submitMethod() {
return 'patch' return 'patch'