From 9e69dbfc7001a226fa29e8f9a404a8b891a5a798 Mon Sep 17 00:00:00 2001 From: chiyi Date: Mon, 12 Oct 2026 12:44:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(canvas):=20=E5=9B=9B=E5=90=91=E7=82=B9?= =?UTF-8?q?=E9=80=89=E8=BF=9E=E7=BA=BF=E5=B9=B6=E7=BB=9F=E4=B8=80=2010%=20?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E6=AD=A5=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为所有画布节点显示四向连接点,点击起点与终点连线并保存端点方向;滚轮、按钮与快捷键按 10% 递增。 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../src/components/canvas/CanvasNodeView.vue | 54 ++++--- .../src/components/canvas/CanvasStage.vue | 137 ++++++++++-------- frontend/src/utils/canvas.js | 5 +- frontend/src/views/CanvasView.vue | 16 +- 4 files changed, 123 insertions(+), 89 deletions(-) diff --git a/frontend/src/components/canvas/CanvasNodeView.vue b/frontend/src/components/canvas/CanvasNodeView.vue index 0a89aa3..0745eff 100644 --- a/frontend/src/components/canvas/CanvasNodeView.vue +++ b/frontend/src/components/canvas/CanvasNodeView.vue @@ -8,8 +8,11 @@ import { thumbUrl } from '../../api' const props = defineProps({ node: { type: Object, required: true }, selected: { type: Boolean, default: false }, + linkSourceSide: { type: String, default: '' }, }) -const emit = defineEmits(['imgload', 'note-commit', 'node-action']) +const emit = defineEmits(['imgload', 'note-commit', 'node-action', 'port-click']) +const portSides = ['top', 'right', 'bottom', 'left'] +const portLabels = { top: '上', right: '右', bottom: '下', left: '左' } const imgLoaded = ref(false) const noteEl = ref(null) @@ -99,8 +102,12 @@ defineExpose({ startEdit, commitNote }) :data-node-id="node.id" @dblclick="onSelfDblClick" > - - + + - + {{ scalePct }}% - + @@ -857,7 +857,7 @@ const saveLabel = computed(() => ({
{{ genMsg }}
- 双击空白建笔记 · 拖右侧圆点连线 · 选中后右下角缩放 · Ctrl+D 复制 · + 双击空白建笔记 · 依次点击两个连接点连线 · 选中后右下角缩放 · Ctrl+D 复制 · 本地图片直接拖入或 Ctrl+V 粘贴 · 按 1 适应全部内容