手势冲突
- 问题
- 解决办法
问题一:在h5页面上由于手势冲突导致页面自动返回,主要用于(电子签名)
解决办法
html"><template>
<view>
<button @tap="createCanvas">{{i18n.autograph.autographBtn}}</button>
<view class="signature" v-show="showCanvas" @touchmove.prevent>
<canvas class="mycanvas" canvas-id="mycanvas" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend"></canvas>
<view class="footer">
<view class="right" @tap="clear">{{i18n.autograph.eliminateBtn}}</view>
<view class="left" @tap="finish">{{i18n.autograph.preservationBtn}}</view>
</view>
</view>
</view>
</template>
使用的是 @touchmove.prevent