fix:点击表头,会触发拖拽列宽事件问题
This commit is contained in:
parent
e7388e3d32
commit
ee5fa5123a
|
@ -550,7 +550,7 @@ var _initialiseProps = function _initialiseProps() {
|
|||
var type = currentElement.getAttribute('data-type');
|
||||
if (!_this7.props.dragborder && !_this7.props.draggable) return;
|
||||
if (type == 'online' && _this7.props.dragborder) {
|
||||
if (!_this7.props.dragborder) return;
|
||||
// if(!this.props.dragborder)return;
|
||||
targetEvent.setAttribute('draggable', false); //添加交换列效果
|
||||
var currentIndex = -1;
|
||||
var defaultWidth = currentElement.getAttribute("data-th-width");
|
||||
|
@ -695,7 +695,9 @@ var _initialiseProps = function _initialiseProps() {
|
|||
this.onTrMouseUp = function (e) {
|
||||
var event = _utils.Event.getEvent(e);
|
||||
var width = _this7.drag.newWidth;
|
||||
var opt = _this7.drag.option;
|
||||
_this7.mouseClear();
|
||||
if (opt !== "border") return; // fix:点击表头会触发onDropBorder事件的问题
|
||||
_this7.props.onDropBorder && _this7.props.onDropBorder(event, width);
|
||||
};
|
||||
|
||||
|
|
|
@ -52174,7 +52174,7 @@
|
|||
var type = currentElement.getAttribute('data-type');
|
||||
if (!_this7.props.dragborder && !_this7.props.draggable) return;
|
||||
if (type == 'online' && _this7.props.dragborder) {
|
||||
if (!_this7.props.dragborder) return;
|
||||
// if(!this.props.dragborder)return;
|
||||
targetEvent.setAttribute('draggable', false); //添加交换列效果
|
||||
var currentIndex = -1;
|
||||
var defaultWidth = currentElement.getAttribute("data-th-width");
|
||||
|
@ -52319,7 +52319,9 @@
|
|||
this.onTrMouseUp = function (e) {
|
||||
var event = _utils.Event.getEvent(e);
|
||||
var width = _this7.drag.newWidth;
|
||||
var opt = _this7.drag.option;
|
||||
_this7.mouseClear();
|
||||
if (opt !== "border") return; // fix:点击表头会触发onDropBorder事件的问题
|
||||
_this7.props.onDropBorder && _this7.props.onDropBorder(event, width);
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -223,7 +223,7 @@ class TableHeader extends Component {
|
|||
let type = currentElement.getAttribute('data-type');
|
||||
if(!this.props.dragborder && !this.props.draggable)return;
|
||||
if(type == 'online' && this.props.dragborder){
|
||||
if(!this.props.dragborder)return;
|
||||
// if(!this.props.dragborder)return;
|
||||
targetEvent.setAttribute('draggable',false);//添加交换列效果
|
||||
let currentIndex = -1;
|
||||
let defaultWidth = currentElement.getAttribute("data-th-width");
|
||||
|
@ -367,7 +367,9 @@ class TableHeader extends Component {
|
|||
onTrMouseUp = (e) => {
|
||||
let event = Event.getEvent(e);
|
||||
let width = this.drag.newWidth;
|
||||
let opt = this.drag.option;
|
||||
this.mouseClear();
|
||||
if(opt !== "border") return; // fix:点击表头会触发onDropBorder事件的问题
|
||||
this.props.onDropBorder && this.props.onDropBorder(event,width);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue