Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.0k views
in Technique[技术] by (71.8m points)

vue vue-draggable不能上下拖拽

<draggable
  v-model="imageList"
  :options='options'
  filter=".undraggable"
  @update="dataragEnd"
  @change="change"
  @start="start"
  @end="end">
    <block
      v-for="item in imageList"
      class="imgList"
      :key="item.url"
    >
    </block>
</draggable>

image.png
问题:
1、图片长按不能上下拖拽,可以左右拖拽排序,请问什么原因呢?
2、移动端拖拽如何阻止滚动条滚动?
3、图片上下拖拽阻止滚动条滚动,不生效,代码如下:

document.body.addEventListener('touchmove', function(e){
    e.preventDefault();
}, { passive: false });
// 拖拽报错 Unable to preventDefault inside passive event listener invocation

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...