解决了th.setAttribute('draggable', true)报th为undefinded的问题
This commit is contained in:
parent
01855fa7c4
commit
e65f4cec38
|
@ -108,7 +108,7 @@ var TableHeader = function (_Component) {
|
|||
} else if (type != 'online' && _this.props.draggable) {
|
||||
// if (!this.props.draggable || targetEvent.nodeName.toUpperCase() != "TH") return;
|
||||
if (!_this.props.draggable) return;
|
||||
var th = _this.getTargetToTh(targetEvent);
|
||||
var th = _this.getTargetToType(targetEvent);
|
||||
th.setAttribute('draggable', true); //添加交换列效果
|
||||
_this.drag.option = 'dragAble';
|
||||
_this.currentDome = th;
|
||||
|
|
|
@ -225,7 +225,7 @@ class TableHeader extends Component {
|
|||
}else if(type != 'online' && this.props.draggable){
|
||||
// if (!this.props.draggable || targetEvent.nodeName.toUpperCase() != "TH") return;
|
||||
if (!this.props.draggable) return;
|
||||
let th = this.getTargetToTh(targetEvent);
|
||||
let th = this.getTargetToType(targetEvent);
|
||||
th.setAttribute('draggable',true);//添加交换列效果
|
||||
this.drag.option = 'dragAble';
|
||||
this.currentDome = th;
|
||||
|
|
Loading…
Reference in New Issue