diff --git a/src/components/martixCraft/Edit/index.vue b/src/components/martixCraft/Edit/index.vue index 4ae604b..ccdf29a 100644 --- a/src/components/martixCraft/Edit/index.vue +++ b/src/components/martixCraft/Edit/index.vue @@ -128,6 +128,7 @@ const cancel = () => { const sprayRefs = ref([]) const activeTab = ref(0) +const swiperKey = ref(1) const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' | 'add') => { if (action === 'add') { if (form.value.times.length >= 10) { @@ -153,6 +154,7 @@ const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' | } form.value.times.splice(activeTab.value, 1) } + swiperKey.value++ // 异步任务调用 setTimeout(() => { @@ -220,6 +222,7 @@ const touchendHandle = () => { { swiperInstance?.slideTo(activeTab.value) diff --git a/src/components/spray/trayGraph/index.vue b/src/components/spray/trayGraph/index.vue index eed3b00..5ea1b95 100644 --- a/src/components/spray/trayGraph/index.vue +++ b/src/components/spray/trayGraph/index.vue @@ -178,7 +178,6 @@ const addGuideLine = () => { const getSelection = () => { if (rect.value) { const pos = rect.value.position() - console.log(newWidth, newHeight) return { x1: formatNum(pos.x / zoom), y1: formatNum(pos.y / zoom), @@ -192,7 +191,6 @@ const getSelection = () => { // 新增方法:更新矩形选区位置 const updateSelection = (x: number, y: number, width: number, height: number) => { if (rect.value) { - console.log(x, y, width, height) rect.value.position({ x, y }) rect.value.width(width) rect.value.height(height) @@ -229,7 +227,6 @@ const updateLine = (point: { x: number, y: number }, index: number, stroke: stri } nextTick(() => { const currentLine = lines.value[index] - console.log(currentLine, currentLine.points()) currentLine.points([...currentLine.points(), point.x, point.y]) currentLine.getLayer()!.batchDraw() // 批量重绘提升性能 })