Vuedraggable:如何一次将多个项目拖动
我想同时在表格列中上下拖动多个 。使用
拖动各个行相当简单,但是我正在寻找一种将前一行与所选行分组并将它们移动在一起的方法同时保持以后单独拖动每一行的能力。
我正在使用 Vue 2 和 vuedraggable v2.24.3。
表格如下。
<table>
<thead>
<tr>
<th>...</th>
<th>...</th>
<th>...</th>
<th>...</th>
</tr>
</thead>
<draggable>
<vue-component-here
v-for="(task, i) in tasks"
:prop="task.id"
.
.
.
/>
</draggable>
</table>
子组件将为每个任务输出一个。
I would like to drag multiple <tr>
's up and down a table column at the same time. It's rather straight forward to drag individual rows using <draggable>
, however what I'm looking for is a way to group, say, the previous row with the selected row and move them together while maintaining the ability to drag each row individually later.
I'm using Vue 2 and vuedraggable v2.24.3.
The table is as follows.
<table>
<thead>
<tr>
<th>...</th>
<th>...</th>
<th>...</th>
<th>...</th>
</tr>
</thead>
<draggable>
<vue-component-here
v-for="(task, i) in tasks"
:prop="task.id"
.
.
.
/>
</draggable>
</table>
The sub-component will output a <tr>
for each task.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论