baidu / san

A fast, portable, flexible JavaScript component framework
https://baidu.github.io/san/
MIT License
4.72k stars 549 forks source link

为什么 this.el 返回的是一个注释节点呢? #775

Closed jingxin2015 closed 5 months ago

jingxin2015 commented 8 months ago

在写一个 layer 的组件的时候,发现 this.el 是一个注释节点,导致给 layer 的根节点绑定事件的时候没有生效,请问是什么原因呢?

errorrik commented 8 months ago

咋写的

errorrik commented 5 months ago

root 是 fragment 或者 if,会这样。