去除多余log

This commit is contained in:
jonyshi 2019-04-22 16:28:27 +08:00
parent 5397fb9756
commit cbb906e636
3 changed files with 28 additions and 31 deletions

24
dist/demo.js vendored
View File

@ -44149,12 +44149,12 @@
var _this$props = _this.props,
clsPrefix = _this$props.clsPrefix,
contentTable = _this$props.contentTable;
// console.log(" ------------------onTrMouseDown------------------ ");
console.log(" ------------------onTrMouseDown------------------ ");
var currentElement = _this.getOnLineObject(targetEvent);
if (!currentElement) return;
var type = currentElement.getAttribute('data-type');
console.log("type : ", type);
// console.log("type : ",type);
if (!_this.props.dragborder && !_this.props.draggable) return;
if (type == 'online' && _this.props.dragborder) {
if (!_this.props.dragborder) return;
@ -44168,7 +44168,7 @@
_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);
console.log("====================", _this.drag);
// console.log("====================",this.drag);
} else if (type != 'online' && _this.props.draggable) {
if (!_this.props.draggable || targetEvent.nodeName.toUpperCase() != "TH") return;
targetEvent.setAttribute('draggable', true); //添加交换列效果
@ -44176,7 +44176,7 @@
_this.currentDome = event.target;
var _currentIndex = parseInt(currentElement.getAttribute("data-line-index"));
_this.drag.currIndex = _currentIndex;
console.log(" ------------------onTrMouseDown------this.drag------------ ", _this.drag);
// console.log(" ------------------onTrMouseDown------this.drag------------ ",this.drag);
} else {
console.log("onTrMouseDown dragborder or draggable is all false !");
return;
@ -44195,7 +44195,7 @@
_utils.Event.stopPropagation(e);
var event = _utils.Event.getEvent(e);
if (_this.props.dragborder && _this.drag.option == "border") {
console.log(" --onTrMouseMove--border- ", _this.drag.option);
// console.log(" --onTrMouseMove--border- ",this.drag.option);
//移动改变宽度
var currentCols = _this.table.cols[_this.drag.currIndex];
var diff = event.x - _this.drag.oldLeft;
@ -44244,7 +44244,7 @@
}
}
} else if (_this.props.draggable && _this.drag.option == "draggable") {
console.log(" --onTrMouseMove--draggable- ", _this.drag.option);
// console.log(" --onTrMouseMove--draggable- ",this.drag.option);
} else {
// console.log("onTrMouseMove dragborder or draggable is all false !");
// return ;
@ -44267,7 +44267,7 @@
_this.bodyonLineMouseUp = function (events, type) {
if (!_this.drag || !_this.drag.option) return;
console.log("----bodyEventListen", _this.drag);
// console.log("----bodyEventListen",this.drag);
_this.mouseClear();
};
@ -44301,7 +44301,7 @@
var currentKey = target.getAttribute('data-line-key');
var crt = target.cloneNode(true);
console.log(" -------crt-------", crt);
// console.log(" -------crt-------",crt);
crt.style.backgroundColor = "#ebecf0";
crt.style.width = _this.table.cols[currentIndex].style.width; //拖动后再交换列的时候,阴影效果可同步
crt.style.height = "40px";
@ -44328,7 +44328,7 @@
var event = _utils.Event.getEvent(e),
target = _utils.Event.getTarget(event);
_this.currentDome.setAttribute('draggable', false); //添加交换列效果
console.log("-onDrop--target---", target);
// console.log("-onDrop--target---",target);
};
_this.onDragEnter = function (e) {
@ -44338,7 +44338,7 @@
var currentIndex = target.getAttribute("data-line-index");
if (!currentIndex || parseInt(currentIndex) === _this.drag.currIndex) return;
if (target.nodeName.toUpperCase() === "TH") {
console.log("-onDragEnter-----", target);
// console.log("-onDragEnter-----",target);
target.style.border = "2px dashed rgba(5,0,0,0.25)";
// target.style.backgroundColor = 'rgb(235, 236, 240)';
// target.style['box-sizing'] = 'border-box';
@ -44351,8 +44351,8 @@
_this._dragCurrent.style = "";
document.getElementById(_this._table_none_cont_id).innerHTML = "";
// this.body.removeChild(document.getElementById(this._table_none_cont_id));
console.log(_this.drag.newWidth + "--------------onDragEnd--target--", target);
console.log("--------------onDragEnd----", _this._dragCurrent);
// console.log(this.drag.newWidth+"--------------onDragEnd--target--",target);
// console.log("--------------onDragEnd----",this._dragCurrent);
var data = _this.getCurrentEventData(_this._dragCurrent);
if (!data) return;

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -172,11 +172,11 @@ class TableHeader extends Component {
let event = Event.getEvent(e) ,
targetEvent = Event.getTarget(event);
const { clsPrefix, contentTable } = this.props;
console.log(" ------------------onTrMouseDown------------------ ");
// console.log(" ------------------onTrMouseDown------------------ ");
let currentElement = this.getOnLineObject(targetEvent);
if(!currentElement)return;
let type = currentElement.getAttribute('data-type');
console.log("type : ",type);
// console.log("type : ",type);
if(!this.props.dragborder && !this.props.draggable)return;
if(type == 'online' && this.props.dragborder){
if(!this.props.dragborder)return;
@ -190,7 +190,7 @@ class TableHeader extends Component {
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);
console.log("====================",this.drag);
// console.log("====================",this.drag);
}else if(type != 'online' && this.props.draggable){
if (!this.props.draggable || targetEvent.nodeName.toUpperCase() != "TH") return;
targetEvent.setAttribute('draggable',true);//添加交换列效果
@ -198,7 +198,7 @@ class TableHeader extends Component {
this.currentDome = event.target;
let currentIndex = parseInt(currentElement.getAttribute("data-line-index"));
this.drag.currIndex = currentIndex;
console.log(" ------------------onTrMouseDown------this.drag------------ ",this.drag);
// console.log(" ------------------onTrMouseDown------this.drag------------ ",this.drag);
}else{
console.log("onTrMouseDown dragborder or draggable is all false !");
return ;
@ -215,7 +215,7 @@ class TableHeader extends Component {
Event.stopPropagation(e);
let event = Event.getEvent(e);
if(this.props.dragborder && this.drag.option == "border"){
console.log(" --onTrMouseMove--border- ",this.drag.option);
// console.log(" --onTrMouseMove--border- ",this.drag.option);
//移动改变宽度
let currentCols = this.table.cols[this.drag.currIndex];
let diff = (event.x - this.drag.oldLeft);
@ -264,7 +264,7 @@ class TableHeader extends Component {
}
}
}else if(this.props.draggable && this.drag.option == "draggable"){
console.log(" --onTrMouseMove--draggable- ",this.drag.option);
// console.log(" --onTrMouseMove--draggable- ",this.drag.option);
}else{
// console.log("onTrMouseMove dragborder or draggable is all false !");
// return ;
@ -309,7 +309,7 @@ class TableHeader extends Component {
*/
bodyonLineMouseUp = (events,type) =>{
if(!this.drag || !this.drag.option)return;
console.log("----bodyEventListen",this.drag);
// console.log("----bodyEventListen",this.drag);
this.mouseClear();
}
@ -382,7 +382,7 @@ class TableHeader extends Component {
let currentKey = target.getAttribute('data-line-key');
var crt = target.cloneNode(true);
console.log(" -------crt-------",crt);
// console.log(" -------crt-------",crt);
crt.style.backgroundColor = "#ebecf0";
crt.style.width = this.table.cols[currentIndex].style.width;//拖动后再交换列的时候,阴影效果可同步
crt.style.height = "40px";
@ -411,7 +411,7 @@ class TableHeader extends Component {
let event = Event.getEvent(e) ,
target = Event.getTarget(event);
this.currentDome.setAttribute('draggable',false);//添加交换列效果
console.log("-onDrop--target---",target);
// console.log("-onDrop--target---",target);
};
@ -422,7 +422,7 @@ class TableHeader extends Component {
let currentIndex = target.getAttribute("data-line-index");
if(!currentIndex || parseInt(currentIndex) === this.drag.currIndex)return;
if(target.nodeName.toUpperCase() === "TH"){
console.log("-onDragEnter-----",target);
// console.log("-onDragEnter-----",target);
target.style.border = "2px dashed rgba(5,0,0,0.25)";
// target.style.backgroundColor = 'rgb(235, 236, 240)';
// target.style['box-sizing'] = 'border-box';
@ -434,9 +434,6 @@ class TableHeader extends Component {
target = Event.getTarget(event);
this._dragCurrent.style = "";
document.getElementById(this._table_none_cont_id).innerHTML = "";
// this.body.removeChild(document.getElementById(this._table_none_cont_id));
console.log(this.drag.newWidth+"--------------onDragEnd--target--",target);
console.log("--------------onDragEnd----",this._dragCurrent);
let data = this.getCurrentEventData(this._dragCurrent);
if(!data)return;
@ -452,7 +449,7 @@ class TableHeader extends Component {
let currentIndex = target.getAttribute("data-line-index");
if(!currentIndex || parseInt(currentIndex) === this.drag.currIndex)return;
if(target.nodeName.toUpperCase() === "TH"){
console.log("--onDragLeave----",target);
// console.log("--onDragLeave----",target);
// console.log("--onDragLeave--this._dragCurrent--",this._dragCurrent);
target.style = "";
// this._dragCurrent.style = "";