请问自定义html节点, 使用registerHTMLComponent方式注册组件,怎么给html中的子元素添加点击事件? #2091
-
注册html组件:
创建节点,并自定义事件:
给graph监听事件:
通过以上方式,按钮点击事件没有触发,请问是什么原因? |
Beta Was this translation helpful? Give feedback.
Answered by
NewByVector
May 10, 2022
Replies: 1 comment 1 reply
-
可以将 <div class="add-btn" event="node:add"><i class="custom-node-header-icon iconfont iconxinzeng"></i></div> |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
NewByVector
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
可以将
event
属性定义在 html 文件中。