Commit 2310e2e0 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化

parent c715d899
...@@ -396,30 +396,32 @@ export default { ...@@ -396,30 +396,32 @@ export default {
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
data.appInfoFieldList.forEach((v) => { setTimeout(() => {
if (v.fieldType == "upload") { data.appInfoFieldList.forEach((v) => {
if (v.fieldValue) { if (v.fieldType == "upload") {
let arr = v.fieldValue.split(","); if (v.fieldValue) {
v.fileList = arr.map((v, i) => { let arr = v.fieldValue.split(",");
return { v.fileList = arr.map((v, i) => {
uid: i, return {
name: v, uid: i,
status: "done", name: v,
url: v, status: "done",
}; url: v,
}); };
} else { });
v.fileList = []; } else {
} v.fileList = [];
} else if (v.fieldType == "checkbox") { }
if (v.fieldValue) { } else if (v.fieldType == "checkbox") {
v.checkbox = v.fieldValue.split(","); if (v.fieldValue) {
} else { v.checkbox = v.fieldValue.split(",");
v.checkbox = []; } else {
v.checkbox = [];
}
} }
} });
}); this.form = { ...data };
this.form = { ...data }; }, 10);
}, },
// 更改文件名称 // 更改文件名称
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment