var Test = React.createClass({
componentDidMount: function(){
var hammer = new Hammer(document.querySelector('button'));
hammer.on("tap", function(e){
console.log('111111111');
});
},
render: function(){
return (
<p ref="hammer" style={{padding: '100px 0 0 100px'}}>
<button>test</button>
</p>
)
}
})
React.render(<Test />, document.body)
iOS中点击button,tap事件执行两次
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
欢迎选择我的课程,让我们一起见证您的进步~~