修复谷歌登录、红绿图丢失、submit后颜色有问题

This commit is contained in:
X1627315083
2025-09-24 17:56:25 +08:00
parent 108dda41ea
commit 979abe082e
9 changed files with 76 additions and 91 deletions

View File

@@ -74,6 +74,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
state.frontBack.back = back
},
updataDetailItem(state,data){
console.log(data)
state.designDetail.clothes.forEach((item:any) => {
if(item.id == state.selectDetail.id){
for (const key in data) {
@@ -230,7 +231,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
left:item.layersObject[i].position?.[1] * scale + 'px',
width:item.layersObject[i].imageSize?.[0] * scale + 'px',
height:item.layersObject[i].imageSize?.[1] * scale + 'px',
zIndex:v?.style?.zIndex?v.style.zIndex:state.frontBack.front.length
zIndex:v?.style?.zIndex?v.style.zIndex:v.priority?v.priority:state.frontBack.front.length
}
item.layersObject[i].centers={
left:0,
@@ -256,7 +257,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
})
if(state.currentDetailType != 'models'){
state.selectDetail.change = item.change
if(state.selectDetail?.newDetail?.color){
if(state.selectDetail?.newDetail?.color && currentType != 'color'){
state.selectDetail.color = state.selectDetail?.newDetail?.color
state.selectDetail.newDetail.color = null
}
@@ -273,12 +274,20 @@ const DesignDetail : Module<DesignDetail,RootState> = {
state.selectDetail.printObject = item.printObject
state.selectDetail.trims = item.trims
state.selectDetail.type = item.type
state.selectDetail.color = {
...item.color,
rgba:{
r:item.color?.r,
g:item.color?.g,
b:item.color?.b,
}
}
state.selectDetail.undividedLayer = item.undividedLayer
if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){
state.designDetail.clothes.push(state.selectDetail)
}
state.selectDetail.id = item.id
if(currentType)if(state.selectDetail.newDetail?.[currentType])delete state.selectDetail.newDetail[currentType]
if(currentType)if(state.selectDetail.newDetail?.[currentType] && currentType != 'color')delete state.selectDetail.newDetail[currentType]
}
}
if(value.fun)value.fun()