mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
Merge pull request #4752 from qinhaoyan/fix/table-resize
styles:修复table组件列宽拖拽时,光标位置不准问题
This commit is contained in:
commit
b2c1303dda
@ -1844,6 +1844,7 @@ popOver 的其它配置请参考 [popover](./popover)
|
|||||||
| affixRow | `Array` | | 底部总结行 |
|
| affixRow | `Array` | | 底部总结行 |
|
||||||
| itemBadge | [`BadgeSchema`](./badge) | | 行角标配置 |
|
| itemBadge | [`BadgeSchema`](./badge) | | 行角标配置 |
|
||||||
| autoFillHeight | `boolean` | | 内容区域自适应高度 |
|
| autoFillHeight | `boolean` | | 内容区域自适应高度 |
|
||||||
|
| resizable | `boolean` | `true` | 列宽度是否支持调整 |
|
||||||
|
|
||||||
## 列配置属性表
|
## 列配置属性表
|
||||||
|
|
||||||
|
@ -1503,7 +1503,8 @@ export default class Table extends React.Component<TableProps, object> {
|
|||||||
@autobind
|
@autobind
|
||||||
handleColResizeMouseMove(e: MouseEvent) {
|
handleColResizeMouseMove(e: MouseEvent) {
|
||||||
const moveX = e.clientX - this.lineStartX;
|
const moveX = e.clientX - this.lineStartX;
|
||||||
this.resizeLine.style.left = this.resizeLineLeft + moveX + 'px';
|
// 光标right为-4px,列宽改变时会自动跟随,不需要单独处理位置
|
||||||
|
// this.resizeLine.style.left = this.resizeLineLeft + moveX + 'px';
|
||||||
this.targetTh.style.width = this.targetThWidth + moveX + 'px';
|
this.targetTh.style.width = this.targetThWidth + moveX + 'px';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user