-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] 功能改进建议: 希望el-table支持拖拽排序 #3543
Comments
+1 |
不过目前可以用 https://github.com/RubaXa/Sortable 来做拖拽
|
+1 其实只要能让我把属性draggable="true" 加到行上去就可以,目前好像不能单独对行增加属性 |
有些公司会有这个需求,希望加上这个功能 |
https://github.com/RubaXa/Sortable 拖拽之后,数据模型的顺序并不会跟着变,这是个麻烦事 |
同求此问题,拖拽列,并且再次的resize,如果只是拖拽还好,但是还需要再次resize,数据模型并没有跟着变,楼上有解决方案吗,还是换了控件? |
同求此功能 |
同求 |
同求 |
提供一个结合 Sortable 的例子:https://jsfiddle.net/gozhg07a/ 关于数据模型,其实 Sortable 提供了 |
@Leopoldthecoder 通过splice改变了数组(this.products),但是页面上表格行的顺序并未刷新的问题该如何解决呢? |
@Andyliwr 我目前是调用el-table实例的 |
@aweiu 我的好像还是不行 你是如何实现的呢 |
用sortable.js其实可以做到列拖动或者行拖动
|
真的很需要行排序 😂 |
+1 |
在el-dialog中使用, 需要加一个setTimeout才能使用? 这是为何 |
nextTick可以嗎 |
很需要行拖拽,还有跟后台的数据交互灵活些,用sortablejs onMove无法获取拖拽前节点的数据,不是单单获取节点的html |
How use Sortable.js with Element table columns? |
Here is an example of how drag-drop columns with Sortable.js |
如果发现view无论如何都没有更新, 尝试加上row-key |
+1 很需要这个功能 |
@jocabrera |
@guokangf |
附议 |
Has anyone tried show and hide columns using checkbox group and also drag and drop. the checkbox group has different checkboxes based on number of columns and toggling checkboxes will show/hide the column and also drag and drop works fine with it? |
表格数据没有重绘的加个row-key就行了,row-key和ID一样需要设置唯一的一个字段名 |
@liub1934 That's true!! use sortable.js |
Try this https://github.com/WakuwakuP/element-ui-el-table-draggable for el-tabel - drag-n-drop row |
这里你使用了钩子 但是还是需要绑定唯一的row-key。能不能不绑定row-key? |
hi bro, using drag and drop in the columns,The table will flash. |
树形表格拖拽排序真的很费脑,看来官方是不考虑这个功能了 |
我在el-table上使用clone,但是每次clone都会在原table中加入clone出来的el-table无法控制的一行,更新数据后table中仍会保留clone的这一行。(row-key不管用)解决办法是
不过我没理解$mount是怎么用的,我是用的v-if @aweiu |
http://element.eleme.io/#/zh-CN/component/table
看了官方文档之后发现这个表格是按列实现的
这也导致了el-table没办法直接使用vue.draggable和vue-sortable组件库来进行拖拽排序
希望el-table能够实现行的拖拽排序
The text was updated successfully, but these errors were encountered: