@arim-aisdc/public-components 2.3.1-9.1 → 2.3.1-9.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["open", "title", "okText", "hasfooter", "footer", "width", "size", "renderContent", "handleConfirm", "handleCancel", "confirmLoading", "maskClosable", "bodyStyle", "afterClose", "enableResizing", "enableDragging", "minResizeWidth", "minResizeHeight"];
|
|
2
|
+
var _excluded = ["open", "title", "okText", "hasfooter", "footer", "width", "size", "renderContent", "handleConfirm", "handleCancel", "confirmLoading", "maskClosable", "bodyStyle", "afterClose", "enableResizing", "enableDragging", "minResizeWidth", "minResizeHeight", "maxResizeWidth", "maxResizeHeight"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -55,6 +55,8 @@ var CenterModal = function CenterModal(_ref) {
|
|
|
55
55
|
minResizeWidth = _ref$minResizeWidth === void 0 ? 200 : _ref$minResizeWidth,
|
|
56
56
|
_ref$minResizeHeight = _ref.minResizeHeight,
|
|
57
57
|
minResizeHeight = _ref$minResizeHeight === void 0 ? 200 : _ref$minResizeHeight,
|
|
58
|
+
maxResizeWidth = _ref.maxResizeWidth,
|
|
59
|
+
maxResizeHeight = _ref.maxResizeHeight,
|
|
58
60
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
59
61
|
var modalRef = useRef(null);
|
|
60
62
|
var modalBodyRef = useRef(null);
|
|
@@ -82,11 +84,12 @@ var CenterModal = function CenterModal(_ref) {
|
|
|
82
84
|
}
|
|
83
85
|
}, [modalBodyRef.current]);
|
|
84
86
|
var adjustResize = function adjustResize(e, direction, ref, delta, position) {
|
|
85
|
-
var _ref$querySelector, _ref$style$height, _ref$style$width;
|
|
86
|
-
console.log(ref.style.height, 'onResize');
|
|
87
|
+
var _ref$querySelector, _document$querySelect, _ref$style$height, _ref$style$width;
|
|
87
88
|
var modalContent = (_ref$querySelector = ref.querySelector('.ant-modal-content')) === null || _ref$querySelector === void 0 ? void 0 : _ref$querySelector.getBoundingClientRect();
|
|
88
89
|
var modalContentHeight = Math.ceil(modalContent.height);
|
|
89
90
|
var modalContentWidth = Math.ceil(modalContent.width);
|
|
91
|
+
console.log(ref.style.height, modalContent.height, modalContentHeight, 'onResize');
|
|
92
|
+
console.log(ref.style.height, (_document$querySelect = document.querySelector('.ant-modal-content')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.getBoundingClientRect(), 'onResize');
|
|
90
93
|
var refHeight = Number((_ref$style$height = ref.style.height) === null || _ref$style$height === void 0 || (_ref$style$height = _ref$style$height.split('px')) === null || _ref$style$height === void 0 ? void 0 : _ref$style$height[0]);
|
|
91
94
|
var refWidth = Number((_ref$style$width = ref.style.width) === null || _ref$style$width === void 0 || (_ref$style$width = _ref$style$width.split('px')) === null || _ref$style$width === void 0 ? void 0 : _ref$style$width[0]);
|
|
92
95
|
if ((direction === 'left' || direction === 'right') && modalContentHeight !== refHeight) {
|
|
@@ -149,7 +152,10 @@ var CenterModal = function CenterModal(_ref) {
|
|
|
149
152
|
overflow: 'hidden' // 添加overflow隐藏
|
|
150
153
|
},
|
|
151
154
|
minWidth: minResizeWidth,
|
|
152
|
-
minHeight: minResizeHeight
|
|
155
|
+
minHeight: minResizeHeight
|
|
156
|
+
// maxWidth={maxResizeWidth}
|
|
157
|
+
// maxHeight={maxResizeHeight}
|
|
158
|
+
,
|
|
153
159
|
children: modal
|
|
154
160
|
});
|
|
155
161
|
}
|
|
@@ -25,6 +25,8 @@ export interface CenterModalPropsType extends ModalProps {
|
|
|
25
25
|
enableDragging?: boolean;
|
|
26
26
|
minResizeWidth?: string | number;
|
|
27
27
|
minResizeHeight?: string | number;
|
|
28
|
+
maxResizeWidth?: string | number;
|
|
29
|
+
maxResizeHeight?: string | number;
|
|
28
30
|
}
|
|
29
31
|
export type ModalSizeType = {
|
|
30
32
|
width: number | string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TableMaxColumnType } from "../../type";
|
|
2
|
-
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
3
|
-
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
4
|
-
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
5
|
-
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
2
|
+
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
3
|
+
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
4
|
+
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
5
|
+
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
6
6
|
declare const customSortFns: {
|
|
7
|
-
numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
8
|
-
stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
9
|
-
timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
10
|
-
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
7
|
+
numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
8
|
+
stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
9
|
+
timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
10
|
+
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
11
11
|
};
|
|
12
12
|
export default customSortFns;
|
|
13
13
|
export type SortFnType = keyof typeof customSortFns | undefined;
|