This commit is contained in:
X1627315083@163.com
2026-04-23 16:57:03 +08:00
parent 7297e4e7a4
commit 743fc762d6

View File

@@ -189,11 +189,11 @@ export default defineComponent({
}
return { scaleX, scaleY, rotate };
}
const initMoveableForSelected = () => {
const initMoveableForSelected = async (isDestroy:boolean = false) => {
// 销毁旧的实例
if(selectItem.imgDomIndex == -1)return
if (moveableInstance.value) {
moveableInstance.value.destroy();
if (moveableInstance?.value?.destroy && !isDestroy) {
moveableInstance?.value?.destroy();
}
const selectedEl = elementRefs.value[selectItem.imgDomIndex];
@@ -509,7 +509,7 @@ export default defineComponent({
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()
initMoveableForSelected(oldValue == 0)
},100)
})
const setRevocation = async ()=>{