0

我有这样的绑定触摸事件:

语言:lang-js:

 render() {
        return (
            <div style={this.props.style} onTouchStart={this.touchStartHandler.bind(this)} ref="layer"
                 onTouchMove={this.touchMoveHandler.bind(this)}
                 onTouchEnd={this.touchEndHandler.bind(this)}>
                {this.props.content}
            </div>
        )
    }

它不起作用IEMobile10,我找到了swiper.jsbind 。我应该在函数中绑定事件吗?MSPointerDowntouchstartMSPointcomponentDidMount

4

1 回答 1

0

触摸事件在 IE10 中处于开发模式。

使用 MSPointerEvents 而不是 touchEvents。

例如:

render() {
        return (
            <div style={this.props.style} MSPointerDown={this.touchStartHandler.bind(this)} ref="layer"
                 MSPointerMove={this.touchMoveHandler.bind(this)}
                 MSPointerUp={this.touchEndHandler.bind(this)}>
                {this.props.content}
            </div>
        )
    }

有关更多信息,请通过链接 - https://msdn.microsoft.com/library/hh673557.aspx

于 2016-01-05T17:11:44.550 回答