feature: 增加参数minColumnWidth,设置拖拽列宽度的最小限制

This commit is contained in:
yangchch6 2020-02-12 15:02:13 +08:00
parent 32892ecd9a
commit 4a1c146f51
5 changed files with 48213 additions and 10528 deletions

View File

@ -64,7 +64,7 @@ var TableHeader = function (_Component) {
_this.drag = {
option: ''
};
_this.minWidth = 80; //确定最小宽度就是80
_this.minWidth = parseInt(props.minColumnWidth);
_this.table = null;
_this._thead = null; //当前对象
_this.event = false; //避免多次绑定问题

58734
dist/demo.js vendored

File diff suppressed because it is too large Load Diff

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -372,6 +372,7 @@ Table 组件参数:
| ------ | ---------- | -------- | ---- |
| dragborder | 拖拽调整列宽度 | boolean | false |
| draggable | 拖拽交换列 | boolean | false |
| minColumnWidth | 拖拽列宽度的最小限制 | number | 80 |
| onDrop | 拖拽释放回调函数(交换列) | function | () => {} |
| onDropBorder | 拖拽释放回调函数(调整列宽) | function | (e,width) => {} |
| onDraggingBorder | 调整列宽过程中触发的回调函数 | function | (e,width) => {} |

View File

@ -27,7 +27,7 @@ class TableHeader extends Component {
this.drag = {
option:''
};
this.minWidth = 80;//确定最小宽度就是80
this.minWidth = parseInt(props.minColumnWidth);
this.table = null;
this._thead = null;//当前对象
this.event = false;//避免多次绑定问题