@kdcloudjs/table 1.1.3-canary.2 → 1.1.3-canary.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@kdcloudjs/table.css +1 -1
- package/dist/@kdcloudjs/table.js +9 -7
- package/dist/@kdcloudjs/table.js.map +1 -1
- package/dist/@kdcloudjs/table.min.css +1 -1
- package/dist/@kdcloudjs/table.min.js +3 -3
- package/dist/@kdcloudjs/table.min.js.map +1 -1
- package/es/table/pipeline/features/columnDrag.js +8 -6
- package/lib/table/pipeline/features/columnDrag.js +8 -6
- package/package.json +1 -1
package/dist/@kdcloudjs/table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @kdcloudjs/table v1.1.3-canary.
|
|
3
|
+
* @kdcloudjs/table v1.1.3-canary.2
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2020-present, Kingdee, Inc.
|
|
6
6
|
* All rights reserved.
|
|
@@ -5161,6 +5161,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
5161
5161
|
var stateKey = 'columnDrag';
|
|
5162
5162
|
var SCROLL_SIZE = 30;
|
|
5163
5163
|
|
|
5164
|
+
function disableSelect(event) {
|
|
5165
|
+
event.preventDefault();
|
|
5166
|
+
}
|
|
5167
|
+
|
|
5164
5168
|
function sortColumns(columns, sort) {
|
|
5165
5169
|
var res = new Array(columns.length);
|
|
5166
5170
|
|
|
@@ -5217,7 +5221,9 @@ function columnDrag() {
|
|
|
5217
5221
|
onMouseDown: !isLeaf || path.length > 1 ? undefined : function (e) {
|
|
5218
5222
|
if (e.button !== 0) {
|
|
5219
5223
|
return;
|
|
5220
|
-
}
|
|
5224
|
+
}
|
|
5225
|
+
|
|
5226
|
+
window.addEventListener('selectstart', disableSelect); // const cx = e.clientX
|
|
5221
5227
|
// const width = col.width
|
|
5222
5228
|
// const a = startIndex
|
|
5223
5229
|
// const b = endIndex
|
|
@@ -5226,7 +5232,6 @@ function columnDrag() {
|
|
|
5226
5232
|
// let newStartIndex = startIndex
|
|
5227
5233
|
// let endIdx = endIndex
|
|
5228
5234
|
|
|
5229
|
-
|
|
5230
5235
|
var columnMoved = false;
|
|
5231
5236
|
var columns = pipeline.getColumns();
|
|
5232
5237
|
|
|
@@ -5399,6 +5404,7 @@ function columnDrag() {
|
|
|
5399
5404
|
e.stopPropagation();
|
|
5400
5405
|
document.body.removeEventListener('mousemove', handleMouseMove);
|
|
5401
5406
|
document.body.removeEventListener('mouseup', handleMouseUp);
|
|
5407
|
+
window.removeEventListener('selectstart', disableSelect);
|
|
5402
5408
|
window.requestAnimationFrame(function () {
|
|
5403
5409
|
// 取消阻止列头点击事件
|
|
5404
5410
|
currentTarget.removeEventListener('click', stopClickPropagation);
|
|
@@ -5481,10 +5487,6 @@ function columnDrag() {
|
|
|
5481
5487
|
|
|
5482
5488
|
document.body.addEventListener('mousemove', handleMouseMove);
|
|
5483
5489
|
document.body.addEventListener('mouseup', handleMouseUp);
|
|
5484
|
-
|
|
5485
|
-
document.body.onselectstart = function () {
|
|
5486
|
-
return false;
|
|
5487
|
-
};
|
|
5488
5490
|
},
|
|
5489
5491
|
style: style
|
|
5490
5492
|
})
|