Use the better-scroll @ click event in vue to execute twice, and ask for your help to solve the problem.

Use the better-scroll @ click event in

vue to execute twice, how to solve

Mar.24,2021

has also had this problem. Note:
initially thought it was in conflict with fastclick in the project, but later confirmed that it was not caused by this reason. The
official website Demo does not have a similar problem. Finally, it is temporarily changed to @ touchstart + @ touchend.stop.prevent to simulate @ click .
sample code:

<template>
  <button @touchstart="start($event)" @touchend.stop.prevent="stop($event)">Test</button>
</template>

<script>
  export default {
    methods: {
      start ($event) {
        this.startY = $event.touches[0].pageY
      },
      stop ($event) {
        const moving = Math.abs($event.changedTouches[0].pageY - this.startY)
        if (moving > 20) return
        this.startY = 0
        console.log('click')
      }
    }
  }
</script>

@ click.native


problem solved the upstairs method is feasible


@ click.native directly report an error


this method can also be used to trigger 2 clicks
< button Vignon br. Stop.principent= "onClick" > < / button >

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36781-2c032.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36781-2c032.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?