修复直接在印花preview后印花overall丢失
This commit is contained in:
@@ -1034,6 +1034,11 @@ defineExpose({
|
||||
width = 0,// 导出的图片宽度
|
||||
height = 0, // 导出的图片高度
|
||||
} = {}) => {
|
||||
console.log('导出图片',{isContainFixed,
|
||||
isContainFixedOther,
|
||||
isPrintTrimsNoRepeat,
|
||||
isPrintTrimsRepeat,
|
||||
isContainNormalLayer})
|
||||
var base64 = await canvasManager.exportImage({
|
||||
isContainBg,
|
||||
isContainFixed,
|
||||
@@ -1047,6 +1052,7 @@ defineExpose({
|
||||
expPicType,
|
||||
isEnhanceImg,
|
||||
});
|
||||
console.log('导出图片完成',)
|
||||
if(width > 0 && height > 0){
|
||||
base64 = await resizeImage(base64, width, height);
|
||||
}
|
||||
|
||||
@@ -275,7 +275,6 @@ export default defineComponent({
|
||||
const setRevocation = async ()=>{//设置撤销
|
||||
let itemDetail = JSON.parse(JSON.stringify(detailData.designDetail))
|
||||
let revocation:any = JSON.parse((await KeyValueDB.get("revocation") as any) || 'null')
|
||||
console.log(itemDetail,revocation,'=========')
|
||||
if(!revocation)revocation = []
|
||||
// let oppositeRevocation = JSON.parse((await KeyValueDB.get("oppositeRevocation") as any))
|
||||
// if(revocation?.[0]?.designItemId != itemDetail.designItemId || revocation?.[0]?.designItemId == undefined){
|
||||
@@ -291,7 +290,6 @@ export default defineComponent({
|
||||
const revocation = async ()=>{//撤回
|
||||
let oppositeRevocation = JSON.parse((await KeyValueDB.get("oppositeRevocation") as any) || 'null')
|
||||
let revocation = JSON.parse((await KeyValueDB.get("revocation") as any) || 'null')
|
||||
console.log(oppositeRevocation,revocation,'=========')
|
||||
if(revocation.length <= 1)return
|
||||
oppositeRevocation.push(revocation[revocation.length-1])
|
||||
revocation.splice(revocation.length-1,1)
|
||||
@@ -448,7 +446,6 @@ export default defineComponent({
|
||||
let value = {
|
||||
currentType : JSON.parse(JSON.stringify(detailData.currentDetailType)),
|
||||
rv:rv,
|
||||
fun:setRevocation
|
||||
}
|
||||
if(detailData?.designDetail?.newModel)detailData.designDetail.oldModel = JSON.parse(JSON.stringify(detailData.designDetail.newModel))
|
||||
|
||||
@@ -607,7 +604,6 @@ export default defineComponent({
|
||||
detailDom.canvasBox.editFront(str)
|
||||
if(str == 'canvasEditor'){
|
||||
let otherData = await updateOtherLayers('single')
|
||||
console.log(otherData,'============')
|
||||
await detailDom.canvasBox.updateOtherLayers(otherData)
|
||||
}
|
||||
detailData.isEditPattern.value = str
|
||||
|
||||
@@ -79,7 +79,6 @@ export default defineComponent({
|
||||
if(data?.imgUrl)data.url = data.imgUrl
|
||||
let value = {
|
||||
data,
|
||||
id,
|
||||
}
|
||||
if(detailData.currentDetailType == 'sketch'){
|
||||
detailData.selectDetail.sketchString = ''
|
||||
|
||||
@@ -379,22 +379,23 @@ export default defineComponent({
|
||||
item.object.blendMode = 'source-over'
|
||||
}
|
||||
}
|
||||
if(item.ifSingle && editPrintElementData.stateOverallSingle == 'single'){
|
||||
if(item.ifSingle){
|
||||
editPrintElementData.printStyleList[props.type].single.push(item)
|
||||
}
|
||||
if(!item.ifSingle && editPrintElementData.stateOverallSingle == 'overall'){
|
||||
if(!item.ifSingle){
|
||||
item.token = Date.now().toString() + (editPrintElementData.printStyleList[props.type].overall.length + '')
|
||||
// editPrintElementData.printStyleList[props.type].overall = []
|
||||
editPrintElementData.printStyleList[props.type].overall.push(item)
|
||||
setTimeout(()=>{
|
||||
editPrintElementDom.pingpuRef.updataList([
|
||||
{
|
||||
action: ACTIONS.ADD,
|
||||
data: item,
|
||||
},
|
||||
]);
|
||||
})
|
||||
|
||||
if(editPrintElementData.stateOverallSingle == 'overall'){
|
||||
setTimeout(()=>{
|
||||
editPrintElementDom.pingpuRef.updataList([
|
||||
{
|
||||
action: ACTIONS.ADD,
|
||||
data: item,
|
||||
},
|
||||
]);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
const setPosition = ()=>{
|
||||
|
||||
Reference in New Issue
Block a user