From e65eb89fa9ac08a792ba5647879c5329e5dc60c7 Mon Sep 17 00:00:00 2001 From: personal82555 Date: Wed, 21 Oct 2026 23:06:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(image-tools):=20=E6=96=87=E5=AD=97=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=8C=BA=E6=94=B9=E4=B8=BA=E5=B8=B8=E9=A9=BB=E4=BE=A7?= =?UTF-8?q?=E6=A0=8F=E9=A1=B6=E9=83=A8=EF=BC=88=E7=94=A8=E6=88=B7=E6=89=BE?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E6=A8=A1=E6=9D=BF=E5=85=A5=E5=8F=A3=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 模板区显示条件从「文字工具或选中文字层」改为「图片已加载即显示」, 并移到侧栏第一位(✨ 文字模板 → 图层 → 属性 → 历史) - 点击模板在任意工具下都直接插入画布;若当前非文字/移动工具则自动 切到移动工具,插入后立即可拖动旋转 - 实测:默认打开图片编辑(移动工具激活)模板区即可见(14款), 点「黄字紫描边」直接插入(历史「套用模板」),截图验收无布局问题 --- src/tools/image-tools/PsEditor.vue | 37 ++++++++++++++++-------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/tools/image-tools/PsEditor.vue b/src/tools/image-tools/PsEditor.vue index 11ff74a..575b1c8 100644 --- a/src/tools/image-tools/PsEditor.vue +++ b/src/tools/image-tools/PsEditor.vue @@ -718,6 +718,9 @@ function applyTpl(t: TextTpl): void { const m = textMetrics(tl); tl.x = Math.round((docW.value - m.w) / 2); tl.y = Math.round(Math.max(8, docH.value * 0.1)); + if (tool.value !== 'text' && tool.value !== 'move') { + tool.value = 'move'; // 插入后直接可拖动/旋转 + } commit(`套用模板「${t.name}」`); composite(); scheduleRender(); @@ -1920,6 +1923,23 @@ onBeforeUnmount(() => {
+
+
+ ✨ 文字模板 + 点击即插入套用 +
+
+ +
+
图层 @@ -1949,23 +1969,6 @@ onBeforeUnmount(() => {
-
-
- 文字模板 - 点击套用 -
-
- -
-
属性