모 바 일 브 라 우 저 에서 better-scroll 에서 click 이벤트,링크 가 잘못 되 었 습 니 다.
2711 단어 vuejs
그러나 대부분 큰 div 에 있 는 a 링크 나 click 사건 을 사용 하지 않 는 다 는 문제 가 발생 합 니 다.
html 부분 입 니 다.
<div ref="wrapper" class="list-wrapper">
<div class="setting-list" ref="setting" >
<div class="setting-list-li" v-for="(value,key) in theme">
to="`/theme/${value.c_type}`" @click.native="change" class="item">
div>
div>
div>
js 부분 입 니 다.
import BScroll from 'better-scroll'
export default {
mounted () {
this.$nextTick(function () {
setTimeout(() => {
const options = {
scrollY: false, // scrollY true,
scrollX: true,
mouseWheel: true,
click: true,
taps: true
}
this.scroll = new BScroll(this.$refs.wrapper, options)
}, 20)
})
}
}
better-scroll 은 원생 의 click 사건 을 막 기 때문에 tap 를 true 로 설정 할 수 있 습 니 다.영역 이 클릭 되 었 을 때 tap 사건 을 보 냅 니 다.
더 많은 매개 변 수 는 여 기 를 볼 수 있 습 니 다:문서https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html#starty
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
[axios] post, get, delete에 객체 전달하기DELETE 요청의 두 번째 인자에 data: {} atrribute를 넣어주면 된다. Axios - delete 요청 시 body에 데이터 넣는 법 출처 :...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.