detail删除所有衣服preview报错,进行design没有模特进行提示
This commit is contained in:
@@ -308,7 +308,7 @@ export default defineComponent({
|
||||
`${list[i].color.rgba.r} ${list[i].color.rgba.g} ${list[i].color.rgba.b}`:
|
||||
'')
|
||||
if(detailData.currentDetailType == 'sketch' && newData){
|
||||
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}`:''
|
||||
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 = ''
|
||||
detailData.selectDetail.maskMinioUrl = ''
|
||||
}
|
||||
|
||||
@@ -914,7 +914,7 @@ export default defineComponent({
|
||||
> img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-fit: contain;
|
||||
}
|
||||
> i{
|
||||
position: absolute;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<i class="fi fi-rr-copy" :title="$t('DesignDetail.compareTitle')" @mousedown="mousedownDesignImg" @mouseup="mousedownDesignImg" @touchstart="mousedownDesignImg" @touchend="mousedownDesignImg"></i>
|
||||
|
||||
</div>
|
||||
<position ref="position" @canvasReload="()=>$emit('canvasReload')" :imgDesignImg=imgDesignImg></position>
|
||||
<position ref="position" @canvasReload="()=>$emit('canvasReload')" @addSketch="()=>$emit('addSketch')" :imgDesignImg=imgDesignImg></position>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -49,7 +49,7 @@ export default defineComponent({
|
||||
type:Boolean,
|
||||
}
|
||||
},
|
||||
emits:['canvasReload'],
|
||||
emits:['canvasReload','addSketch'],
|
||||
setup(props,{emit}) {
|
||||
const {t} = useI18n()
|
||||
const store = useStore();
|
||||
@@ -82,6 +82,11 @@ export default defineComponent({
|
||||
let dom = document.querySelector('.molepositon .perview_img') as any
|
||||
if(!detailData.frontBack?.body?.path || !dom)return
|
||||
img.onload = () => {
|
||||
if(detailData.designDetail.clothes.length == 0){
|
||||
store.commit('DesignDetail/addDesignColthes')
|
||||
emit('addSketch')
|
||||
return
|
||||
}
|
||||
if(!detailData.selectDetail?.id){
|
||||
store.commit('DesignDetail/setDesignColthes',detailData.designDetail.clothes[0].id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user