fix: 浏览器IE拖拽不好使
This commit is contained in:
parent
3c3c47db32
commit
b581de4fe9
|
@ -1,3 +1,4 @@
|
|||
import polyfill from '@babel/polyfill'
|
||||
import React, { Component } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Con, Row, Col } from 'bee-layout';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import polyfill from '@babel/polyfill'
|
||||
import React, { Component } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Con, Row, Col } from 'bee-layout';
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -74,6 +74,7 @@
|
|||
"prop-types": "^15.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/polyfill": "^7.12.1",
|
||||
"babel-jest": "^22.0.4",
|
||||
"bee-clipboard": "^2.0.0",
|
||||
"bee-drawer": "0.0.2",
|
||||
|
|
|
@ -273,7 +273,7 @@ class TableHeader extends Component {
|
|||
}
|
||||
let currentObj = this.table.cols[currentIndex];
|
||||
this.drag.currIndex = currentIndex;
|
||||
this.drag.oldLeft = event.x;
|
||||
this.drag.oldLeft = event.clientX;
|
||||
this.drag.oldWidth = parseInt((currentObj).style.width);
|
||||
this.drag.minWidth = currentObj.style.minWidth != ""?parseInt(currentObj.style.minWidth):defaultWidth;
|
||||
this.drag.tableWidth = parseInt(this.table.table.style.width ?this.table.table.style.width:this.table.table.scrollWidth);
|
||||
|
@ -344,7 +344,7 @@ class TableHeader extends Component {
|
|||
if(this.props.dragborder && this.drag.option == "border"){
|
||||
//移动改变宽度
|
||||
let currentCols = this.table.cols[this.drag.currIndex];
|
||||
let diff = (event.x - this.drag.oldLeft);
|
||||
let diff = (event.clientX - this.drag.oldLeft);
|
||||
let newWidth = this.drag.oldWidth + diff;
|
||||
this.drag.newWidth = newWidth > 0 ? newWidth : this.minWidth;
|
||||
if(newWidth > this.minWidth){
|
||||
|
|
Loading…
Reference in New Issue