[update] 修改bug80633

This commit is contained in:
lideqin
2024-01-10 15:04:43 +08:00
parent 83efe1be32
commit 7ba7df22c6
+4 -1
View File
@@ -663,7 +663,7 @@ export default {
submit () {
this.$refs.ruleForm.validate(valid => {
if (valid) {
const formInline = JSON.parse(JSON.stringify(this.formInline))
const formInline = { ...this.formInline }
Object.keys(formInline).forEach(res => {
if (formInline[res] instanceof Array) {
if (formInline[res][0] instanceof Object) {
@@ -672,6 +672,9 @@ export default {
} else {
formInline[res] = formInline[res].join(',')
}
} else if (typeof formInline[res] === 'undefined') {
// 说明是undefined,改成空字符串,为了解决下拉框改成undefined时,不会传给后端该字段,改不了下拉框值的问题
formInline[res] = ''
}
})
this.$emit('submitFormData', formInline)