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,
flipX: false,
flipY: false,
blendMode: "multiply",
// blendMode: "multiply",
blendMode: "source-over",
gapX: 0,
gapY: 0,
}

View File

@@ -195,7 +195,7 @@ export default defineComponent({
}
moveableInstance.value.on('scaleStart', ({ target, direction }) => {
const frontStyle = detailData.frontBack.front[selectItem.imgDomIndex];
if (!frontStyle.mirror){
if (!frontStyle?.mirror){
let scaleX = frontStyle.style.transform.match(/scaleX\(([-\d.]+)\)/);
let scaleY = frontStyle.style.transform.match(/scaleY\(([-\d.]+)\)/);
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 }) => {
const frontStyle = detailData.frontBack.front[selectItem.imgDomIndex];
if (!frontStyle.mirror){
if (!frontStyle?.mirror){
let scaleX = frontStyle.style.transform.match(/scaleX\(([-\d.]+)\)/);
let scaleY = frontStyle.style.transform.match(/scaleY\(([-\d.]+)\)/);
frontStyle.mirror = { x: scaleX[1] == '-1' ? true : false, y: scaleY[1] == '-1' ? true : false };
@@ -219,7 +219,7 @@ export default defineComponent({
top:parseFloat(selectedEl.style.top.replace('px','')) || 0,
}
});
// 拖拽
// 拖拽
moveableInstance.value.on('drag', ({ target, beforeTranslate }) => {
let x = startPosition.left + beforeTranslate[0]
let y = startPosition.top + beforeTranslate[1]
@@ -435,6 +435,12 @@ export default defineComponent({
},100)
}
},{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 ()=>{
let frontBack = JSON.parse(JSON.stringify(detailData.frontBack))
let revocation:any = JSON.parse((await KeyValueDB.get("revocation") as any) || '[]')
@@ -685,6 +691,8 @@ export default defineComponent({
:deep(.moveable-control){
width: 1.4rem;
height: 1.4rem;
margin-top: -.7rem;
margin-left: -.7rem;
border-radius: 0;
background-color: #44aaff;
border: 2px solid #44aaff;

View File

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