fix(plugins): 模板节点拖入后不选中(避免输入框拦截拖动)+ 1.6.11 同步

This commit is contained in:
qiqi committed 2026-11-22 20:26:45 +08:00
1 parent af1070ec78
commit 84df19fb59
5 files changed
+14 -8

No files matched your search

+2 -1
View File
@@ -1103,7 +1103,8 @@
: { id, type: 'prompt', x: Math.round(wx - 132), y: Math.round(wy - 20), data: { text: obj.text || '', title: obj.name || '' } }
pushHistory() // 拖拽入画布新增节点:入撤销历史(鼠标落点保留)
commitCanvas(refs.nodes.concat([node]), undefined, undefined)
setSel([id])
// 模板节点插入后不选中:选中态下变量输入框可编辑,点它就无法拖节点
setSel(hasVars ? [] : [id])
setNotice({ type: 'ok', text: (hasVars ? '已插入提示词模板:' : '已插入提示词:') + (obj.name || '') })
return
} catch (err) { /* 非本应用拖入 */ }