附上文档链接:vue.draggable中文文档(很详细!还有例子!百度了好久,靠这文档救我狗命)

主要解决两个需求:
1.点拖动的图标才能拖动元素:handle=".mover"
2.动画效果:animation=“150”

		<draggable v-model="tagTitle" animation="150" handle=".mover">
          <div class="folder" v-for="(item,index) in tagTitle" :key="item.label">
            <div class="index">{{index+2}}</div>
            <el-input maxlength="10" placeholder="请输入10字以内的文件夹名称" v-model.trim="item.name">
              <i slot="suffix" class="iconfont icongonggong_shanchu"></i>
              <i slot="suffix" class="iconfont icongonggaobaohu_tuodong mover"></i>
            </el-input>
          </div>
        </draggable>
Logo

Agent 垂直技术社区,欢迎活跃、内容共建。

更多推荐