Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

做 demo 时感觉可以有的几个优化点 #3

Open
eternalsky opened this issue Sep 7, 2018 · 0 comments
Open

做 demo 时感觉可以有的几个优化点 #3

eternalsky opened this issue Sep 7, 2018 · 0 comments

Comments

@eternalsky
Copy link
Member

  • type 可以不必一定要传,默认可以认为是要传 dom 节点,如果传进来的是字符串,则按照 querySelector 的标准是取值(其实也可以不支持这种,只支持传 dom 节点即可)。
  • dom 和 getDom 方法其实可以合并,根据类型判断是执行函数还是直接取值。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant