zjs_project 1 ماه پیش
والد
کامیت
b2bcbda0ea
1فایلهای تغییر یافته به همراه16 افزوده شده و 0 حذف شده
  1. 16 0
      src/components/newQCCom/viewMask/viewMask.vue

+ 16 - 0
src/components/newQCCom/viewMask/viewMask.vue

@@ -319,7 +319,21 @@
 				this.currentIndex = e.detail?e.detail.current:e;
 				this.checked = this.aiImagesList[this.currentIndex].checked;
 				console.warn("***swiperChangeImg***",this.checked);//更新到页面上的数据
+                this.syncData(this.aiImagesList[this.currentIndex]);
 			},
+            //同步空间数据
+            syncData(aiObj){
+                if(!aiObj){
+                    return false
+                }
+                if(aiObj.spaceId == this.spaceObj.spaceId){
+                    return false
+                }
+                this.$parent.changeSpace(aiObj.spaceId);
+                this.curStyleIndex = aiObj.styleIndex;
+                this.themeIndex = aiObj.themeIndex;
+                console.warn("***syncData-space***",aiObj)
+            },
 			//切换空间
 			changeSpace(item){
 				this.$parent.changeSpace(item.spaceId);
@@ -1083,6 +1097,8 @@
 					checked:false,
 					list:[newImage],
 					spaceId:this.curSpaceId,//记录下当前生成的AI图是哪个空间的,因为会切换空间
+					styleIndex:this.curStyleIndex,//记录下当前生成的AI图是哪个风格的
+					themeIndex:this.themeIndex,//记录下当前生成的AI图是哪个主题的
 				}
 				this.aiImagesList.push(_data);
                 this.$nextTick(()=>{