detail删除所有衣服preview报错,进行design没有模特进行提示

This commit is contained in:
X1627315083
2025-09-26 17:13:29 +08:00
parent 5e51d8132b
commit aba2fd0363
7 changed files with 14 additions and 9 deletions

View File

@@ -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 = ''
}

View File

@@ -914,7 +914,7 @@ export default defineComponent({
> img{
width: 100%;
height: 100%;
object-fit: cover;
object-fit: contain;
}
> i{
position: absolute;

View File

@@ -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>

View File

@@ -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)
}

View File

@@ -1591,12 +1591,10 @@ export default defineComponent({
//设计新的collection
async designNewCollection() {
clearTimeout(this.getDesignTime);
let probjects = this.store.state.Workspace.probjects
if(probjects.type == "seriesDesign" && probjects?.model?.length == 0)return message.info(this.t('collectionModal.jsContent7'));
let data = await this.getDesignData("");
if(this.driver__.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
}
this.isShowMark = true
// this.store.commit("setLikeDesignCollectionList", []);
Https.axiosPost(Https.httpUrls.designCollection, data)

View File

@@ -584,6 +584,7 @@ export default {
jsContent3: "您必须选择一种或多种颜色进行下一步。",
jsContent5: "我们检测到您的({str})上的PIN数量超过了八个这可能会导致一些已钉住的项目未被使用。您是否仍要继续",
jsContent6: "画布内容没有保存,请点击预保存后继续。",
jsContent7: "请至少选择一个模特",
},
DesignDetail: {
Details: "详情",

View File

@@ -586,6 +586,7 @@ export default {
jsContent3: "You must choose one or more colors for further process.",
jsContent5: "We've detected that the number of pins on your ({str}) exceeds eight, which may result in some pinned items not being used. Would you like to continue anyway?",
jsContent6: 'The content on the canvas has not been saved. Please click "Preview" to continue.',
jsContent7: "Please select at least one model.",
},
DesignDetail: {
Details: "Details",