-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
1.3.11版本微信小程序button组件事件绑定异常 #4022
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
单单这段代码还是没法复现,你可以把整个组件的代码一起贴出来 |
@yuche 按钮的样式设置为 |
你有没有其他小程序(例如百度/字节跳动)可以试一下 |
@EickeOe 自己看看 Button 组件的默认样式,就能知道为什么了。 |
答案:Button 的 after 伪类是 position absolute 的,你把 Button 改静态定位了,第二个按钮边框就覆盖整个页面,你按哪里都触发按钮二的 onClick,就这么简单一个样式问题。 |
@Chen-jj 解决了,谢谢大佬 |
问题描述
微信小程序,一个页面存在两个按钮,两个按钮的css定位都设置为
position: inherit;
,绑定不同的click事件,则两个按钮click时触发的事件都为最后一个按钮绑定的事件期望行为
按钮click事件正常调用
系统信息
The text was updated successfully, but these errors were encountered: