Giter Site home page Giter Site logo

Comments (3)

mizuka-wu avatar mizuka-wu commented on May 25, 2024

from el-table-draggable.

RJQingHuan avatar RJQingHuan commented on May 25, 2024

我看了一下,报错是我这边的代码报的,但报错的原因是因为视图显示错乱了.
我需要一个只能在同级之间拖动排序的表格.但如果将拥有子集的行展开,可以将与它同级的另一行拖动到已展开的行下,视图上作为它的子级存在.但是数据上好像并没有问题.

拖动前
拖动前

拖动后
拖动后

onMove(evt, originEvt, { dragged, related }) {
      if (dragged.parent === related.parent) {
        return true
      }
      return false
},

from el-table-draggable.

RJQingHuan avatar RJQingHuan commented on May 25, 2024

你起码提供一下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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.