1.0.4 • Published 5 years ago

resizable-columns v1.0.4

Weekly downloads
33
License
MIT
Repository
github
Last release
5 years ago

在线demo

http://uso.oschina.io/resizable-colmuns-table/

安装

npm i resizable-columns

使用

import createColResizable from colResizeable

createColResizable(domElemTable, otions)

api

成员说明类型默认值
domElemTable设置可拖动的tableelement-
otions拖动的参数Object'https://uso.oschina.io/react-ueditor-demo/ueditor.all.js'

options 可选

options = {
    liveDrag: true, // 是否实时拖动
    defaultMinWidth: 30, //默认没列最小宽度
    headerOnly: true, // 拖动竖线是否只有thead
    disabledColumns: [], //不能拖动的th
    onResizing: null, // 正在拖动callback
    onResized: null // 拖动结束callback
}

每列单独宽度需要在对应th加入 自定义属性 data-min-width="number", eg: data-min-width="300"