-
Notifications
You must be signed in to change notification settings - Fork 551
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
没有自定义指令有没有简单的办法包装一个自定义的tap事件呢? #303
Comments
HOC |
高阶组件是可以试试,不过这样就得要求别人一定得把触发tap事件的东西封装成一个组件。我先尝试一下,3Q |
@erik168 显出插件机制的意义了…… |
@Dafrok 我刚试了一下,遇到两个问题。
hoc是一个很好的方案,但是解决这个问题好像还有点麻烦 |
@Dafrok 没想好怎么插,哪里能插。 所以这个例子,我在2天内给出答复 |
两天过去了,关于这个问题,我还是一脑袋浆糊 |
🤣 |
这不就是我前段时间想做的事情嘛 |
上面提到的 prop 透传这一点我觉得还蛮有意义的 |
@errorrik 我这有个思路可以关掉这个 issue https://jsrun.net/XCyKp/edit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/as3long/san-tap
我尝试包装了一个但是这样会多一个节点出来,有没有更好的建议呢?
The text was updated successfully, but these errors were encountered: