@nokecy/qc-ui 1.1.24 → 1.1.25
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/cjs/ag-grid-plus/ag-gridPlus.js +15 -3
- package/dist/cjs/ag-grid-plus/interface.d.ts +8 -0
- package/dist/cjs/ag-grid-plus/setting/ColumnSetting.js +13 -21
- package/dist/cjs/draggableModal/style.less +10 -4
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +15 -3
- package/dist/esm/ag-grid-plus/interface.d.ts +8 -0
- package/dist/esm/ag-grid-plus/setting/ColumnSetting.js +13 -21
- package/dist/esm/draggableModal/style.less +10 -4
- package/dist/umd/qc-ui.min.css +1 -1
- package/dist/umd/qc-ui.min.js +1 -1
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ var _schemeDataMigration = require("./shared/utils/schemeDataMigration");
|
|
|
35
35
|
var _sanitize = require("./utils/sanitize");
|
|
36
36
|
var _errors = require("./errors");
|
|
37
37
|
var _logger = require("./utils/logger");
|
|
38
|
-
var _excluded = ["style", "loading", "params", "request", "dataSource", "treeKeyName", "treeParentName", "rowData", "gridRef", "headerTitle", "toolBarRender", "search", "hideTool", "onGridReady", "gridKey", "children", "defaultSearchExpand", "overlayNoRowsTemplateText", "queryDefaultRows", "onSelectedRowsChange", "enableClickSelection", "rowSelection"];
|
|
38
|
+
var _excluded = ["style", "loading", "params", "request", "dataSource", "treeKeyName", "treeParentName", "rowData", "gridRef", "headerTitle", "toolBarRender", "search", "hideTool", "onGridReady", "gridKey", "children", "defaultSearchExpand", "overlayNoRowsTemplateText", "queryDefaultRows", "onSelectedRowsChange", "enableClickSelection", "rowSelection", "useNativeTreeFilter"];
|
|
39
39
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
40
40
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
41
41
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -91,6 +91,8 @@ function AgGridPlus(props) {
|
|
|
91
91
|
_props$enableClickSel = props.enableClickSelection,
|
|
92
92
|
enableClickSelection = _props$enableClickSel === void 0 ? true : _props$enableClickSel,
|
|
93
93
|
propsRowSelection = props.rowSelection,
|
|
94
|
+
_props$useNativeTreeF = props.useNativeTreeFilter,
|
|
95
|
+
useNativeTreeFilter = _props$useNativeTreeF === void 0 ? false : _props$useNativeTreeF,
|
|
94
96
|
rest = _objectWithoutProperties(props, _excluded);
|
|
95
97
|
var _useGridPlusColumnSta = (0, _.useGridPlusColumnState)(),
|
|
96
98
|
onSaveColumnState = _useGridPlusColumnSta.onSaveColumnState,
|
|
@@ -1146,8 +1148,14 @@ function AgGridPlus(props) {
|
|
|
1146
1148
|
calculateSum();
|
|
1147
1149
|
}, [calculateSum]);
|
|
1148
1150
|
var rowDataMemo = (0, _react.useMemo)(function () {
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
+
// 【兼容】根据 useNativeTreeFilter 决定是否使用原生树形过滤
|
|
1152
|
+
// - useNativeTreeFilter=true: 直接传入原始数据,由 AG-Grid 原生处理树形结构(支持列头过滤所有层级)
|
|
1153
|
+
// - useNativeTreeFilter=false: 使用旧的 flatten(toTree()) 逻辑(默认,保持兼容)
|
|
1154
|
+
if (props.treeData && !useNativeTreeFilter) {
|
|
1155
|
+
return (0, _utils.flatten)((0, _utils.toTree)(rowData, treeKeyName !== null && treeKeyName !== void 0 ? treeKeyName : "id", treeParentName !== null && treeParentName !== void 0 ? treeParentName : "parentId"), treeKeyName !== null && treeKeyName !== void 0 ? treeKeyName : "id");
|
|
1156
|
+
}
|
|
1157
|
+
return rowData;
|
|
1158
|
+
}, [rowData, props.treeData, treeKeyName, treeParentName, useNativeTreeFilter]);
|
|
1151
1159
|
var actionDom = toolBarRender && toolBarRender(apiRef.current, (0, _utils.convertFilterModel)(queryFilter, allColDefsRef.current), queryFilter, {
|
|
1152
1160
|
current: pagination.current,
|
|
1153
1161
|
skipCount: pagination.current == 1 ? 0 : (pagination.current - 1) * pagination.pageSize,
|
|
@@ -1370,6 +1378,10 @@ function AgGridPlus(props) {
|
|
|
1370
1378
|
enableRangeSelection: true,
|
|
1371
1379
|
suppressCopyRowsToClipboard: true,
|
|
1372
1380
|
autoGroupColumnDef: autoGroupColumnDef
|
|
1381
|
+
// 【兼容】原生树形数据配置:只有 useNativeTreeFilter=true 时才启用
|
|
1382
|
+
// 使用 treeDataParentIdField 让 AG-Grid 原生处理树形结构,支持列头过滤所有层级
|
|
1383
|
+
,
|
|
1384
|
+
treeDataParentIdField: props.treeData && useNativeTreeFilter ? treeParentName !== null && treeParentName !== void 0 ? treeParentName : "parentId" : undefined
|
|
1373
1385
|
//指定客户端模式
|
|
1374
1386
|
,
|
|
1375
1387
|
rowModelType: "clientSide",
|
|
@@ -87,6 +87,14 @@ interface GridProps extends AgGridReactProps {
|
|
|
87
87
|
* - 兼容旧的字符串 API('single' | 'multiple')
|
|
88
88
|
*/
|
|
89
89
|
enableClickSelection?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* 是否使用 AG-Grid 原生树形数据过滤
|
|
92
|
+
* - true: 使用原生 treeDataParentIdField 配置,列头过滤器可以过滤所有层级的数据
|
|
93
|
+
* - false: 使用旧的 flatten(toTree()) 逻辑(默认,保持兼容)
|
|
94
|
+
*
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
useNativeTreeFilter?: boolean;
|
|
90
98
|
}
|
|
91
99
|
interface AgGridColumnPropsClone extends ColDef {
|
|
92
100
|
/**
|
|
@@ -360,7 +360,7 @@ var ColumnSetting = function ColumnSetting(_ref) {
|
|
|
360
360
|
* 优化逻辑:先保存配置到存储,再直接应用到 Grid,不依赖 handleLoadScheme
|
|
361
361
|
*/
|
|
362
362
|
var handleSaveColumns = (0, _react.useCallback)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
363
|
-
var values, flatConfig, configToSave, invalidColumns, filterModel, savedScheme, createdAt, updatedAt, schemeWithoutTimestamps, defaultScheme, _createdAt, _updatedAt, _schemeWithoutTimestamps,
|
|
363
|
+
var values, flatConfig, configToSave, invalidColumns, filterModel, savedScheme, createdAt, updatedAt, schemeWithoutTimestamps, defaultScheme, _createdAt, _updatedAt, _schemeWithoutTimestamps, gridColumnDefs, columnState;
|
|
364
364
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
365
365
|
while (1) switch (_context2.prev = _context2.next) {
|
|
366
366
|
case 0:
|
|
@@ -452,23 +452,15 @@ var ColumnSetting = function ColumnSetting(_ref) {
|
|
|
452
452
|
return setTimeout(resolve, 100);
|
|
453
453
|
});
|
|
454
454
|
case 33:
|
|
455
|
-
// 1. 检查是否包含分组配置
|
|
456
|
-
hasGroups = savedScheme.columnConfig.some(function (item) {
|
|
457
|
-
return item.type === 'group';
|
|
458
|
-
}); // 如果包含分组,先更新 columnDefs
|
|
459
|
-
if (!hasGroups) {
|
|
460
|
-
_context2.next = 39;
|
|
461
|
-
break;
|
|
462
|
-
}
|
|
463
455
|
gridColumnDefs = (0, _columnGroupUtils.flatConfigToGridState)(savedScheme.columnConfig, allColDefs);
|
|
464
456
|
gridApi.setGridOption('columnDefs', gridColumnDefs);
|
|
465
457
|
|
|
466
458
|
// 等待 columnDefs 更新完成
|
|
467
|
-
_context2.next =
|
|
459
|
+
_context2.next = 37;
|
|
468
460
|
return new Promise(function (resolve) {
|
|
469
461
|
return setTimeout(resolve, 100);
|
|
470
462
|
});
|
|
471
|
-
case
|
|
463
|
+
case 37:
|
|
472
464
|
columnState = (0, _columnGroupUtils.flatConfigToColumnState)(savedScheme.columnConfig);
|
|
473
465
|
gridApi.applyColumnState({
|
|
474
466
|
state: columnState,
|
|
@@ -482,31 +474,31 @@ var ColumnSetting = function ColumnSetting(_ref) {
|
|
|
482
474
|
|
|
483
475
|
// 4. 设置为当前方案(如果不是当前方案)
|
|
484
476
|
if (!(!currentScheme || savedScheme.id !== currentScheme.id)) {
|
|
485
|
-
_context2.next =
|
|
477
|
+
_context2.next = 43;
|
|
486
478
|
break;
|
|
487
479
|
}
|
|
488
|
-
_context2.next =
|
|
480
|
+
_context2.next = 43;
|
|
489
481
|
return setCurrentColumnScheme === null || setCurrentColumnScheme === void 0 ? void 0 : setCurrentColumnScheme(gridKey, savedScheme.id);
|
|
490
|
-
case
|
|
491
|
-
_context2.next =
|
|
482
|
+
case 43:
|
|
483
|
+
_context2.next = 45;
|
|
492
484
|
return new Promise(function (resolve) {
|
|
493
485
|
return setTimeout(resolve, 50);
|
|
494
486
|
});
|
|
495
|
-
case
|
|
487
|
+
case 45:
|
|
496
488
|
// 5. 关闭弹窗
|
|
497
489
|
onClose();
|
|
498
|
-
_context2.next =
|
|
490
|
+
_context2.next = 52;
|
|
499
491
|
break;
|
|
500
|
-
case
|
|
501
|
-
_context2.prev =
|
|
492
|
+
case 48:
|
|
493
|
+
_context2.prev = 48;
|
|
502
494
|
_context2.t0 = _context2["catch"](8);
|
|
503
495
|
console.error('保存列配置到方案失败:', _context2.t0);
|
|
504
496
|
_antd.message.error('保存列配置失败');
|
|
505
|
-
case
|
|
497
|
+
case 52:
|
|
506
498
|
case "end":
|
|
507
499
|
return _context2.stop();
|
|
508
500
|
}
|
|
509
|
-
}, _callee2, null, [[8,
|
|
501
|
+
}, _callee2, null, [[8, 48]]);
|
|
510
502
|
})), [form, gridApi, saveColumnScheme, setCurrentColumnScheme, currentScheme, schemes, gridKey, allColDefs, onClose]);
|
|
511
503
|
|
|
512
504
|
// 保存为新方案
|
|
@@ -25,15 +25,20 @@
|
|
|
25
25
|
flex-shrink: 0;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
// 确保 Modal 内容不会阻止 resize-handle 的鼠标事件
|
|
30
|
+
.ant-modal-content {
|
|
31
|
+
pointer-events: auto;
|
|
32
|
+
}
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
// 拖动调整大小的手柄样式
|
|
31
36
|
.resize-handle {
|
|
32
37
|
position: absolute;
|
|
33
|
-
z-index:
|
|
38
|
+
z-index: 9999; // 确保在 Modal 内容之上
|
|
34
39
|
background: transparent;
|
|
35
40
|
transition: all 0.2s ease;
|
|
36
|
-
pointer-events: auto;
|
|
41
|
+
pointer-events: auto !important; // 确保可以接收鼠标事件
|
|
37
42
|
opacity: 0;
|
|
38
43
|
|
|
39
44
|
&:hover {
|
|
@@ -43,8 +48,9 @@
|
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
// 当鼠标悬停在 modal 上时显示手柄
|
|
46
|
-
.ant-modal:hover .resize-handle
|
|
47
|
-
|
|
51
|
+
.ant-modal:hover .resize-handle,
|
|
52
|
+
div:hover > .resize-handle {
|
|
53
|
+
opacity: 0.5;
|
|
48
54
|
background: rgba(24, 144, 255, 0.15);
|
|
49
55
|
}
|
|
50
56
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sumBy from "lodash/sumBy";
|
|
2
2
|
import _uniqueId from "lodash/uniqueId";
|
|
3
3
|
import _isArray from "lodash/isArray";
|
|
4
|
-
var _excluded = ["style", "loading", "params", "request", "dataSource", "treeKeyName", "treeParentName", "rowData", "gridRef", "headerTitle", "toolBarRender", "search", "hideTool", "onGridReady", "gridKey", "children", "defaultSearchExpand", "overlayNoRowsTemplateText", "queryDefaultRows", "onSelectedRowsChange", "enableClickSelection", "rowSelection"];
|
|
4
|
+
var _excluded = ["style", "loading", "params", "request", "dataSource", "treeKeyName", "treeParentName", "rowData", "gridRef", "headerTitle", "toolBarRender", "search", "hideTool", "onGridReady", "gridKey", "children", "defaultSearchExpand", "overlayNoRowsTemplateText", "queryDefaultRows", "onSelectedRowsChange", "enableClickSelection", "rowSelection", "useNativeTreeFilter"];
|
|
5
5
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
6
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
7
7
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -83,6 +83,8 @@ function AgGridPlus(props) {
|
|
|
83
83
|
_props$enableClickSel = props.enableClickSelection,
|
|
84
84
|
enableClickSelection = _props$enableClickSel === void 0 ? true : _props$enableClickSel,
|
|
85
85
|
propsRowSelection = props.rowSelection,
|
|
86
|
+
_props$useNativeTreeF = props.useNativeTreeFilter,
|
|
87
|
+
useNativeTreeFilter = _props$useNativeTreeF === void 0 ? false : _props$useNativeTreeF,
|
|
86
88
|
rest = _objectWithoutProperties(props, _excluded);
|
|
87
89
|
var _useGridPlusColumnSta = useGridPlusColumnState(),
|
|
88
90
|
onSaveColumnState = _useGridPlusColumnSta.onSaveColumnState,
|
|
@@ -1138,8 +1140,14 @@ function AgGridPlus(props) {
|
|
|
1138
1140
|
calculateSum();
|
|
1139
1141
|
}, [calculateSum]);
|
|
1140
1142
|
var rowDataMemo = useMemo(function () {
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
+
// 【兼容】根据 useNativeTreeFilter 决定是否使用原生树形过滤
|
|
1144
|
+
// - useNativeTreeFilter=true: 直接传入原始数据,由 AG-Grid 原生处理树形结构(支持列头过滤所有层级)
|
|
1145
|
+
// - useNativeTreeFilter=false: 使用旧的 flatten(toTree()) 逻辑(默认,保持兼容)
|
|
1146
|
+
if (props.treeData && !useNativeTreeFilter) {
|
|
1147
|
+
return flatten(toTree(rowData, treeKeyName !== null && treeKeyName !== void 0 ? treeKeyName : "id", treeParentName !== null && treeParentName !== void 0 ? treeParentName : "parentId"), treeKeyName !== null && treeKeyName !== void 0 ? treeKeyName : "id");
|
|
1148
|
+
}
|
|
1149
|
+
return rowData;
|
|
1150
|
+
}, [rowData, props.treeData, treeKeyName, treeParentName, useNativeTreeFilter]);
|
|
1143
1151
|
var actionDom = toolBarRender && toolBarRender(apiRef.current, convertFilterModel(queryFilter, allColDefsRef.current), queryFilter, {
|
|
1144
1152
|
current: pagination.current,
|
|
1145
1153
|
skipCount: pagination.current == 1 ? 0 : (pagination.current - 1) * pagination.pageSize,
|
|
@@ -1362,6 +1370,10 @@ function AgGridPlus(props) {
|
|
|
1362
1370
|
enableRangeSelection: true,
|
|
1363
1371
|
suppressCopyRowsToClipboard: true,
|
|
1364
1372
|
autoGroupColumnDef: autoGroupColumnDef
|
|
1373
|
+
// 【兼容】原生树形数据配置:只有 useNativeTreeFilter=true 时才启用
|
|
1374
|
+
// 使用 treeDataParentIdField 让 AG-Grid 原生处理树形结构,支持列头过滤所有层级
|
|
1375
|
+
,
|
|
1376
|
+
treeDataParentIdField: props.treeData && useNativeTreeFilter ? treeParentName !== null && treeParentName !== void 0 ? treeParentName : "parentId" : undefined
|
|
1365
1377
|
//指定客户端模式
|
|
1366
1378
|
,
|
|
1367
1379
|
rowModelType: "clientSide",
|
|
@@ -87,6 +87,14 @@ interface GridProps extends AgGridReactProps {
|
|
|
87
87
|
* - 兼容旧的字符串 API('single' | 'multiple')
|
|
88
88
|
*/
|
|
89
89
|
enableClickSelection?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* 是否使用 AG-Grid 原生树形数据过滤
|
|
92
|
+
* - true: 使用原生 treeDataParentIdField 配置,列头过滤器可以过滤所有层级的数据
|
|
93
|
+
* - false: 使用旧的 flatten(toTree()) 逻辑(默认,保持兼容)
|
|
94
|
+
*
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
useNativeTreeFilter?: boolean;
|
|
90
98
|
}
|
|
91
99
|
interface AgGridColumnPropsClone extends ColDef {
|
|
92
100
|
/**
|
|
@@ -351,7 +351,7 @@ var ColumnSetting = function ColumnSetting(_ref) {
|
|
|
351
351
|
* 优化逻辑:先保存配置到存储,再直接应用到 Grid,不依赖 handleLoadScheme
|
|
352
352
|
*/
|
|
353
353
|
var handleSaveColumns = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
354
|
-
var values, flatConfig, configToSave, invalidColumns, filterModel, savedScheme, createdAt, updatedAt, schemeWithoutTimestamps, defaultScheme, _createdAt, _updatedAt, _schemeWithoutTimestamps,
|
|
354
|
+
var values, flatConfig, configToSave, invalidColumns, filterModel, savedScheme, createdAt, updatedAt, schemeWithoutTimestamps, defaultScheme, _createdAt, _updatedAt, _schemeWithoutTimestamps, gridColumnDefs, columnState;
|
|
355
355
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
356
356
|
while (1) switch (_context2.prev = _context2.next) {
|
|
357
357
|
case 0:
|
|
@@ -443,23 +443,15 @@ var ColumnSetting = function ColumnSetting(_ref) {
|
|
|
443
443
|
return setTimeout(resolve, 100);
|
|
444
444
|
});
|
|
445
445
|
case 33:
|
|
446
|
-
// 1. 检查是否包含分组配置
|
|
447
|
-
hasGroups = savedScheme.columnConfig.some(function (item) {
|
|
448
|
-
return item.type === 'group';
|
|
449
|
-
}); // 如果包含分组,先更新 columnDefs
|
|
450
|
-
if (!hasGroups) {
|
|
451
|
-
_context2.next = 39;
|
|
452
|
-
break;
|
|
453
|
-
}
|
|
454
446
|
gridColumnDefs = flatConfigToGridState(savedScheme.columnConfig, allColDefs);
|
|
455
447
|
gridApi.setGridOption('columnDefs', gridColumnDefs);
|
|
456
448
|
|
|
457
449
|
// 等待 columnDefs 更新完成
|
|
458
|
-
_context2.next =
|
|
450
|
+
_context2.next = 37;
|
|
459
451
|
return new Promise(function (resolve) {
|
|
460
452
|
return setTimeout(resolve, 100);
|
|
461
453
|
});
|
|
462
|
-
case
|
|
454
|
+
case 37:
|
|
463
455
|
columnState = flatConfigToColumnState(savedScheme.columnConfig);
|
|
464
456
|
gridApi.applyColumnState({
|
|
465
457
|
state: columnState,
|
|
@@ -473,31 +465,31 @@ var ColumnSetting = function ColumnSetting(_ref) {
|
|
|
473
465
|
|
|
474
466
|
// 4. 设置为当前方案(如果不是当前方案)
|
|
475
467
|
if (!(!currentScheme || savedScheme.id !== currentScheme.id)) {
|
|
476
|
-
_context2.next =
|
|
468
|
+
_context2.next = 43;
|
|
477
469
|
break;
|
|
478
470
|
}
|
|
479
|
-
_context2.next =
|
|
471
|
+
_context2.next = 43;
|
|
480
472
|
return setCurrentColumnScheme === null || setCurrentColumnScheme === void 0 ? void 0 : setCurrentColumnScheme(gridKey, savedScheme.id);
|
|
481
|
-
case
|
|
482
|
-
_context2.next =
|
|
473
|
+
case 43:
|
|
474
|
+
_context2.next = 45;
|
|
483
475
|
return new Promise(function (resolve) {
|
|
484
476
|
return setTimeout(resolve, 50);
|
|
485
477
|
});
|
|
486
|
-
case
|
|
478
|
+
case 45:
|
|
487
479
|
// 5. 关闭弹窗
|
|
488
480
|
onClose();
|
|
489
|
-
_context2.next =
|
|
481
|
+
_context2.next = 52;
|
|
490
482
|
break;
|
|
491
|
-
case
|
|
492
|
-
_context2.prev =
|
|
483
|
+
case 48:
|
|
484
|
+
_context2.prev = 48;
|
|
493
485
|
_context2.t0 = _context2["catch"](8);
|
|
494
486
|
console.error('保存列配置到方案失败:', _context2.t0);
|
|
495
487
|
message.error('保存列配置失败');
|
|
496
|
-
case
|
|
488
|
+
case 52:
|
|
497
489
|
case "end":
|
|
498
490
|
return _context2.stop();
|
|
499
491
|
}
|
|
500
|
-
}, _callee2, null, [[8,
|
|
492
|
+
}, _callee2, null, [[8, 48]]);
|
|
501
493
|
})), [form, gridApi, saveColumnScheme, setCurrentColumnScheme, currentScheme, schemes, gridKey, allColDefs, onClose]);
|
|
502
494
|
|
|
503
495
|
// 保存为新方案
|
|
@@ -25,15 +25,20 @@
|
|
|
25
25
|
flex-shrink: 0;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
// 确保 Modal 内容不会阻止 resize-handle 的鼠标事件
|
|
30
|
+
.ant-modal-content {
|
|
31
|
+
pointer-events: auto;
|
|
32
|
+
}
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
// 拖动调整大小的手柄样式
|
|
31
36
|
.resize-handle {
|
|
32
37
|
position: absolute;
|
|
33
|
-
z-index:
|
|
38
|
+
z-index: 9999; // 确保在 Modal 内容之上
|
|
34
39
|
background: transparent;
|
|
35
40
|
transition: all 0.2s ease;
|
|
36
|
-
pointer-events: auto;
|
|
41
|
+
pointer-events: auto !important; // 确保可以接收鼠标事件
|
|
37
42
|
opacity: 0;
|
|
38
43
|
|
|
39
44
|
&:hover {
|
|
@@ -43,8 +48,9 @@
|
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
// 当鼠标悬停在 modal 上时显示手柄
|
|
46
|
-
.ant-modal:hover .resize-handle
|
|
47
|
-
|
|
51
|
+
.ant-modal:hover .resize-handle,
|
|
52
|
+
div:hover > .resize-handle {
|
|
53
|
+
opacity: 0.5;
|
|
48
54
|
background: rgba(24, 144, 255, 0.15);
|
|
49
55
|
}
|
|
50
56
|
|