@touchstart.stop="touchstartHandle_icon('dragBox',$event)" @touchmove.stop="touchmoveHandle_icon('dragBox',$event)" @touchend.stop="toucendveHandle_icon('dragBox',$event)" <script> //开始拖动 touchstartHandle(refName, e) { let element = e.changedTouches[0] this.startX = element.clientX this.startY = element.clientY }, //正在拖动 touchmoveHandle(refName, e) { var current = e.changedTouches[0]; var x = current.clientX var y = current.clientY var w = this.startX - current.clientX var h = this.startY - current.clientY this.right = (-40 + 2*w) +'rpx'; this.top = (this.nowTop - 2*h) +'rpx'; }, //结束拖动 toucendveHandle(refName, e){ var current = e.changedTouches[0]; var x = current.clientX var y = current.clientY var h = this.startY - y this.right = '-40rpx' this.top = (this.nowTop - 2*h) +'rpx'; this.nowTop = this.nowTop - 2*h this.isShowLog = 0 if ((this.startX - x) == 0 && (this.startY - y) == 0) { this.toLine() } }, </script>