This commit is contained in:
lb
2023-03-30 09:31:26 +08:00
parent 15978f6055
commit 6ccfef90f6
4 changed files with 66 additions and 7 deletions

View File

@@ -317,7 +317,14 @@ export default {
.get(this.urls.base + `/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res && res.code === 0) {
this.dataForm = __pick(res.data, Object.keys(this.dataForm));
if (res.data) this.dataForm = __pick(res.data, Object.keys(this.dataForm));
else {
this.$message({
message: '后端返回的数据为 null',
type: 'error',
duration: 2000
})
}
/** 格式化文件上传列表 */
if (Array.isArray(this.dataForm.files)) {
this.dataForm.files = this.dataForm.files.map((file) => ({