修复默认值给定错误的问题

This commit is contained in:
aixianling
2024-10-31 11:34:32 +08:00
parent 34eb7320fa
commit 96d24a8b22

View File

@@ -101,7 +101,7 @@ export default {
},
data() {
return {
form: {apps: [], type: null, sysInfo: {}, customPath: ""},
form: {apps: [], type: null, sysInfo: {}, customPath: "", extra: {}},
rules: {
name: {required: true, message: "请输入"},
type: {required: true, message: "请选择"},
@@ -137,7 +137,7 @@ export default {
params: {id}
}).then(res => {
if (res?.data) {
this.form = {extra: {}, ...this.form, ...res.data}
this.form = {...this.form, ...res.data}
}
})
},