better-scroll在移动端绑定click事件失效

在做一个列表的时候需要点击列表将列表信息输出,给<li>加个一个很简单的@click,可是没有反应。

原因是使用了better-scroll,默认它会阻止touch事件。所以在配置中需要加上click: true

mounted () {
    this.scroll = new BScroll(this.$refs.search, {mouseWheel: true, click: true, tap: true})
  }

  

原文地址:https://www.cnblogs.com/ss-wdp/p/10954895.html