Skip to content

Commit 1c7a78d

Browse files
author
Taois
committed
feat: 修复图片坐标点击功能
1 parent fddecc9 commit 1c7a78d

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

dashboard/src/components/actions/InputAction.vue

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -824,12 +824,19 @@ export default {
824824
825825
imageCoords.value = { x, y }
826826
827-
// 将坐标填入输入框
828-
const coordsText = `${x},${y}`
829-
inputValue.value = coordsText
827+
// 将坐标累积到输入框中,多个坐标用-符号分隔
828+
const newCoordsText = `${x},${y}`
829+
830+
if (inputValue.value.trim()) {
831+
// 如果输入框已有内容,用-符号分隔追加新坐标
832+
inputValue.value = `${inputValue.value}-${newCoordsText}`
833+
} else {
834+
// 如果输入框为空,直接设置新坐标
835+
inputValue.value = newCoordsText
836+
}
830837
831838
// 触发输入验证
832-
validateInput(coordsText)
839+
validateInput(inputValue.value)
833840
834841
// 不自动提交,让用户可以看到坐标并手动确认
835842
}

0 commit comments

Comments
 (0)