采集节点点击事件,统一派发 `input:node-click` 语义事件,供行为插件消费(如 `@splicetree/plugin-selectable`、`@splicetree/plugin-checkable`)。
npm install @splicetree/plugin-pointer采集节点点击事件,统一派发 input:node-click 语义事件,供行为插件消费(如 @splicetree/plugin-selectable、@splicetree/plugin-checkable)。





pnpm add @splicetree/plugin-pointer
``ts
import { createSpliceTree } from '@splicetree/core'
import pointer from '@splicetree/plugin-pointer'
const tree = createSpliceTree(data, {
plugins: [pointer],
})
// 在视图中调用
// inputNodeClick(nodeId, e) 会派发 input:node-click 事件(包含修饰键)
tree.inputNodeClick('a', mouseEvent)
`
- 事件派发
- inputNodeClick(nodeId, e: MouseEvent) 派发 input:node-clicknodeId: string
- 事件负载
- modifiers: { shift: boolean; ctrl: boolean; meta: boolean; alt: boolean }`
-