格式化ImageUpload组件中的对象字面量

master
wxy 2024-09-09 16:35:28 +08:00
parent a16f39473d
commit bc62c2f8e5
1 changed files with 3 additions and 2 deletions

View File

@ -92,7 +92,7 @@ export default {
//
this.fileList = list.map(item => {
if (typeof item === "string") {
item = { name: item, url: item };
item = {name: item, url: item};
}
return item;
});
@ -150,7 +150,7 @@ export default {
//
handleUploadSuccess(res, file) {
if (res.code === 200) {
this.uploadList.push({ name: res.data.url, url: res.data.url });
this.uploadList.push({name: res.data.url, url: res.data.url});
this.uploadedSuccessfully();
} else {
this.number--;
@ -207,6 +207,7 @@ export default {
::v-deep.hide .el-upload--picture-card {
display: none;
}
//
::v-deep .el-list-enter-active,
::v-deep .el-list-leave-active {