This commit is contained in:
WangXiaoDong
2023-09-25 10:09:00 +08:00
parent 173f35042d
commit d9868d5cf0
37 changed files with 1618 additions and 1146 deletions

View File

@@ -56,7 +56,7 @@
</div>
<div
class="upload_file_item upload_component"
v-show="moodboarList.length != 8"
v-show="moodboarList.length < 8"
>
<a-upload
:action="uploadUrl + '/api/element/upload'"
@@ -74,7 +74,7 @@
>
<div
class="upload_tip_block"
v-show=" moodboarList.length != 8"
v-show=" moodboarList.length < 8"
>
<i class="fi fi-br-upload"></i>
<!-- <img class="upload_img_icon" src="@/assets/images/homePage/add_file.png"> -->
@@ -169,8 +169,6 @@ export default defineComponent({
let layoutOpen = ref(false)
let loadingShow = ref(false)
let modalImg:any= computed(()=>{
console.log(store.state.UploadFilesModule.disposeMoodboard);
return store.state.UploadFilesModule.disposeMoodboard
})
return {
@@ -273,7 +271,7 @@ export default defineComponent({
);
let arr = this.store.state.UploadFilesModule.moodboard
if(arr.length >= 8){
message.error('You can select up to 8 images')
message.warning('You can select up to 8 images')
}else{
this.store.commit("setMoodboardFile", fileList);
}
@@ -297,11 +295,11 @@ export default defineComponent({
file.type === "image/jpg" ||
file.type === "image/bmp";
if (!isJpgOrPng) {
message.error("You can only upload Image file!");
message.warning("You can only upload Image file!");
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
message.error("Image must smaller than 5MB!");
message.warning("Image must smaller than 2MB!");
}
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
},
@@ -323,7 +321,8 @@ export default defineComponent({
this.store.commit("setMoodboardFile", this.fileList);
}
if(this.store.state.UploadFilesModule.moodboard.length == 0){
this.store.commit("setDisposeMoodboard", {});
this.store.commit("clearMoodTemplateId");
this.layoutList = []
}
},
recollection() {
@@ -353,6 +352,7 @@ export default defineComponent({
setboard.moodboard.push(v)
}
})
this.store.commit("setMoodboardGenerateFiles", setboard.generate);
this.store.commit("setMoodboardMaterialFiles", setboard.material);
this.store.commit("setMoodboardFile", setboard.moodboard);
@@ -366,7 +366,7 @@ export default defineComponent({
// layout.init('moodboard')
layout.init()
}else{
message.error('Please click Layout to sort randomlys')
message.warning('Please click Layout to sort randomlys')
}
},
@@ -460,10 +460,10 @@ export default defineComponent({
content: "";
display: block;
background: #000;
height: 3px;
height: .3rem;
left: 50%;
transform: translateX(-50%);
bottom: 6px;
bottom: .6rem;
width: 0px;
transition: 0.3s all;
}