Comments (3)
from el-table-draggable.
我看了一下,报错是我这边的代码报的,但报错的原因是因为视图显示错乱了.
我需要一个只能在同级之间拖动排序的表格.但如果将拥有子集的行展开,可以将与它同级的另一行拖动到已展开的行下,视图上作为它的子级存在.但是数据上好像并没有问题.
onMove(evt, originEvt, { dragged, related }) {
if (dragged.parent === related.parent) {
return true
}
return false
},
from el-table-draggable.
你起码提供一下demo数据和el结构 发自我的 iPhone 在 2022年10月31日,09:49,QingHuan @.> 写道: 拖拽一级,多拖拽几次后会报错, Error in render: "TypeError: Cannot read properties of undefined (reading 'subItem')" 导致视图顺序错乱,但是数据并未错乱. — Reply to this email directly, view it on GitHub<#11>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC7Q7JZRKB3ESEATKYCV7R3WF4QSXANCNFSM6AAAAAARSUBB5M. You are receiving this because you are subscribed to this thread.Message ID: @.>
orderMove(evt, originEvt, { dragged, related }) {
if (dragged.parent === related.parent) {
if (related.parent.level === -1) {
this.$refs.table.toggleRowExpansion(related.data[related.index], false)
}
return true
}
return false
},
这样可以简单的解决问题,但是并不好用
from el-table-draggable.
Related Issues (20)
- 嵌套表格,区分层级(Group) 行展开时拖拽有问题 HOT 6
- 请问如果我要选中复制表格里的文字怎么办? HOT 3
- 列拖拽的时候会出现内容丢失和内容空白的情况
- 低版本element-ui的el-table没有treeProps时会出错,且无报错信息 HOT 2
- 不同表格之间clone的时候出现一次clone多个的情况 HOT 1
- 拖拽子级的时候控制台报错
- 后续会支持vue3嘛? HOT 1
- 表格里有Switch开关,点击控制台报错,但是实际数据是正确的 HOT 3
- 多表格相互推拽有个BUG HOT 1
- 列拖拽,head和body不一致
- 组件销毁后,相关事件未注销
- vue, core-js 等依赖是否应该放到 devDependencies 中?
- Error during using it HOT 3
- 1.4.12版本,elementui2.13.2版本,固定操作列底部边框没显示出来,高度计算有问题 HOT 1
- other sortablejs's option, the option start with on, ExampleonSort => @sort
- el-table-draggable包裹el-table使用,当浏览器缩放到大于100%,如果el-table-column没设置固定宽,各列宽会缓慢无限增加
- 树形结构表格同层级拖拽边界问题 HOT 1
- 超快速拖拽后,列表顺序与绑定数据完全混乱,无法保持同步 HOT 1
- 为何我无法进行拖拽?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from el-table-draggable.