@kdcloudjs/table 1.1.5-canary.8 → 1.1.5-canary.9
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 -24
- package/dist/@kdcloudjs/table.js.map +1 -1
- package/dist/@kdcloudjs/table.min.css +1 -1
- package/dist/@kdcloudjs/table.min.js +2 -2
- package/dist/@kdcloudjs/table.min.js.map +1 -1
- package/es/table/pipeline/features/contextMenu.js +9 -24
- package/lib/table/pipeline/features/contextMenu.js +8 -24
- package/package.json +1 -1
package/dist/@kdcloudjs/table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @kdcloudjs/table v1.1.5-canary.
|
|
3
|
+
* @kdcloudjs/table v1.1.5-canary.8
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2020-present, Kingdee, Inc.
|
|
6
6
|
* All rights reserved.
|
|
@@ -6498,7 +6498,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6498
6498
|
|
|
6499
6499
|
|
|
6500
6500
|
|
|
6501
|
-
var stateKey = 'contextMenu';
|
|
6502
6501
|
function contextMenu() {
|
|
6503
6502
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6504
6503
|
return function step(pipeline) {
|
|
@@ -6536,13 +6535,11 @@ function contextMenu() {
|
|
|
6536
6535
|
};
|
|
6537
6536
|
|
|
6538
6537
|
var onContextMenu = function onContextMenu(e) {
|
|
6539
|
-
if (
|
|
6540
|
-
|
|
6538
|
+
if (canShowContextMenu(e, pipeline)) {
|
|
6539
|
+
e.preventDefault();
|
|
6540
|
+
e.stopPropagation();
|
|
6541
|
+
showContextMenu(e);
|
|
6541
6542
|
}
|
|
6542
|
-
|
|
6543
|
-
e.preventDefault();
|
|
6544
|
-
e.stopPropagation();
|
|
6545
|
-
showContextMenu(e);
|
|
6546
6543
|
};
|
|
6547
6544
|
|
|
6548
6545
|
pipeline.addTableProps({
|
|
@@ -6879,24 +6876,12 @@ function isElementInsideTheFooter(ele) {
|
|
|
6879
6876
|
}
|
|
6880
6877
|
|
|
6881
6878
|
return false;
|
|
6882
|
-
}
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
function suppressShowContextMenu(e) {
|
|
6886
|
-
var path = Object(_utils__WEBPACK_IMPORTED_MODULE_11__["getEventPath"])(e.nativeEvent);
|
|
6887
|
-
var pointIndex = 0;
|
|
6888
|
-
|
|
6889
|
-
while (pointIndex < path.length) {
|
|
6890
|
-
var ele = path[pointIndex];
|
|
6891
|
-
|
|
6892
|
-
if (ele.classList.contains(_base_styles__WEBPACK_IMPORTED_MODULE_14__["Classes"].tableBody) || ele.classList.contains(_base_styles__WEBPACK_IMPORTED_MODULE_14__["Classes"].tableFooter)) {
|
|
6893
|
-
return false;
|
|
6894
|
-
}
|
|
6879
|
+
}
|
|
6895
6880
|
|
|
6896
|
-
|
|
6897
|
-
|
|
6881
|
+
function canShowContextMenu(e, pipeline) {
|
|
6882
|
+
var _pipeline$ref$current, _pipeline$ref$current2;
|
|
6898
6883
|
|
|
6899
|
-
return
|
|
6884
|
+
return ((_pipeline$ref$current = pipeline.ref.current.domHelper) === null || _pipeline$ref$current === void 0 ? void 0 : _pipeline$ref$current.tableBody.contains(e.target)) || ((_pipeline$ref$current2 = pipeline.ref.current.domHelper) === null || _pipeline$ref$current2 === void 0 ? void 0 : _pipeline$ref$current2.tableFooter.contains(e.target));
|
|
6900
6885
|
} // 默认选项
|
|
6901
6886
|
|
|
6902
6887
|
|