fix
This commit is contained in:
@@ -360,15 +360,16 @@ export default defineComponent({
|
||||
let isCurrent = list[i].id == detailData?.selectDetail?.id
|
||||
let color = ''
|
||||
let gradient = null
|
||||
if((detailData.currentDetailType == 'color' || detailData.isEditPattern.value == 'canvasEditor') && isCurrent){
|
||||
color = newData?.color?.rgba?.r?`${newData?.color.rgba.r} ${newData?.color.rgba.g} ${newData?.color.rgba.b}`:''
|
||||
if(newData?.color?.gradient){
|
||||
gradient = newData?.color.gradient
|
||||
}
|
||||
}else if(isCurrent){
|
||||
color = list[i].color?.rgba?.r?`${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`:''
|
||||
// if((detailData.currentDetailType == 'color' && detailData.isEditPattern.value == 'canvasEditor') && isCurrent){
|
||||
// color = newData?.color?.rgba?.r != null?`${newData?.color.rgba.r} ${newData?.color.rgba.g} ${newData?.color.rgba.b}`:''
|
||||
// if(newData?.color?.gradient){
|
||||
// gradient = newData?.color.gradient
|
||||
// }
|
||||
// }else if(isCurrent){
|
||||
|
||||
// }
|
||||
color = list[i].color?.rgba?.r != null?`${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`:''
|
||||
gradient = list[i].gradient
|
||||
}
|
||||
if(detailData.currentDetailType == 'sketch' && newData?.sketch){
|
||||
color = detailData.designDetail.clothes?.[0]?.color?.rgba?.r?`${detailData.designDetail.clothes?.[0].color.rgba.r} ${detailData.designDetail.clothes[0].color.rgba.g} ${detailData.designDetail.clothes[0].color.rgba.b}`:''
|
||||
detailData.selectDetail.maskUrl = ''
|
||||
@@ -486,6 +487,11 @@ export default defineComponent({
|
||||
}
|
||||
const submit = async ()=>{
|
||||
detailData.loadingShow = true
|
||||
if(detailData.isEditPattern.value !== 'canvasEditor'){
|
||||
if(detailDom.detailRight?.privewDetail)await (detailDom.detailRight as any).privewDetail()
|
||||
let otherData = await updateOtherLayers('single')
|
||||
await detailDom.canvasBox.updateOtherLayers(otherData)
|
||||
}
|
||||
let workspace = store.state.Workspace.probjects
|
||||
let clothes:any = await setClothes(detailData.designDetail.clothes,'sub')
|
||||
let data = {
|
||||
@@ -647,7 +653,7 @@ export default defineComponent({
|
||||
const updateOtherLayers = async (str:any='all',type:any='noFirst')=>{//更新到画布图层
|
||||
let otherData:any = {}
|
||||
if(str == 'all'){
|
||||
await uploadSelectDetail()
|
||||
// await uploadSelectDetail()
|
||||
otherData = {
|
||||
color: detailData.selectDetail.color,
|
||||
printObject: detailData.selectDetail.printObject || null,
|
||||
@@ -738,7 +744,7 @@ export default defineComponent({
|
||||
let color:any = {}
|
||||
if(allInfo.color?.color?.rgba || allInfo.color?.color?.gradient){
|
||||
let canvasColor = allInfo.color.color;
|
||||
if(canvasColor?.rgba?.r){
|
||||
if(canvasColor?.rgba?.r != null){
|
||||
let colorData:any = await getColorName(allInfo.color.color?.rgba)
|
||||
color = {
|
||||
hsv:{
|
||||
@@ -759,6 +765,7 @@ export default defineComponent({
|
||||
detailData.detailLeftColorKey++
|
||||
}
|
||||
}
|
||||
|
||||
if(detailData.isEditPattern.value == 'canvasEditor'){
|
||||
delete detailData.selectDetail.newDetail
|
||||
detailData.selectDetail.trims.prints = allInfo.trims || []
|
||||
|
||||
Reference in New Issue
Block a user