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

perf: 优化

parent c715d899
......@@ -396,30 +396,32 @@ export default {
},
// 编辑
onEdit(data) {
data.appInfoFieldList.forEach((v) => {
if (v.fieldType == "upload") {
if (v.fieldValue) {
let arr = v.fieldValue.split(",");
v.fileList = arr.map((v, i) => {
return {
uid: i,
name: v,
status: "done",
url: v,
};
});
} else {
v.fileList = [];
}
} else if (v.fieldType == "checkbox") {
if (v.fieldValue) {
v.checkbox = v.fieldValue.split(",");
} else {
v.checkbox = [];
setTimeout(() => {
data.appInfoFieldList.forEach((v) => {
if (v.fieldType == "upload") {
if (v.fieldValue) {
let arr = v.fieldValue.split(",");
v.fileList = arr.map((v, i) => {
return {
uid: i,
name: v,
status: "done",
url: v,
};
});
} else {
v.fileList = [];
}
} else if (v.fieldType == "checkbox") {
if (v.fieldValue) {
v.checkbox = v.fieldValue.split(",");
} 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