This commit is contained in:
X1627315083
2023-12-12 14:34:57 +08:00
parent c70abb9867
commit d2dfcd4c45
6 changed files with 92 additions and 49 deletions

View File

@@ -593,27 +593,29 @@ export default defineComponent({
}
},
deleteFile(item: any) {
if (item.type_ == "generate" || item.type_ == "material") {
let maxImg = 8
if(this.type_.type2 == 'Sketchboard'){
maxImg = 20
}
item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:maxImg})
this.store.commit("addGenerateMaterialFils", item);
} else {
this.sketchboardList =
this.store.state.UploadFilesModule.moodboardFiles;
let moodboard;
this.store.state.UploadFilesModule.moodboardFiles.forEach(
(items: any, index: Number) => {
if (items.id_ == item.id_) {
moodboard = index;
}
}
);
this.sketchboardList.splice(moodboard, 1);
this.store.commit("setSketchboardFile", this.sketchboardList);
}
// this.sketchboardList
this.sketchboardList.splice(item, 1);
// if (item.type_ == "generate" || item.type_ == "material") {
// let maxImg = 8
// if(this.type_.type2 == 'Sketchboard'){
// maxImg = 20
// }
// item.jsContent1 = this.t('uploadFile.jsContent1',{maxImg:maxImg})
// this.store.commit("addGenerateMaterialFils", item);
// } else {
// this.sketchboardList =
// this.store.state.UploadFilesModule.moodboardFiles;
// let moodboard;
// this.store.state.UploadFilesModule.moodboardFiles.forEach(
// (items: any, index: Number) => {
// if (items.id_ == item.id_) {
// moodboard = index;
// }
// }
// );
// this.sketchboardList.splice(moodboard, 1);
// this.store.commit("setSketchboardFile", this.sketchboardList);
// }
},
likeFile(item:any,str:string){
if(str == 'like'){