JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 515
  • Score
    100M100P100Q132179F

Package Exports

  • el-table-draggable

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (el-table-draggable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

el-table-draggable

vue-draggable支持element-ui中的el-table

demo请查看

特性

  • 支持几乎所有sortablejs的配置
  • 支持多个表格之间互相拖动
  • 代码提示

安装

使用npm或者yarn

yarn add el-table-draggable

npm i -S el-table-draggable

使用

import ElTableDraggable from 'el-table-draggable'

export default {
    components: {
        ElTableDraggable
    }
}

template

<template>
    <el-table-draggable>
        <el-table row-key></el-table>
    </el-table-draggable>
</template>

props

tag

包裹的组件,默认为div

column

启用列拖拽(试验性功能)0.6增加

其他

差不多支持所有sortablejs的option

事件

input

内部table的数据有因为拖动造成的顺序,增减时进行通知

0.5增加

回调为当前所有行数据

0.6新增

列模式下,如果有value,返回value,否则返回当前列属性列表(property)

其他

差不多支持所有sortablejs的option里面那些on开头的事件,绑定事件的时候请去掉on 例如onSort => @sort

todo

  • 支持列拖动
  • 支持拖动展开的列的时候ghost显示展开的部分
  • 接入html2canvas 将展开/列部分设定到dataTransfer.setDragImage上实现拖拽优化