Merge branch 'dev_vite' of http://18.167.251.121:10003/aidlab/aida_front into dev_vite

This commit is contained in:
李志鹏
2026-01-29 17:17:26 +08:00
3 changed files with 14 additions and 5 deletions

View File

@@ -372,7 +372,8 @@ export default defineComponent({
angle: 0, angle: 0,
flipX: false, flipX: false,
flipY: false, flipY: false,
blendMode: "multiply", // blendMode: "multiply",
blendMode: "source-over",
gapX: 0, gapX: 0,
gapY: 0, gapY: 0,
} }

View File

@@ -195,7 +195,7 @@ export default defineComponent({
} }
moveableInstance.value.on('scaleStart', ({ target, direction }) => { moveableInstance.value.on('scaleStart', ({ target, direction }) => {
const frontStyle = detailData.frontBack.front[selectItem.imgDomIndex]; const frontStyle = detailData.frontBack.front[selectItem.imgDomIndex];
if (!frontStyle.mirror){ if (!frontStyle?.mirror){
let scaleX = frontStyle.style.transform.match(/scaleX\(([-\d.]+)\)/); let scaleX = frontStyle.style.transform.match(/scaleX\(([-\d.]+)\)/);
let scaleY = frontStyle.style.transform.match(/scaleY\(([-\d.]+)\)/); let scaleY = frontStyle.style.transform.match(/scaleY\(([-\d.]+)\)/);
frontStyle.mirror = { x: scaleX[1] == '-1' ? true : false, y: scaleY[1] == '-1' ? true : false }; frontStyle.mirror = { x: scaleX[1] == '-1' ? true : false, y: scaleY[1] == '-1' ? true : false };
@@ -207,7 +207,7 @@ export default defineComponent({
}); });
moveableInstance.value.on('rotateStart', ({ target, direction }) => { moveableInstance.value.on('rotateStart', ({ target, direction }) => {
const frontStyle = detailData.frontBack.front[selectItem.imgDomIndex]; const frontStyle = detailData.frontBack.front[selectItem.imgDomIndex];
if (!frontStyle.mirror){ if (!frontStyle?.mirror){
let scaleX = frontStyle.style.transform.match(/scaleX\(([-\d.]+)\)/); let scaleX = frontStyle.style.transform.match(/scaleX\(([-\d.]+)\)/);
let scaleY = frontStyle.style.transform.match(/scaleY\(([-\d.]+)\)/); let scaleY = frontStyle.style.transform.match(/scaleY\(([-\d.]+)\)/);
frontStyle.mirror = { x: scaleX[1] == '-1' ? true : false, y: scaleY[1] == '-1' ? true : false }; frontStyle.mirror = { x: scaleX[1] == '-1' ? true : false, y: scaleY[1] == '-1' ? true : false };
@@ -435,6 +435,12 @@ export default defineComponent({
},100) },100)
} }
},{immediate: true,}) },{immediate: true,})
watch(()=>detailData.frontBack.front.length,(newValue,oldValue)=>{
if(selectItem.selectDetail?.id)selectItem.imgDomIndex = detailData.frontBack.front.findIndex((item:any)=>item.id == selectItem.selectDetail?.id)
setTimeout(()=>{
initMoveableForSelected()
},100)
})
const setRevocation = async ()=>{ const setRevocation = async ()=>{
let frontBack = JSON.parse(JSON.stringify(detailData.frontBack)) let frontBack = JSON.parse(JSON.stringify(detailData.frontBack))
let revocation:any = JSON.parse((await KeyValueDB.get("revocation") as any) || '[]') let revocation:any = JSON.parse((await KeyValueDB.get("revocation") as any) || '[]')
@@ -685,6 +691,8 @@ export default defineComponent({
:deep(.moveable-control){ :deep(.moveable-control){
width: 1.4rem; width: 1.4rem;
height: 1.4rem; height: 1.4rem;
margin-top: -.7rem;
margin-left: -.7rem;
border-radius: 0; border-radius: 0;
background-color: #44aaff; background-color: #44aaff;
border: 2px solid #44aaff; border: 2px solid #44aaff;

View File

@@ -56,7 +56,7 @@
@changeCanvas="changeCanvas" @changeCanvas="changeCanvas"
@trigger-library="triggerLibrary" @trigger-library="triggerLibrary"
:canvasJSON="canvasJSON" :canvasJSON="canvasJSON"
:hideCanvas="hideCanvas || key" :hideCanvas="hideCanvas || !key"
ref="editCanvas"> ref="editCanvas">
<template #existsImageList> <template #existsImageList>
<ExistsImageList :list="canvasSelectList" @select="handleImageSelect" /> <ExistsImageList :list="canvasSelectList" @select="handleImageSelect" />