实现代码:
view class=' ' @ touch start=' touch start ' @ touchend=' touchend '/view data () {return {touchData: {},/幻灯片,Touchend(e ) constsubx=e.changed touches [0].clientx-this.touch data.clientx; const suby=e.changed touches [0].clienty-this.touch data.clienty; if(suby50 ) console.log )下降) ) if ) suby-50 ) console.log )上升) ) }if ) subx50 ) console.log )向右滑动