@kyfe/ks-query-table 0.0.11 → 0.0.13
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/index.js +222 -215
- package/package.json +1 -1
- package/ks-query-table.common.js.map +0 -1
- package/ks-query-table.umd.js +0 -35466
- package/ks-query-table.umd.js.map +0 -1
- package/ks-query-table.umd.min.js +0 -11
- package/ks-query-table.umd.min.js.map +0 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
;{try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
1
|
+
;{try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="807508cc-cf54-4e06-b227-d35e9e901164",e._sentryDebugIdIdentifier="sentry-dbid-807508cc-cf54-4e06-b227-d35e9e901164")}catch(e){}};
|
|
2
2
|
{
|
|
3
3
|
let _global =
|
|
4
4
|
typeof window !== 'undefined' ?
|
|
@@ -11,9 +11,18 @@
|
|
|
11
11
|
self :
|
|
12
12
|
{};
|
|
13
13
|
|
|
14
|
-
_global.SENTRY_RELEASE={id:"@kyfe/ks-query-table@0.0.
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
_global.SENTRY_RELEASE={id:"@kyfe/ks-query-table@0.0.13"};}
|
|
15
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
16
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
17
|
+
module.exports = factory();
|
|
18
|
+
else if(typeof define === 'function' && define.amd)
|
|
19
|
+
define([], factory);
|
|
20
|
+
else if(typeof exports === 'object')
|
|
21
|
+
exports["ks-query-table"] = factory();
|
|
22
|
+
else
|
|
23
|
+
root["ks-query-table"] = factory();
|
|
24
|
+
})((typeof self !== 'undefined' ? self : this), function() {
|
|
25
|
+
return /******/ (function(modules) { // webpackBootstrap
|
|
17
26
|
/******/ // The module cache
|
|
18
27
|
/******/ var installedModules = {};
|
|
19
28
|
/******/
|
|
@@ -9686,14 +9695,14 @@ function getWindowScrollingElement() {
|
|
|
9686
9695
|
return document.documentElement;
|
|
9687
9696
|
}
|
|
9688
9697
|
}
|
|
9689
|
-
/**
|
|
9690
|
-
* Returns the "bounding client rect" of given element
|
|
9691
|
-
* @param {HTMLElement} el The element whose boundingClientRect is wanted
|
|
9692
|
-
* @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
|
|
9693
|
-
* @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
|
|
9694
|
-
* @param {[Boolean]} undoScale Whether the container's scale() should be undone
|
|
9695
|
-
* @param {[HTMLElement]} container The parent the element will be placed in
|
|
9696
|
-
* @return {Object} The boundingClientRect of el, with specified adjustments
|
|
9698
|
+
/**
|
|
9699
|
+
* Returns the "bounding client rect" of given element
|
|
9700
|
+
* @param {HTMLElement} el The element whose boundingClientRect is wanted
|
|
9701
|
+
* @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
|
|
9702
|
+
* @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
|
|
9703
|
+
* @param {[Boolean]} undoScale Whether the container's scale() should be undone
|
|
9704
|
+
* @param {[HTMLElement]} container The parent the element will be placed in
|
|
9705
|
+
* @return {Object} The boundingClientRect of el, with specified adjustments
|
|
9697
9706
|
*/
|
|
9698
9707
|
|
|
9699
9708
|
|
|
@@ -9765,12 +9774,12 @@ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoS
|
|
|
9765
9774
|
height: height
|
|
9766
9775
|
};
|
|
9767
9776
|
}
|
|
9768
|
-
/**
|
|
9769
|
-
* Checks if a side of an element is scrolled past a side of its parents
|
|
9770
|
-
* @param {HTMLElement} el The element who's side being scrolled out of view is in question
|
|
9771
|
-
* @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
|
|
9772
|
-
* @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
|
|
9773
|
-
* @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
|
|
9777
|
+
/**
|
|
9778
|
+
* Checks if a side of an element is scrolled past a side of its parents
|
|
9779
|
+
* @param {HTMLElement} el The element who's side being scrolled out of view is in question
|
|
9780
|
+
* @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
|
|
9781
|
+
* @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
|
|
9782
|
+
* @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
|
|
9774
9783
|
*/
|
|
9775
9784
|
|
|
9776
9785
|
|
|
@@ -9796,13 +9805,13 @@ function isScrolledPast(el, elSide, parentSide) {
|
|
|
9796
9805
|
|
|
9797
9806
|
return false;
|
|
9798
9807
|
}
|
|
9799
|
-
/**
|
|
9800
|
-
* Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
|
|
9801
|
-
* and non-draggable elements
|
|
9802
|
-
* @param {HTMLElement} el The parent element
|
|
9803
|
-
* @param {Number} childNum The index of the child
|
|
9804
|
-
* @param {Object} options Parent Sortable's options
|
|
9805
|
-
* @return {HTMLElement} The child at index childNum, or null if not found
|
|
9808
|
+
/**
|
|
9809
|
+
* Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
|
|
9810
|
+
* and non-draggable elements
|
|
9811
|
+
* @param {HTMLElement} el The parent element
|
|
9812
|
+
* @param {Number} childNum The index of the child
|
|
9813
|
+
* @param {Object} options Parent Sortable's options
|
|
9814
|
+
* @return {HTMLElement} The child at index childNum, or null if not found
|
|
9806
9815
|
*/
|
|
9807
9816
|
|
|
9808
9817
|
|
|
@@ -9825,11 +9834,11 @@ function getChild(el, childNum, options) {
|
|
|
9825
9834
|
|
|
9826
9835
|
return null;
|
|
9827
9836
|
}
|
|
9828
|
-
/**
|
|
9829
|
-
* Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
|
|
9830
|
-
* @param {HTMLElement} el Parent element
|
|
9831
|
-
* @param {selector} selector Any other elements that should be ignored
|
|
9832
|
-
* @return {HTMLElement} The last child, ignoring ghostEl
|
|
9837
|
+
/**
|
|
9838
|
+
* Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
|
|
9839
|
+
* @param {HTMLElement} el Parent element
|
|
9840
|
+
* @param {selector} selector Any other elements that should be ignored
|
|
9841
|
+
* @return {HTMLElement} The last child, ignoring ghostEl
|
|
9833
9842
|
*/
|
|
9834
9843
|
|
|
9835
9844
|
|
|
@@ -9842,12 +9851,12 @@ function lastChild(el, selector) {
|
|
|
9842
9851
|
|
|
9843
9852
|
return last || null;
|
|
9844
9853
|
}
|
|
9845
|
-
/**
|
|
9846
|
-
* Returns the index of an element within its parent for a selected set of
|
|
9847
|
-
* elements
|
|
9848
|
-
* @param {HTMLElement} el
|
|
9849
|
-
* @param {selector} selector
|
|
9850
|
-
* @return {number}
|
|
9854
|
+
/**
|
|
9855
|
+
* Returns the index of an element within its parent for a selected set of
|
|
9856
|
+
* elements
|
|
9857
|
+
* @param {HTMLElement} el
|
|
9858
|
+
* @param {selector} selector
|
|
9859
|
+
* @return {number}
|
|
9851
9860
|
*/
|
|
9852
9861
|
|
|
9853
9862
|
|
|
@@ -9868,11 +9877,11 @@ function index(el, selector) {
|
|
|
9868
9877
|
|
|
9869
9878
|
return index;
|
|
9870
9879
|
}
|
|
9871
|
-
/**
|
|
9872
|
-
* Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
|
|
9873
|
-
* The value is returned in real pixels.
|
|
9874
|
-
* @param {HTMLElement} el
|
|
9875
|
-
* @return {Array} Offsets in the format of [left, top]
|
|
9880
|
+
/**
|
|
9881
|
+
* Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
|
|
9882
|
+
* The value is returned in real pixels.
|
|
9883
|
+
* @param {HTMLElement} el
|
|
9884
|
+
* @return {Array} Offsets in the format of [left, top]
|
|
9876
9885
|
*/
|
|
9877
9886
|
|
|
9878
9887
|
|
|
@@ -9893,11 +9902,11 @@ function getRelativeScrollOffset(el) {
|
|
|
9893
9902
|
|
|
9894
9903
|
return [offsetLeft, offsetTop];
|
|
9895
9904
|
}
|
|
9896
|
-
/**
|
|
9897
|
-
* Returns the index of the object within the given array
|
|
9898
|
-
* @param {Array} arr Array that may or may not hold the object
|
|
9899
|
-
* @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
|
|
9900
|
-
* @return {Number} The index of the object in the array, or -1
|
|
9905
|
+
/**
|
|
9906
|
+
* Returns the index of the object within the given array
|
|
9907
|
+
* @param {Array} arr Array that may or may not hold the object
|
|
9908
|
+
* @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
|
|
9909
|
+
* @return {Number} The index of the object in the array, or -1
|
|
9901
9910
|
*/
|
|
9902
9911
|
|
|
9903
9912
|
|
|
@@ -12969,9 +12978,9 @@ function MultiDragPlugin() {
|
|
|
12969
12978
|
// Static methods & properties
|
|
12970
12979
|
pluginName: 'multiDrag',
|
|
12971
12980
|
utils: {
|
|
12972
|
-
/**
|
|
12973
|
-
* Selects the provided multi-drag item
|
|
12974
|
-
* @param {HTMLElement} el The element to be selected
|
|
12981
|
+
/**
|
|
12982
|
+
* Selects the provided multi-drag item
|
|
12983
|
+
* @param {HTMLElement} el The element to be selected
|
|
12975
12984
|
*/
|
|
12976
12985
|
select: function select(el) {
|
|
12977
12986
|
var sortable = el.parentNode[expando];
|
|
@@ -12987,9 +12996,9 @@ function MultiDragPlugin() {
|
|
|
12987
12996
|
multiDragElements.push(el);
|
|
12988
12997
|
},
|
|
12989
12998
|
|
|
12990
|
-
/**
|
|
12991
|
-
* Deselects the provided multi-drag item
|
|
12992
|
-
* @param {HTMLElement} el The element to be deselected
|
|
12999
|
+
/**
|
|
13000
|
+
* Deselects the provided multi-drag item
|
|
13001
|
+
* @param {HTMLElement} el The element to be deselected
|
|
12993
13002
|
*/
|
|
12994
13003
|
deselect: function deselect(el) {
|
|
12995
13004
|
var sortable = el.parentNode[expando],
|
|
@@ -13059,10 +13068,10 @@ function insertMultiDragElements(clonesInserted, rootEl) {
|
|
|
13059
13068
|
}
|
|
13060
13069
|
});
|
|
13061
13070
|
}
|
|
13062
|
-
/**
|
|
13063
|
-
* Insert multi-drag clones
|
|
13064
|
-
* @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
|
|
13065
|
-
* @param {HTMLElement} rootEl
|
|
13071
|
+
/**
|
|
13072
|
+
* Insert multi-drag clones
|
|
13073
|
+
* @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
|
|
13074
|
+
* @param {HTMLElement} rootEl
|
|
13066
13075
|
*/
|
|
13067
13076
|
|
|
13068
13077
|
|
|
@@ -22785,10 +22794,7 @@ var style_cell = __webpack_require__("4396");
|
|
|
22785
22794
|
methods: {
|
|
22786
22795
|
setContent: function setContent(text) {
|
|
22787
22796
|
// 判空,否则没有值会显示undefined,特别是自定义列没有返回的时候
|
|
22788
|
-
|
|
22789
|
-
return '';
|
|
22790
|
-
}
|
|
22791
|
-
this.text = String(text);
|
|
22797
|
+
this.text = undefined === text ? '' : String(text);
|
|
22792
22798
|
},
|
|
22793
22799
|
setOffset: function setOffset(offset) {
|
|
22794
22800
|
this.offset = offset;
|
|
@@ -23408,12 +23414,12 @@ var customDateTime = function customDateTime(d) {
|
|
|
23408
23414
|
return formatter_date(d, fmt);
|
|
23409
23415
|
};
|
|
23410
23416
|
|
|
23411
|
-
/**
|
|
23412
|
-
* 9级组织过滤器
|
|
23413
|
-
* @param val 投资集团/快递事业部/京津冀大区/取派中心/北京分区/顺义区/顺义取派部/东城片区/顺义八里庄点部@顺义取派部@顺义八里庄点部
|
|
23414
|
-
* @param dept Array:9级组织 | 1:部门 | 2:点部
|
|
23415
|
-
* @param split 组织、部门、点部 的分隔符,默认为“@”
|
|
23416
|
-
* @returns {string} 根据用户保存的点部配置,解析出对应的部门数据
|
|
23417
|
+
/**
|
|
23418
|
+
* 9级组织过滤器
|
|
23419
|
+
* @param val 投资集团/快递事业部/京津冀大区/取派中心/北京分区/顺义区/顺义取派部/东城片区/顺义八里庄点部@顺义取派部@顺义八里庄点部
|
|
23420
|
+
* @param dept Array:9级组织 | 1:部门 | 2:点部
|
|
23421
|
+
* @param split 组织、部门、点部 的分隔符,默认为“@”
|
|
23422
|
+
* @returns {string} 根据用户保存的点部配置,解析出对应的部门数据
|
|
23417
23423
|
*/
|
|
23418
23424
|
var deptFilter = function deptFilter(val, dept) {
|
|
23419
23425
|
var split = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '@';
|
|
@@ -23799,26 +23805,26 @@ var render_cells_createRowCellOption = function createRowCellOption(_ref3) {
|
|
|
23799
23805
|
};
|
|
23800
23806
|
};
|
|
23801
23807
|
|
|
23802
|
-
/**
|
|
23803
|
-
*
|
|
23804
|
-
* #@description 渲染单元格的方法
|
|
23805
|
-
* @param {*} {
|
|
23806
|
-
* cell,
|
|
23807
|
-
* columns,
|
|
23808
|
-
* isRenderFixedCells,
|
|
23809
|
-
* cellComponentMap,
|
|
23810
|
-
* removeCells,
|
|
23811
|
-
* rowData,
|
|
23812
|
-
* rowKey,
|
|
23813
|
-
* gridOffsetX,
|
|
23814
|
-
* isHeader,
|
|
23815
|
-
* handleEvent,
|
|
23816
|
-
* rowIndex,
|
|
23817
|
-
* grid,
|
|
23818
|
-
* rowContainerDom,
|
|
23819
|
-
* }
|
|
23820
|
-
* @param {*} i
|
|
23821
|
-
* @return {*}
|
|
23808
|
+
/**
|
|
23809
|
+
*
|
|
23810
|
+
* #@description 渲染单元格的方法
|
|
23811
|
+
* @param {*} {
|
|
23812
|
+
* cell,
|
|
23813
|
+
* columns,
|
|
23814
|
+
* isRenderFixedCells,
|
|
23815
|
+
* cellComponentMap,
|
|
23816
|
+
* removeCells,
|
|
23817
|
+
* rowData,
|
|
23818
|
+
* rowKey,
|
|
23819
|
+
* gridOffsetX,
|
|
23820
|
+
* isHeader,
|
|
23821
|
+
* handleEvent,
|
|
23822
|
+
* rowIndex,
|
|
23823
|
+
* grid,
|
|
23824
|
+
* rowContainerDom,
|
|
23825
|
+
* }
|
|
23826
|
+
* @param {*} i
|
|
23827
|
+
* @return {*}
|
|
23822
23828
|
*/
|
|
23823
23829
|
var render_cells_renderCellComponent = function renderCellComponent(_ref5, i) {
|
|
23824
23830
|
var _ref5$cell = _ref5.cell,
|
|
@@ -23938,27 +23944,27 @@ function removeCellComponents(componentMap, rowContainerDom) {
|
|
|
23938
23944
|
}
|
|
23939
23945
|
}
|
|
23940
23946
|
|
|
23941
|
-
/**
|
|
23942
|
-
*
|
|
23943
|
-
* @description 计算可视区域单元格渲染逻辑
|
|
23944
|
-
* @export
|
|
23945
|
-
* @param {*} {
|
|
23946
|
-
* columns,
|
|
23947
|
-
* startCell,
|
|
23948
|
-
* endCell,
|
|
23949
|
-
* cells,
|
|
23950
|
-
* cellComponentMap,
|
|
23951
|
-
* type,
|
|
23952
|
-
* rowContainerDom,
|
|
23953
|
-
* isRenderFixedCells,
|
|
23954
|
-
* gridOffsetX,
|
|
23955
|
-
* rowKey,
|
|
23956
|
-
* handleEvent,
|
|
23957
|
-
* rowData,
|
|
23958
|
-
* rowIndex,
|
|
23959
|
-
* grid = {},
|
|
23960
|
-
* headerParentColcellComponentMap,
|
|
23961
|
-
* }
|
|
23947
|
+
/**
|
|
23948
|
+
*
|
|
23949
|
+
* @description 计算可视区域单元格渲染逻辑
|
|
23950
|
+
* @export
|
|
23951
|
+
* @param {*} {
|
|
23952
|
+
* columns,
|
|
23953
|
+
* startCell,
|
|
23954
|
+
* endCell,
|
|
23955
|
+
* cells,
|
|
23956
|
+
* cellComponentMap,
|
|
23957
|
+
* type,
|
|
23958
|
+
* rowContainerDom,
|
|
23959
|
+
* isRenderFixedCells,
|
|
23960
|
+
* gridOffsetX,
|
|
23961
|
+
* rowKey,
|
|
23962
|
+
* handleEvent,
|
|
23963
|
+
* rowData,
|
|
23964
|
+
* rowIndex,
|
|
23965
|
+
* grid = {},
|
|
23966
|
+
* headerParentColcellComponentMap,
|
|
23967
|
+
* }
|
|
23962
23968
|
*/
|
|
23963
23969
|
function calculateRenderCells(_ref7) {
|
|
23964
23970
|
var columns = _ref7.columns,
|
|
@@ -24061,23 +24067,23 @@ function calculateRenderCells(_ref7) {
|
|
|
24061
24067
|
}, commonRowParams));
|
|
24062
24068
|
}
|
|
24063
24069
|
}
|
|
24064
|
-
/**
|
|
24065
|
-
*
|
|
24066
|
-
* @description 计算表头父节点单元格渲染逻辑
|
|
24067
|
-
* @export
|
|
24068
|
-
* @param {*} {
|
|
24069
|
-
* parentCols,
|
|
24070
|
-
* headerParentColcellComponentMap,
|
|
24071
|
-
* renderParentCells,
|
|
24072
|
-
* rowContainerDom,
|
|
24073
|
-
* isRenderFixedCells,
|
|
24074
|
-
* gridOffsetX,
|
|
24075
|
-
* rowKey,
|
|
24076
|
-
* handleEvent,
|
|
24077
|
-
* rowData,
|
|
24078
|
-
* rowIndex,
|
|
24079
|
-
* grid,
|
|
24080
|
-
* }
|
|
24070
|
+
/**
|
|
24071
|
+
*
|
|
24072
|
+
* @description 计算表头父节点单元格渲染逻辑
|
|
24073
|
+
* @export
|
|
24074
|
+
* @param {*} {
|
|
24075
|
+
* parentCols,
|
|
24076
|
+
* headerParentColcellComponentMap,
|
|
24077
|
+
* renderParentCells,
|
|
24078
|
+
* rowContainerDom,
|
|
24079
|
+
* isRenderFixedCells,
|
|
24080
|
+
* gridOffsetX,
|
|
24081
|
+
* rowKey,
|
|
24082
|
+
* handleEvent,
|
|
24083
|
+
* rowData,
|
|
24084
|
+
* rowIndex,
|
|
24085
|
+
* grid,
|
|
24086
|
+
* }
|
|
24081
24087
|
*/
|
|
24082
24088
|
function calculateHeaderParentColRenderCells(_ref8) {
|
|
24083
24089
|
var parentCols = _ref8.parentCols,
|
|
@@ -24286,15 +24292,15 @@ function smoothEaseOut(t) {
|
|
|
24286
24292
|
return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;
|
|
24287
24293
|
}
|
|
24288
24294
|
|
|
24289
|
-
/**
|
|
24290
|
-
* 平滑滚动到指定位置
|
|
24291
|
-
* @param {Object} options 滚动配置
|
|
24292
|
-
* @param {Number} options.from 起始位置
|
|
24293
|
-
* @param {Number} options.to 目标位置
|
|
24294
|
-
* @param {Number} options.duration 动画持续时间(毫秒)
|
|
24295
|
-
* @param {Function} options.onUpdate 位置更新回调
|
|
24296
|
-
* @param {Function} [options.onComplete] 动画完成回调
|
|
24297
|
-
* @param {Function} [options.easing=easeOutCubic] 缓动函数
|
|
24295
|
+
/**
|
|
24296
|
+
* 平滑滚动到指定位置
|
|
24297
|
+
* @param {Object} options 滚动配置
|
|
24298
|
+
* @param {Number} options.from 起始位置
|
|
24299
|
+
* @param {Number} options.to 目标位置
|
|
24300
|
+
* @param {Number} options.duration 动画持续时间(毫秒)
|
|
24301
|
+
* @param {Function} options.onUpdate 位置更新回调
|
|
24302
|
+
* @param {Function} [options.onComplete] 动画完成回调
|
|
24303
|
+
* @param {Function} [options.easing=easeOutCubic] 缓动函数
|
|
24298
24304
|
*/
|
|
24299
24305
|
function animateScroll(options) {
|
|
24300
24306
|
var from = options.from,
|
|
@@ -24419,11 +24425,11 @@ function animateScroll(options) {
|
|
|
24419
24425
|
this.renderViewportRows();
|
|
24420
24426
|
this.emitScroll();
|
|
24421
24427
|
},
|
|
24422
|
-
/**
|
|
24423
|
-
* 垂直滚动到指定行
|
|
24424
|
-
* @param {Number} rowKey 数据源中的行Key(从0开始)
|
|
24425
|
-
* @param {Number} [offset=0] 额外偏移量(像素)
|
|
24426
|
-
* @param {Number} [duration] 动画持续时间(毫秒)
|
|
24428
|
+
/**
|
|
24429
|
+
* 垂直滚动到指定行
|
|
24430
|
+
* @param {Number} rowKey 数据源中的行Key(从0开始)
|
|
24431
|
+
* @param {Number} [offset=0] 额外偏移量(像素)
|
|
24432
|
+
* @param {Number} [duration] 动画持续时间(毫秒)
|
|
24427
24433
|
*/
|
|
24428
24434
|
scrollToColumn: function scrollToColumn(key) {
|
|
24429
24435
|
var _this = this;
|
|
@@ -24455,11 +24461,11 @@ function animateScroll(options) {
|
|
|
24455
24461
|
this.renderScollXTable(targetScrollLeft);
|
|
24456
24462
|
}
|
|
24457
24463
|
},
|
|
24458
|
-
/**
|
|
24459
|
-
* 垂直滚动到指定行
|
|
24460
|
-
* @param {Number} rowIndex 数据源中的行索引(从0开始)
|
|
24461
|
-
* @param {Number} [offset=0] 额外偏移量(像素)
|
|
24462
|
-
* @param {Number} [duration] 动画持续时间(毫秒)
|
|
24464
|
+
/**
|
|
24465
|
+
* 垂直滚动到指定行
|
|
24466
|
+
* @param {Number} rowIndex 数据源中的行索引(从0开始)
|
|
24467
|
+
* @param {Number} [offset=0] 额外偏移量(像素)
|
|
24468
|
+
* @param {Number} [duration] 动画持续时间(毫秒)
|
|
24463
24469
|
*/
|
|
24464
24470
|
scrollToRow: function scrollToRow(targetIndex) {
|
|
24465
24471
|
var _this2 = this;
|
|
@@ -25497,20 +25503,20 @@ var isNaN_default = /*#__PURE__*/__webpack_require__.n(lodash_isNaN);
|
|
|
25497
25503
|
|
|
25498
25504
|
|
|
25499
25505
|
|
|
25500
|
-
/**
|
|
25501
|
-
* 触摸滚动处理类
|
|
25502
|
-
* 实现移动端触摸滚动及惯性滚动效果
|
|
25506
|
+
/**
|
|
25507
|
+
* 触摸滚动处理类
|
|
25508
|
+
* 实现移动端触摸滚动及惯性滚动效果
|
|
25503
25509
|
*/
|
|
25504
25510
|
var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
25505
|
-
/**
|
|
25506
|
-
* 构造函数
|
|
25507
|
-
* @param {HTMLElement} el - 需要绑定滚动效果的目标元素
|
|
25508
|
-
* @param {Object} options - 配置选项
|
|
25509
|
-
* @param {boolean} options.unScrollX - 是否禁用X轴滚动
|
|
25510
|
-
* @param {boolean} options.unScrollY - 是否禁用Y轴滚动
|
|
25511
|
-
* @param {boolean} options.isShowHorizontal - 是否显示水平滚动条
|
|
25512
|
-
* @param {Function} options.handlerTouchend - 触摸结束回调函数
|
|
25513
|
-
* @param {Function} options.handlerScrollEnd - 滚动结束回调函数
|
|
25511
|
+
/**
|
|
25512
|
+
* 构造函数
|
|
25513
|
+
* @param {HTMLElement} el - 需要绑定滚动效果的目标元素
|
|
25514
|
+
* @param {Object} options - 配置选项
|
|
25515
|
+
* @param {boolean} options.unScrollX - 是否禁用X轴滚动
|
|
25516
|
+
* @param {boolean} options.unScrollY - 是否禁用Y轴滚动
|
|
25517
|
+
* @param {boolean} options.isShowHorizontal - 是否显示水平滚动条
|
|
25518
|
+
* @param {Function} options.handlerTouchend - 触摸结束回调函数
|
|
25519
|
+
* @param {Function} options.handlerScrollEnd - 滚动结束回调函数
|
|
25514
25520
|
*/
|
|
25515
25521
|
function TouchScrolling(el) {
|
|
25516
25522
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -25553,8 +25559,8 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25553
25559
|
this.addEventListeners();
|
|
25554
25560
|
}
|
|
25555
25561
|
|
|
25556
|
-
/**
|
|
25557
|
-
* 添加事件监听器
|
|
25562
|
+
/**
|
|
25563
|
+
* 添加事件监听器
|
|
25558
25564
|
*/
|
|
25559
25565
|
return _createClass(TouchScrolling, [{
|
|
25560
25566
|
key: "addEventListeners",
|
|
@@ -25572,8 +25578,8 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25572
25578
|
this.el.addEventListener('pointermove', pointermove);
|
|
25573
25579
|
}
|
|
25574
25580
|
|
|
25575
|
-
/**
|
|
25576
|
-
* 移除事件监听器
|
|
25581
|
+
/**
|
|
25582
|
+
* 移除事件监听器
|
|
25577
25583
|
*/
|
|
25578
25584
|
}, {
|
|
25579
25585
|
key: "removeEventListeners",
|
|
@@ -25588,10 +25594,10 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25588
25594
|
this.el.removeEventListener('pointermove', pointermove);
|
|
25589
25595
|
}
|
|
25590
25596
|
|
|
25591
|
-
/**
|
|
25592
|
-
* 确保值为有效数字
|
|
25593
|
-
* @param {*} value - 需要转换的值
|
|
25594
|
-
* @returns {number} - 转换后的数字
|
|
25597
|
+
/**
|
|
25598
|
+
* 确保值为有效数字
|
|
25599
|
+
* @param {*} value - 需要转换的值
|
|
25600
|
+
* @returns {number} - 转换后的数字
|
|
25595
25601
|
*/
|
|
25596
25602
|
}, {
|
|
25597
25603
|
key: "ensureNumeric",
|
|
@@ -25600,10 +25606,10 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25600
25606
|
return isNaN_default()(numericValue) ? 0 : numericValue;
|
|
25601
25607
|
}
|
|
25602
25608
|
|
|
25603
|
-
/**
|
|
25604
|
-
* 派发滚轮事件
|
|
25605
|
-
* @param {number} deltaY - Y轴滚动量
|
|
25606
|
-
* @param {number} deltaX - X轴滚动量
|
|
25609
|
+
/**
|
|
25610
|
+
* 派发滚轮事件
|
|
25611
|
+
* @param {number} deltaY - Y轴滚动量
|
|
25612
|
+
* @param {number} deltaX - X轴滚动量
|
|
25607
25613
|
*/
|
|
25608
25614
|
}, {
|
|
25609
25615
|
key: "dispatchWheelEvent",
|
|
@@ -25626,10 +25632,10 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25626
25632
|
this.el.dispatchEvent(wheelEvent);
|
|
25627
25633
|
}
|
|
25628
25634
|
|
|
25629
|
-
/**
|
|
25630
|
-
* 设置滚动属性
|
|
25631
|
-
* @param {string} key - 属性名
|
|
25632
|
-
* @param {*} val - 属性值
|
|
25635
|
+
/**
|
|
25636
|
+
* 设置滚动属性
|
|
25637
|
+
* @param {string} key - 属性名
|
|
25638
|
+
* @param {*} val - 属性值
|
|
25633
25639
|
*/
|
|
25634
25640
|
}, {
|
|
25635
25641
|
key: "setScroll",
|
|
@@ -25639,10 +25645,10 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25639
25645
|
}
|
|
25640
25646
|
}
|
|
25641
25647
|
|
|
25642
|
-
/**
|
|
25643
|
-
* 模拟惯性减速滚动效果
|
|
25644
|
-
* @param {number} decelerationId - 当前减速动画ID
|
|
25645
|
-
* @param {Boolean} isYAndDownToTop - Y轴并且从下至上滚动
|
|
25648
|
+
/**
|
|
25649
|
+
* 模拟惯性减速滚动效果
|
|
25650
|
+
* @param {number} decelerationId - 当前减速动画ID
|
|
25651
|
+
* @param {Boolean} isYAndDownToTop - Y轴并且从下至上滚动
|
|
25646
25652
|
*/
|
|
25647
25653
|
}, {
|
|
25648
25654
|
key: "simulateDeceleratedScrolling",
|
|
@@ -25684,9 +25690,9 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25684
25690
|
var lastTime = performance.now(); // 上次动画帧时间
|
|
25685
25691
|
var elapsedTime = 0; // 已过去的时间
|
|
25686
25692
|
|
|
25687
|
-
/**
|
|
25688
|
-
* 动画帧回调函数
|
|
25689
|
-
* @param {number} timestamp - 当前时间戳
|
|
25693
|
+
/**
|
|
25694
|
+
* 动画帧回调函数
|
|
25695
|
+
* @param {number} timestamp - 当前时间戳
|
|
25690
25696
|
*/
|
|
25691
25697
|
var _step = function step(timestamp) {
|
|
25692
25698
|
var _this$handlerBeforeAn2;
|
|
@@ -25733,9 +25739,9 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25733
25739
|
requestAnimationFrame(_step);
|
|
25734
25740
|
}
|
|
25735
25741
|
|
|
25736
|
-
/**
|
|
25737
|
-
* 触发滚动结束回调
|
|
25738
|
-
* @param {Object|null} direction - 滚动方向对象
|
|
25742
|
+
/**
|
|
25743
|
+
* 触发滚动结束回调
|
|
25744
|
+
* @param {Object|null} direction - 滚动方向对象
|
|
25739
25745
|
*/
|
|
25740
25746
|
}, {
|
|
25741
25747
|
key: "triggerScrollEnd",
|
|
@@ -25753,9 +25759,9 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25753
25759
|
(_this$onScrollEnd = this.onScrollEnd) === null || _this$onScrollEnd === void 0 || _this$onScrollEnd.call(this, direction);
|
|
25754
25760
|
}
|
|
25755
25761
|
|
|
25756
|
-
/**
|
|
25757
|
-
* 触摸开始事件处理
|
|
25758
|
-
* @param {TouchEvent} event - 触摸事件对象
|
|
25762
|
+
/**
|
|
25763
|
+
* 触摸开始事件处理
|
|
25764
|
+
* @param {TouchEvent} event - 触摸事件对象
|
|
25759
25765
|
*/
|
|
25760
25766
|
}, {
|
|
25761
25767
|
key: "onTouchStart",
|
|
@@ -25790,15 +25796,15 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25790
25796
|
(_this$handlerTouchSta = this.handlerTouchStar) === null || _this$handlerTouchSta === void 0 || _this$handlerTouchSta.call(this, event);
|
|
25791
25797
|
}
|
|
25792
25798
|
|
|
25793
|
-
/**
|
|
25794
|
-
* 触摸取消事件处理
|
|
25799
|
+
/**
|
|
25800
|
+
* 触摸取消事件处理
|
|
25795
25801
|
*/
|
|
25796
25802
|
}, {
|
|
25797
25803
|
key: "onTouchCancel",
|
|
25798
25804
|
value: function onTouchCancel() {}
|
|
25799
25805
|
|
|
25800
|
-
/**
|
|
25801
|
-
* 触摸结束事件处理
|
|
25806
|
+
/**
|
|
25807
|
+
* 触摸结束事件处理
|
|
25802
25808
|
*/
|
|
25803
25809
|
}, {
|
|
25804
25810
|
key: "onTouchEnd",
|
|
@@ -25856,9 +25862,9 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25856
25862
|
key: "onPointermove",
|
|
25857
25863
|
value: function onPointermove() {}
|
|
25858
25864
|
|
|
25859
|
-
/**
|
|
25860
|
-
* 触摸移动事件处理
|
|
25861
|
-
* @param {TouchEvent} event - 触摸事件对象
|
|
25865
|
+
/**
|
|
25866
|
+
* 触摸移动事件处理
|
|
25867
|
+
* @param {TouchEvent} event - 触摸事件对象
|
|
25862
25868
|
*/
|
|
25863
25869
|
}, {
|
|
25864
25870
|
key: "onTouchMove",
|
|
@@ -25923,12 +25929,12 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25923
25929
|
}, 150); // 150ms 内没有新的 touchmove 事件则认为停止
|
|
25924
25930
|
}
|
|
25925
25931
|
|
|
25926
|
-
/**
|
|
25927
|
-
* 更新触摸状态
|
|
25928
|
-
* @param {number} y - 当前Y坐标
|
|
25929
|
-
* @param {number} x - 当前X坐标
|
|
25930
|
-
* @param {number} deltaY - Y轴滚动量
|
|
25931
|
-
* @param {number} deltaX - X轴滚动量
|
|
25932
|
+
/**
|
|
25933
|
+
* 更新触摸状态
|
|
25934
|
+
* @param {number} y - 当前Y坐标
|
|
25935
|
+
* @param {number} x - 当前X坐标
|
|
25936
|
+
* @param {number} deltaY - Y轴滚动量
|
|
25937
|
+
* @param {number} deltaX - X轴滚动量
|
|
25932
25938
|
*/
|
|
25933
25939
|
}, {
|
|
25934
25940
|
key: "updateTouchState",
|
|
@@ -25942,8 +25948,8 @@ var touch_scroll_TouchScrolling = /*#__PURE__*/function () {
|
|
|
25942
25948
|
this.touchScrollState.lastDeltaX = deltaX;
|
|
25943
25949
|
}
|
|
25944
25950
|
|
|
25945
|
-
/**
|
|
25946
|
-
* 销毁方法,清理资源
|
|
25951
|
+
/**
|
|
25952
|
+
* 销毁方法,清理资源
|
|
25947
25953
|
*/
|
|
25948
25954
|
}, {
|
|
25949
25955
|
key: "destroy",
|
|
@@ -26167,9 +26173,9 @@ var RowConstructor = pe_tablevue_type_script_lang_js_Vue.extend(pe_table_row);
|
|
|
26167
26173
|
// window.removeEventListener('resize', this.throttleHandleResize)
|
|
26168
26174
|
},
|
|
26169
26175
|
activated: function activated() {
|
|
26170
|
-
/*
|
|
26171
|
-
释放掉,存在一个页面多个表格,路由回来A表格从新被activate挂起,handleVisibility没有走,
|
|
26172
|
-
B表格这时候也会被activate = true给锁死,导致没办法更新白屏问题,比如一个页面存在tabs的场景
|
|
26176
|
+
/*
|
|
26177
|
+
释放掉,存在一个页面多个表格,路由回来A表格从新被activate挂起,handleVisibility没有走,
|
|
26178
|
+
B表格这时候也会被activate = true给锁死,导致没办法更新白屏问题,比如一个页面存在tabs的场景
|
|
26173
26179
|
*/
|
|
26174
26180
|
var isVisible = this.isVisible();
|
|
26175
26181
|
if (isVisible) {
|
|
@@ -33168,10 +33174,10 @@ var table_settings_component = normalizeComponent(
|
|
|
33168
33174
|
}, _callee2);
|
|
33169
33175
|
}))();
|
|
33170
33176
|
},
|
|
33171
|
-
/**
|
|
33172
|
-
* 用户变更列显示/隐藏后,保存状态
|
|
33173
|
-
* @param {*} columns
|
|
33174
|
-
* @returns
|
|
33177
|
+
/**
|
|
33178
|
+
* 用户变更列显示/隐藏后,保存状态
|
|
33179
|
+
* @param {*} columns
|
|
33180
|
+
* @returns
|
|
33175
33181
|
*/
|
|
33176
33182
|
saveConfigToHttp: function saveConfigToHttp(columns) {
|
|
33177
33183
|
var _this4 = this;
|
|
@@ -33209,9 +33215,9 @@ var table_settings_component = normalizeComponent(
|
|
|
33209
33215
|
}, _callee3);
|
|
33210
33216
|
}))();
|
|
33211
33217
|
},
|
|
33212
|
-
/**
|
|
33213
|
-
* 个性设置重置
|
|
33214
|
-
* @returns
|
|
33218
|
+
/**
|
|
33219
|
+
* 个性设置重置
|
|
33220
|
+
* @returns
|
|
33215
33221
|
*/
|
|
33216
33222
|
resetToHttp: function resetToHttp() {
|
|
33217
33223
|
var _this5 = this;
|
|
@@ -34356,11 +34362,11 @@ var addRowLength = 500;
|
|
|
34356
34362
|
return _ref4.apply(this, arguments);
|
|
34357
34363
|
};
|
|
34358
34364
|
}(), 100),
|
|
34359
|
-
/**
|
|
34360
|
-
* 基于ID过滤并合并两个大型数组,保持原始顺序
|
|
34361
|
-
* @param {Array} arr1 第一个数组(将被过滤)
|
|
34362
|
-
* @param {Array} arr2 第二个数组(将完整保留)
|
|
34363
|
-
* @returns {Array} 合并后的新数组
|
|
34365
|
+
/**
|
|
34366
|
+
* 基于ID过滤并合并两个大型数组,保持原始顺序
|
|
34367
|
+
* @param {Array} arr1 第一个数组(将被过滤)
|
|
34368
|
+
* @param {Array} arr2 第二个数组(将完整保留)
|
|
34369
|
+
* @returns {Array} 合并后的新数组
|
|
34364
34370
|
*/
|
|
34365
34371
|
filterAndMergeArrays: function filterAndMergeArrays(arr1, arr2) {
|
|
34366
34372
|
// 创建第二个数组的ID集合用于快速查找
|
|
@@ -35453,4 +35459,5 @@ module.exports = isSymbol;
|
|
|
35453
35459
|
/***/ })
|
|
35454
35460
|
|
|
35455
35461
|
/******/ });
|
|
35456
|
-
|
|
35462
|
+
});
|
|
35463
|
+
//# sourceMappingURL=ks-query-table.umd.js.map
|