styles:修复table组件列宽拖拽时,光标位置不准问题

This commit is contained in:
qinhaoyan 2022-06-30 20:28:52 +08:00
parent 7826691db1
commit b118d35a3b
2 changed files with 3 additions and 1 deletions

View File

@ -1844,6 +1844,7 @@ popOver 的其它配置请参考 [popover](./popover)
| affixRow | `Array` | | 底部总结行 |
| itemBadge | [`BadgeSchema`](./badge) | | 行角标配置 |
| autoFillHeight | `boolean` | | 内容区域自适应高度 |
| resizable | `boolean` | `true` | 列宽度是否支持调整 |
## 列配置属性表

View File

@ -1503,7 +1503,8 @@ export default class Table extends React.Component<TableProps, object> {
@autobind
handleColResizeMouseMove(e: MouseEvent) {
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';
}