This commit is contained in:
X1627315083
2026-01-28 17:10:58 +08:00
parent 85ae158952
commit f6556ec9a9

View File

@@ -372,8 +372,13 @@ export default defineComponent({
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) || detailData.isEditPattern.value == 'editSketch'){
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}`:''
gradient = detailData.designDetail.clothes?.[0]?.gradient || null
if(detailData.isEditPattern.value == 'editSketch'){
color = detailData.selectDetail?.color?.rgba?.r != null?`${detailData.selectDetail.color.rgba.r} ${detailData.selectDetail.color.rgba.g} ${detailData.selectDetail.color.rgba.b}`:''
gradient = detailData.selectDetail?.gradient || null
}else{
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}`:''
gradient = detailData.designDetail.clothes?.[0]?.gradient || null
}
detailData.selectDetail.maskUrl = ''
detailData.selectDetail.maskMinioUrl = ''
}
@@ -680,7 +685,7 @@ export default defineComponent({
let color = detailData.selectDetail.newDetail?.color
// let colorData:any = await getColorName(color?.rgba)
if(detailData.selectDetail.newDetail?.color){
if(color.r){
if(color.r != null){
color.rgba = {r:color.r,g:color.g,b:color.b,a:color.a}
}else{
color.rgba = {}