diff --git a/src/component/Detail/DesignDetail.vue b/src/component/Detail/DesignDetail.vue index acb7e80b..a4f36f18 100644 --- a/src/component/Detail/DesignDetail.vue +++ b/src/component/Detail/DesignDetail.vue @@ -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 = {}