fix: 修复canvas快捷键隐藏问题、提交preview后切换sketch再切回来前后片变为最早版本
This commit is contained in:
@@ -190,7 +190,7 @@ export default defineComponent({
|
||||
watch(()=>detailData.selectDetail,async (newValue,oldValue)=>{
|
||||
detailData.imgDomIndex = detailData.frontBack.front.findIndex((item:any)=>item.id == newValue.id)
|
||||
if(newValue?.path)await getSketchSize()
|
||||
if(newValue?.id && oldValue?.id && (newValue.id != oldValue.id)){
|
||||
if(newValue?.id && (newValue.id != oldValue.id)){
|
||||
store.commit('DesignDetail/changeCanvasKey')
|
||||
}
|
||||
// privewDetail(oldValue)
|
||||
@@ -561,11 +561,10 @@ export default defineComponent({
|
||||
segmentImage(detailData.selectDetail.maskUrl,partialDesign,size).then(async (rv)=>{
|
||||
let front = detailData.frontBack.front[detailData.imgDomIndex]
|
||||
let back = detailData.frontBack.back[detailData.imgDomIndex]
|
||||
if(!front?.oldImageUrl)front.oldImageUrl = front.imageUrl
|
||||
if(!front?.oldMaskUrl)front.oldMaskUrl = front.maskUrl
|
||||
if(!back?.oldImageUrl)back.oldImageUrl = back.imageUrl
|
||||
if(!front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.oldMaskUrl})
|
||||
|
||||
front.oldImageUrl = ''
|
||||
front.oldMaskUrl = ''
|
||||
back.oldImageUrl = ''
|
||||
front.imageUrl = rv.targetFrontUrl
|
||||
back.imageUrl = rv.targetBackUrl
|
||||
store.commit('DesignDetail/canvasPreviewUpdata',{type:detailData.isEditPattern.value?'all':detailData.currentDetailType,callBack:setRevocation})
|
||||
@@ -775,36 +774,7 @@ export default defineComponent({
|
||||
window.removeEventListener('beforeunload',beforeunload)
|
||||
}
|
||||
window.addEventListener('beforeunload',beforeunload)
|
||||
// let url = Https.httpUrls.getDesignDetail + `?designItemId=34242&designPythonOutfitId=34004`
|
||||
// this.loadingShow = true
|
||||
// Https.axiosGet(url).then(
|
||||
// async (rv: any) => {
|
||||
// rv.clothes.forEach((item:any)=>{
|
||||
// let a
|
||||
// if(item.layersObject[0].imageCategory.indexOf("back") == -1){
|
||||
// a = item.layersObject[0]
|
||||
// item.layersObject[0] = item.layersObject[1]
|
||||
// item.layersObject[1] = a
|
||||
// }
|
||||
// if(item.printObject.prints == null){
|
||||
// item.printObject.prints = [{}]
|
||||
// }
|
||||
// })
|
||||
// this.store.commit('setDesignItemDetail',rv)
|
||||
// if(rv.others[0].printObject.path == null){
|
||||
// this.body = false
|
||||
// }else{
|
||||
// this.body = true
|
||||
// }
|
||||
// this.setImgSize()
|
||||
// this.generateHighDesignImg = rv.highDesignUrl
|
||||
// this.designShowPrview = 1
|
||||
// this.designDetailShow = true
|
||||
// this.loadingShow = false
|
||||
// }
|
||||
// ).catch(rv=>{
|
||||
// this.loadingShow = false
|
||||
// })
|
||||
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
@@ -901,6 +901,7 @@ export default defineComponent({
|
||||
const inputFillOffset = (offset:any)=>{
|
||||
let arr = editPrintElementData.printStyleList[props.type].overall
|
||||
arr[editPrintElementData.imgDomIndex].location = [offset.left * offset.size[0] / 100,offset.top * offset.size[1] / 100]
|
||||
console.log(arr[editPrintElementData.imgDomIndex].location)
|
||||
editPrintElementDom.pingpuRef.updataList([
|
||||
{
|
||||
action: ACTIONS.UPDATE,
|
||||
|
||||
Reference in New Issue
Block a user