Skip to content

Commit c6e8a4a

Browse files
committed
fix(dialog): 当dialog Form有默认值时, 关闭会被清空
1 parent f4ec90d commit c6e8a4a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/EleFormDialog.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ export default {
135135
} else {
136136
this.$nextTick(() => {
137137
this.$refs['ele-form'].$refs.form.clearValidate()
138+
this.$nextTick(() => {
139+
this.initVal = cloneDeep(this.formData)
140+
})
138141
})
139142
}
140143
}
@@ -163,9 +166,6 @@ export default {
163166
})
164167
.reverse()
165168
}
166-
},
167-
mounted() {
168-
this.initVal = cloneDeep(this.formData)
169169
}
170170
}
171171
</script>

0 commit comments

Comments
 (0)