This commit is contained in:
X1627315083
2025-09-26 21:55:28 +08:00
parent 5219e92060
commit faa30619f6
4 changed files with 13 additions and 5 deletions

View File

@@ -72,11 +72,13 @@ const DesignDetail : Module<DesignDetail,RootState> = {
// front[index].style.zIndex = v.priority
front[index].id = v.id
front[index].undividedLayer = v.undividedLayer
front[index].undividedLayerWithSinglePrint = v?.undividedLayerWithSinglePrint
}else{
back[index] = v.layersObject[i]
back[index].style.zIndex = v.priority
back[index].id = v.id
back[index].undividedLayer = v.undividedLayer
back[index].undividedLayerWithSinglePrint = v?.undividedLayerWithSinglePrint
// back[index].style.zIndex = backIndex==0?v.layersObject[i]:backIndex++
}
if(state.printZIndex < v.priority){
@@ -194,6 +196,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
trims:null,
type:null,
undividedLayer:null,
undividedLayerWithSinglePrint:null,
}
if(!state.currentDetailType)state.currentDetailType = 'sketch'
state.designDetail.clothes.forEach((item:any) => {
@@ -225,6 +228,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
await new Promise((resolve, reject) => {
if(!state.frontBack?.body?.path){
state.frontBack.front[0].undividedLayer = value.rv.clothes[0].undividedLayer
state.frontBack.front[0].undividedLayerWithSinglePrint = value.rv.clothes[0]?.undividedLayerWithSinglePrint
resolve('')
}
const img = new Image();
@@ -255,11 +259,13 @@ const DesignDetail : Module<DesignDetail,RootState> = {
// state.frontBack.front[index].style.zIndex = v.priority
state.frontBack.front[index].id = item.id
state.frontBack.front[index].undividedLayer = item.undividedLayer
state.frontBack.front[index].undividedLayerWithSinglePrint = item?.undividedLayerWithSinglePrint
}else{
state.frontBack.back[index] = item.layersObject[i]
// state.frontBack.back[index].style.zIndex = v.priority
state.frontBack.back[index].id = item.id
state.frontBack.back[index].undividedLayer = item.undividedLayer
state.frontBack.back[index].undividedLayerWithSinglePrint = item?.undividedLayerWithSinglePrint
}
}
}
@@ -295,6 +301,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
gradient:item.gradient,
}
state.selectDetail.undividedLayer = item.undividedLayer
state.selectDetail.undividedLayerWithSinglePrint = item?.undividedLayerWithSinglePrint
if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){
state.designDetail.clothes.push(state.selectDetail)
}