2023-11-2-1
This commit is contained in:
@@ -120,23 +120,27 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="moodboarList.length > 1" class="modal_accomplish">
|
||||
<div v-show="moodboarList.length > 1 || edieShow" class="modal_accomplish">
|
||||
<div class="modal_text">
|
||||
<div>Layout of selected moodboard</div>
|
||||
<div class="modal_btn started_btn" @click.stop="changeTemplateModal()">Edit</div>
|
||||
</div>
|
||||
<div v-if="!modalImg[0]?.id" class="modal_img" id="modal_img" :class="{active:flex_direction}">
|
||||
<div v-for="item,index in layoutList" :class="[moodb_className[index]]" class="modal_imgItem">
|
||||
<img :src="item.imgUrl" v-modelImg>
|
||||
<div class="modal_img_max">
|
||||
<div v-if="!modalImg[0]?.id" class="modal_img" id="modal_img" :class="{active:flex_direction}">
|
||||
<div v-for="item,index in layoutList" :class="[moodb_className[index]]" class="modal_imgItem">
|
||||
<img :src="item.imgUrl" v-modelImg>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="modal_img">
|
||||
<img :src="modalImg[0].imgUrl">
|
||||
</div>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="modal_img">
|
||||
<img :src="modalImg[0].imgUrl">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<layout ref="layout" :moodb_className="moodb_className" :flex_direction="flex_direction" @setmoodbClass="setmoodbClass"></layout>
|
||||
|
||||
@@ -177,6 +181,7 @@ export default defineComponent({
|
||||
return store.state.UploadFilesModule.disposeMoodboard
|
||||
})
|
||||
let uploading:any = ref([])
|
||||
let edieShow:any = ref()
|
||||
let {t} = useI18n()
|
||||
return {
|
||||
fileList,
|
||||
@@ -192,6 +197,7 @@ export default defineComponent({
|
||||
loadingShow,
|
||||
modalImg,
|
||||
uploading,
|
||||
edieShow,
|
||||
t,
|
||||
};
|
||||
},
|
||||
@@ -352,6 +358,7 @@ export default defineComponent({
|
||||
if(this.store.state.UploadFilesModule.moodboard.length == 0){
|
||||
this.store.commit("clearMoodTemplateId");
|
||||
this.layoutList = []
|
||||
this.edieShow = false
|
||||
}
|
||||
},
|
||||
recollection() {
|
||||
@@ -372,8 +379,6 @@ export default defineComponent({
|
||||
material:[] as any,
|
||||
moodboard:[] as any,
|
||||
}
|
||||
console.log(disposeMoodboard);
|
||||
|
||||
arr.forEach((v:any)=>{
|
||||
if(v.type_.type1 == 'generate'){
|
||||
setboard.generate.push(v)
|
||||
@@ -391,7 +396,7 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
changeTemplateModal() {
|
||||
if(this.layoutOpen){
|
||||
if(this.modalImg[0]?.id){
|
||||
let layout:any = this.$refs.layout
|
||||
// layout.init('moodboard')
|
||||
layout.init()
|
||||
@@ -402,6 +407,7 @@ export default defineComponent({
|
||||
},
|
||||
layout(){
|
||||
this.loadingShow = true
|
||||
this.edieShow = true
|
||||
this.store.commit("setDisposeMoodboard", []);
|
||||
let arr = JSON.parse(JSON.stringify(this.store.state.UploadFilesModule.moodboard))
|
||||
this.layoutList = arr
|
||||
@@ -412,10 +418,13 @@ export default defineComponent({
|
||||
}else{
|
||||
this.flex_direction = false
|
||||
}
|
||||
if(JSON.stringify(this.moodb_className) == JSON.stringify(this.moodb_[arr.length-1][random])){
|
||||
this.layout()
|
||||
return
|
||||
if(this.moodb_[arr.length-1].length != 1){
|
||||
if(JSON.stringify(this.moodb_className) == JSON.stringify(this.moodb_[arr.length-1][random])){
|
||||
this.layout()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if(this.moodb_[arr.length-1].length == 2){
|
||||
this.moodb_className = this.moodb_[arr.length-1][0]
|
||||
}else{
|
||||
@@ -555,6 +564,8 @@ export default defineComponent({
|
||||
.modal_right{
|
||||
flex: 1;
|
||||
margin-left: 3rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.modal_layout,.modal_accomplish{
|
||||
.modal_text{
|
||||
font-size: 1.2rem;
|
||||
@@ -609,19 +620,30 @@ export default defineComponent({
|
||||
// margin-top: 2rem;
|
||||
height: 30rem;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
.modal_text{
|
||||
padding-top: 2rem;
|
||||
padding-block: 2rem;
|
||||
}
|
||||
.modal_img_max{
|
||||
// flex: 1;
|
||||
height: 35rem;
|
||||
position: relative;
|
||||
.mark_loading{
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
.modal_img{
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
>img{
|
||||
// height: 100%;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user