@zw-team/react-lib 1.0.1
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/README.md +207 -0
- package/dist/components/AccessReport/index.d.ts +29 -0
- package/dist/components/AccessReport/index.js +129 -0
- package/dist/components/Avatar/Avatar.d.ts +3 -0
- package/dist/components/Avatar/Avatar.js +58 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/index.js +2 -0
- package/dist/components/Avatar/types.d.ts +9 -0
- package/dist/components/Avatar/types.js +0 -0
- package/dist/components/Block/Block.css +8 -0
- package/dist/components/Block/Block.d.ts +4 -0
- package/dist/components/Block/Block.js +11 -0
- package/dist/components/Block/index.d.ts +2 -0
- package/dist/components/Block/index.js +2 -0
- package/dist/components/Block/types.d.ts +3 -0
- package/dist/components/Block/types.js +0 -0
- package/dist/components/ConfigProvider/ConfigContext.d.ts +4 -0
- package/dist/components/ConfigProvider/ConfigContext.js +19 -0
- package/dist/components/ConfigProvider/ConfigProvider.d.ts +4 -0
- package/dist/components/ConfigProvider/ConfigProvider.js +57 -0
- package/dist/components/ConfigProvider/index.d.ts +2 -0
- package/dist/components/ConfigProvider/index.js +2 -0
- package/dist/components/ConfigProvider/types.d.ts +19 -0
- package/dist/components/ConfigProvider/types.js +0 -0
- package/dist/components/CustomColumn/CustomColumn.d.ts +4 -0
- package/dist/components/CustomColumn/CustomColumn.js +388 -0
- package/dist/components/CustomColumn/CustomColumn.scss +135 -0
- package/dist/components/CustomColumn/index.d.ts +2 -0
- package/dist/components/CustomColumn/index.js +2 -0
- package/dist/components/CustomColumn/types.d.ts +19 -0
- package/dist/components/CustomColumn/types.js +0 -0
- package/dist/components/DatePicker/DatePicker.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.js +89 -0
- package/dist/components/DatePicker/datePickerOption.d.ts +14 -0
- package/dist/components/DatePicker/datePickerOption.js +149 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +2 -0
- package/dist/components/DatePicker/types.d.ts +12 -0
- package/dist/components/DatePicker/types.js +0 -0
- package/dist/components/DatePickerPanel/DatePickerPanel.d.ts +6 -0
- package/dist/components/DatePickerPanel/DatePickerPanel.js +397 -0
- package/dist/components/DatePickerPanel/datePickerPanel.scss +362 -0
- package/dist/components/DatePickerPanel/index.d.ts +2 -0
- package/dist/components/DatePickerPanel/index.js +2 -0
- package/dist/components/DatePickerPanel/type.d.ts +23 -0
- package/dist/components/DatePickerPanel/type.js +0 -0
- package/dist/components/DownloadCenter/DownloadCenter.d.ts +5 -0
- package/dist/components/DownloadCenter/DownloadCenter.js +367 -0
- package/dist/components/DownloadCenter/index.css +54 -0
- package/dist/components/DownloadCenter/index.d.ts +2 -0
- package/dist/components/DownloadCenter/index.js +2 -0
- package/dist/components/DownloadCenter/types.d.ts +27 -0
- package/dist/components/DownloadCenter/types.js +0 -0
- package/dist/components/Fireworks/Fireworks.d.ts +11 -0
- package/dist/components/Fireworks/Fireworks.js +415 -0
- package/dist/components/Fireworks/imgs/birthday-cake.svg +180 -0
- package/dist/components/Fireworks/imgs/hb.png +0 -0
- package/dist/components/Fireworks/imgs/sd.png +0 -0
- package/dist/components/Fireworks/imgs/xc.png +0 -0
- package/dist/components/Fireworks/imgs/yd.png +0 -0
- package/dist/components/Fireworks/index.d.ts +2 -0
- package/dist/components/Fireworks/index.js +2 -0
- package/dist/components/Fireworks/index.scss +9 -0
- package/dist/components/Fireworks/types.d.ts +6 -0
- package/dist/components/Fireworks/types.js +0 -0
- package/dist/components/Form/Form.css +4 -0
- package/dist/components/Form/Form.d.ts +9 -0
- package/dist/components/Form/Form.js +18 -0
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Form/index.js +2 -0
- package/dist/components/FormItem/FormItem.css +38 -0
- package/dist/components/FormItem/FormItem.d.ts +9 -0
- package/dist/components/FormItem/FormItem.js +25 -0
- package/dist/components/FormItem/index.d.ts +1 -0
- package/dist/components/FormItem/index.js +2 -0
- package/dist/components/HomeData/HomeData.d.ts +6 -0
- package/dist/components/HomeData/HomeData.js +364 -0
- package/dist/components/HomeData/HomeData.scss +161 -0
- package/dist/components/HomeData/index.d.ts +1 -0
- package/dist/components/HomeData/index.js +2 -0
- package/dist/components/Icon/Icon.d.ts +4 -0
- package/dist/components/Icon/Icon.js +34 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/Icon/index.js +2 -0
- package/dist/components/Icon/types.d.ts +8 -0
- package/dist/components/Icon/types.js +0 -0
- package/dist/components/Log/index.d.ts +2 -0
- package/dist/components/Log/index.js +2 -0
- package/dist/components/Log/src/Detail.d.ts +7 -0
- package/dist/components/Log/src/Detail.js +71 -0
- package/dist/components/Log/src/Detail.scss +27 -0
- package/dist/components/Log/src/Log.d.ts +5 -0
- package/dist/components/Log/src/Log.js +335 -0
- package/dist/components/Log/src/Log.scss +50 -0
- package/dist/components/Log/src/useLogTableColumns.d.ts +2 -0
- package/dist/components/Log/src/useLogTableColumns.js +141 -0
- package/dist/components/Log/types.d.ts +5 -0
- package/dist/components/Log/types.js +0 -0
- package/dist/components/LogButton/LogButton.d.ts +4 -0
- package/dist/components/LogButton/LogButton.js +30 -0
- package/dist/components/LogButton/index.d.ts +2 -0
- package/dist/components/LogButton/index.js +2 -0
- package/dist/components/LogButton/logbutton.css +15 -0
- package/dist/components/LogButton/types.d.ts +10 -0
- package/dist/components/LogButton/types.js +0 -0
- package/dist/components/LogDialog/BiLogManager.d.ts +29 -0
- package/dist/components/LogDialog/BiLogManager.js +78 -0
- package/dist/components/LogDialog/LogDialog.d.ts +8 -0
- package/dist/components/LogDialog/LogDialog.js +106 -0
- package/dist/components/LogDialog/LogDialog.scss +29 -0
- package/dist/components/LogDialog/index.d.ts +3 -0
- package/dist/components/LogDialog/index.js +3 -0
- package/dist/components/LogDialog/types.d.ts +8 -0
- package/dist/components/LogDialog/types.js +0 -0
- package/dist/components/MediaPreview/MediaPreview.d.ts +5 -0
- package/dist/components/MediaPreview/MediaPreview.js +124 -0
- package/dist/components/MediaPreview/hook.d.ts +26 -0
- package/dist/components/MediaPreview/hook.js +174 -0
- package/dist/components/MediaPreview/index.css +202 -0
- package/dist/components/MediaPreview/index.d.ts +2 -0
- package/dist/components/MediaPreview/index.js +2 -0
- package/dist/components/MediaPreview/types.d.ts +24 -0
- package/dist/components/MediaPreview/types.js +0 -0
- package/dist/components/Modal/Modal.d.ts +3 -0
- package/dist/components/Modal/Modal.js +31 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/index.js +2 -0
- package/dist/components/Modal/types.d.ts +8 -0
- package/dist/components/Modal/types.js +0 -0
- package/dist/components/ModalStore/ModalProvider.d.ts +11 -0
- package/dist/components/ModalStore/ModalProvider.js +15 -0
- package/dist/components/ModalStore/ModalStore.d.ts +78 -0
- package/dist/components/ModalStore/ModalStore.js +188 -0
- package/dist/components/ModalStore/index.d.ts +3 -0
- package/dist/components/ModalStore/index.js +4 -0
- package/dist/components/ModalStore/types.d.ts +73 -0
- package/dist/components/ModalStore/types.js +0 -0
- package/dist/components/MoreButton/MoreButton.d.ts +3 -0
- package/dist/components/MoreButton/MoreButton.js +50 -0
- package/dist/components/MoreButton/index.d.ts +2 -0
- package/dist/components/MoreButton/index.js +2 -0
- package/dist/components/MoreButton/types.d.ts +15 -0
- package/dist/components/MoreButton/types.js +0 -0
- package/dist/components/NavbarTool/NavbarTool.d.ts +5 -0
- package/dist/components/NavbarTool/NavbarTool.js +143 -0
- package/dist/components/NavbarTool/components/index.css +49 -0
- package/dist/components/NavbarTool/components/index.d.ts +5 -0
- package/dist/components/NavbarTool/components/index.js +98 -0
- package/dist/components/NavbarTool/index.css +14 -0
- package/dist/components/NavbarTool/index.d.ts +2 -0
- package/dist/components/NavbarTool/index.js +2 -0
- package/dist/components/NavbarTool/types.d.ts +40 -0
- package/dist/components/NavbarTool/types.js +0 -0
- package/dist/components/NoticeCenter/NoticeCenter.d.ts +4 -0
- package/dist/components/NoticeCenter/NoticeCenter.js +334 -0
- package/dist/components/NoticeCenter/assets/notice.png +0 -0
- package/dist/components/NoticeCenter/assets/tongzhi.png +0 -0
- package/dist/components/NoticeCenter/index.d.ts +2 -0
- package/dist/components/NoticeCenter/index.js +2 -0
- package/dist/components/NoticeCenter/noticeCenter.scss +232 -0
- package/dist/components/NoticeCenter/types.d.ts +6 -0
- package/dist/components/NoticeCenter/types.js +0 -0
- package/dist/components/Pagination/BiPagination.css +152 -0
- package/dist/components/Pagination/Pagination.d.ts +5 -0
- package/dist/components/Pagination/Pagination.js +67 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.js +2 -0
- package/dist/components/Pagination/types.d.ts +14 -0
- package/dist/components/Pagination/types.js +0 -0
- package/dist/components/ResponseInterceptor/index.d.ts +17 -0
- package/dist/components/ResponseInterceptor/index.js +43 -0
- package/dist/components/SuperDate/SuperDate.d.ts +6 -0
- package/dist/components/SuperDate/SuperDate.js +113 -0
- package/dist/components/SuperDate/SuperDate.scss +42 -0
- package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.d.ts +5 -0
- package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.js +87 -0
- package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.scss +52 -0
- package/dist/components/SuperDate/components/DynamicTimeCom/DynamicTimeCom.d.ts +6 -0
- package/dist/components/SuperDate/components/DynamicTimeCom/DynamicTimeCom.js +129 -0
- package/dist/components/SuperDate/components/DynamicTimeCom/dynamicTimeCom.scss +70 -0
- package/dist/components/SuperDate/constant.d.ts +35 -0
- package/dist/components/SuperDate/constant.js +27 -0
- package/dist/components/SuperDate/index.d.ts +2 -0
- package/dist/components/SuperDate/index.js +2 -0
- package/dist/components/SuperDate/store.d.ts +68 -0
- package/dist/components/SuperDate/store.js +254 -0
- package/dist/components/SuperDate/types.d.ts +34 -0
- package/dist/components/SuperDate/types.js +0 -0
- package/dist/components/SuperDate/utils.d.ts +18 -0
- package/dist/components/SuperDate/utils.js +14 -0
- package/dist/components/SystemLink/SystemLink.d.ts +4 -0
- package/dist/components/SystemLink/SystemLink.js +85 -0
- package/dist/components/SystemLink/index.d.ts +1 -0
- package/dist/components/SystemLink/index.js +2 -0
- package/dist/components/SystemLink/index.scss +142 -0
- package/dist/components/Table/ResizableTitle.d.ts +3 -0
- package/dist/components/Table/ResizableTitle.js +43 -0
- package/dist/components/Table/Table.d.ts +9 -0
- package/dist/components/Table/Table.js +189 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.js +2 -0
- package/dist/components/Table/index.scss +42 -0
- package/dist/components/Table/types.d.ts +24 -0
- package/dist/components/Table/types.js +0 -0
- package/dist/components/Table/useHeaderPopper.d.ts +8 -0
- package/dist/components/Table/useHeaderPopper.js +95 -0
- package/dist/components/TableHeaderPopper/EditBox.d.ts +6 -0
- package/dist/components/TableHeaderPopper/EditBox.js +208 -0
- package/dist/components/TableHeaderPopper/Popover.d.ts +6 -0
- package/dist/components/TableHeaderPopper/Popover.js +85 -0
- package/dist/components/TableHeaderPopper/index.d.ts +3 -0
- package/dist/components/TableHeaderPopper/index.js +3 -0
- package/dist/components/TableHeaderPopper/index.scss +96 -0
- package/dist/components/TaskCenter/TaskCenter.d.ts +4 -0
- package/dist/components/TaskCenter/TaskCenter.js +257 -0
- package/dist/components/TaskCenter/TaskCenter.scss +44 -0
- package/dist/components/TaskCenter/api.d.ts +13 -0
- package/dist/components/TaskCenter/api.js +13 -0
- package/dist/components/TaskCenter/index.d.ts +2 -0
- package/dist/components/TaskCenter/index.js +2 -0
- package/dist/components/TaskCenter/types.d.ts +29 -0
- package/dist/components/TaskCenter/types.js +0 -0
- package/dist/components/TooltipIcon/TooltipIcon.d.ts +3 -0
- package/dist/components/TooltipIcon/TooltipIcon.js +43 -0
- package/dist/components/TooltipIcon/index.d.ts +2 -0
- package/dist/components/TooltipIcon/index.js +2 -0
- package/dist/components/TooltipIcon/types.d.ts +14 -0
- package/dist/components/TooltipIcon/types.js +0 -0
- package/dist/components/Verification/content.d.ts +11 -0
- package/dist/components/Verification/content.js +223 -0
- package/dist/components/Verification/index.css +43 -0
- package/dist/components/Verification/index.d.ts +1 -0
- package/dist/components/Verification/index.js +37 -0
- package/dist/components/index.d.ts +32 -0
- package/dist/components/index.js +29 -0
- package/dist/config/index.d.ts +83 -0
- package/dist/config/index.js +115 -0
- package/dist/config/theme/index.d.ts +368 -0
- package/dist/config/theme/index.js +369 -0
- package/dist/hooks/createAlive.d.ts +11 -0
- package/dist/hooks/createAlive.js +22 -0
- package/dist/hooks/createGlobalState.d.ts +7 -0
- package/dist/hooks/createGlobalState.js +28 -0
- package/dist/hooks/index.d.ts +26 -0
- package/dist/hooks/index.js +25 -0
- package/dist/hooks/useAsync.d.ts +27 -0
- package/dist/hooks/useAsync.js +76 -0
- package/dist/hooks/useClickOther.d.ts +10 -0
- package/dist/hooks/useClickOther.js +30 -0
- package/dist/hooks/useCopyToClipboard.d.ts +7 -0
- package/dist/hooks/useCopyToClipboard.js +32 -0
- package/dist/hooks/useCreate.d.ts +7 -0
- package/dist/hooks/useCreate.js +21 -0
- package/dist/hooks/useEventListener.d.ts +22 -0
- package/dist/hooks/useEventListener.js +33 -0
- package/dist/hooks/useHistoryStore.d.ts +16 -0
- package/dist/hooks/useHistoryStore.js +106 -0
- package/dist/hooks/useIntersectionObserver.d.ts +8 -0
- package/dist/hooks/useIntersectionObserver.js +23 -0
- package/dist/hooks/useInterval.d.ts +8 -0
- package/dist/hooks/useInterval.js +19 -0
- package/dist/hooks/useLatest.d.ts +2 -0
- package/dist/hooks/useLatest.js +12 -0
- package/dist/hooks/useLockAsyncFn.d.ts +7 -0
- package/dist/hooks/useLockAsyncFn.js +24 -0
- package/dist/hooks/useLockFn.d.ts +7 -0
- package/dist/hooks/useLockFn.js +17 -0
- package/dist/hooks/useMergedState.d.ts +10 -0
- package/dist/hooks/useMergedState.js +30 -0
- package/dist/hooks/useMountedState.d.ts +4 -0
- package/dist/hooks/useMountedState.js +13 -0
- package/dist/hooks/usePermission.d.ts +8 -0
- package/dist/hooks/usePermission.js +21 -0
- package/dist/hooks/usePersistFn.d.ts +8 -0
- package/dist/hooks/usePersistFn.js +13 -0
- package/dist/hooks/useReactive.d.ts +7 -0
- package/dist/hooks/useReactive.js +34 -0
- package/dist/hooks/useRefresh.d.ts +5 -0
- package/dist/hooks/useRefresh.js +8 -0
- package/dist/hooks/useToggle.d.ts +16 -0
- package/dist/hooks/useToggle.js +20 -0
- package/dist/hooks/useUnmount.d.ts +6 -0
- package/dist/hooks/useUnmount.js +10 -0
- package/dist/hooks/useUpdateEffect.d.ts +9 -0
- package/dist/hooks/useUpdateEffect.js +10 -0
- package/dist/hooks/useWindowSize.d.ts +6 -0
- package/dist/hooks/useWindowSize.js +15 -0
- package/dist/hooks/util.d.ts +9 -0
- package/dist/hooks/util.js +6 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +2 -0
- package/dist/utils/array.d.ts +12 -0
- package/dist/utils/array.js +15 -0
- package/dist/utils/classNames.d.ts +4 -0
- package/dist/utils/classNames.js +19 -0
- package/dist/utils/date.d.ts +98 -0
- package/dist/utils/date.js +101 -0
- package/dist/utils/debounce.d.ts +8 -0
- package/dist/utils/debounce.js +38 -0
- package/dist/utils/deepClone.d.ts +6 -0
- package/dist/utils/deepClone.js +10 -0
- package/dist/utils/empty.d.ts +16 -0
- package/dist/utils/empty.js +24 -0
- package/dist/utils/formatPrice.d.ts +2 -0
- package/dist/utils/formatPrice.js +15 -0
- package/dist/utils/getUUID.d.ts +1 -0
- package/dist/utils/getUUID.js +17 -0
- package/dist/utils/getUrlParams.d.ts +11 -0
- package/dist/utils/getUrlParams.js +10 -0
- package/dist/utils/index.d.ts +20 -0
- package/dist/utils/index.js +19 -0
- package/dist/utils/listToTree.d.ts +12 -0
- package/dist/utils/listToTree.js +14 -0
- package/dist/utils/object.d.ts +6 -0
- package/dist/utils/object.js +5 -0
- package/dist/utils/ossUpload.d.ts +45 -0
- package/dist/utils/ossUpload.js +88 -0
- package/dist/utils/parseTo.d.ts +6 -0
- package/dist/utils/parseTo.js +9 -0
- package/dist/utils/request/accessReport.d.ts +2 -0
- package/dist/utils/request/accessReport.js +27 -0
- package/dist/utils/request/defaultRequest.d.ts +9 -0
- package/dist/utils/request/defaultRequest.js +33 -0
- package/dist/utils/request/exportDownload.d.ts +2 -0
- package/dist/utils/request/exportDownload.js +28 -0
- package/dist/utils/request/index.d.ts +29 -0
- package/dist/utils/request/index.js +40 -0
- package/dist/utils/request/noticeCenter.d.ts +2 -0
- package/dist/utils/request/noticeCenter.js +28 -0
- package/dist/utils/svgIcon/index.d.ts +47 -0
- package/dist/utils/svgIcon/index.js +76 -0
- package/dist/utils/throttle.d.ts +10 -0
- package/dist/utils/throttle.js +21 -0
- package/dist/utils/time/index.d.ts +7 -0
- package/dist/utils/time/index.js +12 -0
- package/dist/utils/tools.d.ts +43 -0
- package/dist/utils/tools.js +57 -0
- package/package.json +116 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/* 自定义分页样式 */
|
|
2
|
+
.bi-custom-pagination .ant-pagination-prev,
|
|
3
|
+
.bi-custom-pagination .ant-pagination-next,
|
|
4
|
+
.bi-custom-pagination .ant-pagination-item {
|
|
5
|
+
border: none;
|
|
6
|
+
background-color: #f3f4f5;
|
|
7
|
+
border-radius: 2px;
|
|
8
|
+
transition: all 0.2s;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* 左右箭头按钮样式 */
|
|
12
|
+
.bi-custom-pagination .ant-pagination-prev,
|
|
13
|
+
.bi-custom-pagination .ant-pagination-next {
|
|
14
|
+
min-width: 32px;
|
|
15
|
+
height: 32px;
|
|
16
|
+
line-height: 30px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.bi-custom-pagination .ant-pagination-prev .ant-pagination-item-link,
|
|
20
|
+
.bi-custom-pagination .ant-pagination-next .ant-pagination-item-link {
|
|
21
|
+
border: none;
|
|
22
|
+
background-color: transparent;
|
|
23
|
+
border-radius: 2px;
|
|
24
|
+
color: #4e5969;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
height: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.bi-custom-pagination
|
|
32
|
+
.ant-pagination-prev:not(.ant-pagination-disabled):hover
|
|
33
|
+
.ant-pagination-item-link,
|
|
34
|
+
.bi-custom-pagination
|
|
35
|
+
.ant-pagination-next:not(.ant-pagination-disabled):hover
|
|
36
|
+
.ant-pagination-item-link {
|
|
37
|
+
background-color: transparent;
|
|
38
|
+
color: #4e5969;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* 页码样式 */
|
|
42
|
+
.bi-custom-pagination .ant-pagination-item {
|
|
43
|
+
min-width: 32px;
|
|
44
|
+
height: 32px;
|
|
45
|
+
line-height: 30px;
|
|
46
|
+
background-color: #f3f4f5;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.bi-custom-pagination .ant-pagination-item a {
|
|
50
|
+
color: #4e5969;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* 当前选中页码样式 */
|
|
54
|
+
.bi-custom-pagination .ant-pagination-item.ant-pagination-item-active {
|
|
55
|
+
background-color: #eaf7f3ff;
|
|
56
|
+
color: #00bf8aff;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.bi-custom-pagination .ant-pagination-item.ant-pagination-item-active a {
|
|
60
|
+
color: #00bf8aff;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* 悬停效果 */
|
|
64
|
+
.bi-custom-pagination .ant-pagination-prev:not(.ant-pagination-disabled):hover,
|
|
65
|
+
.bi-custom-pagination .ant-pagination-next:not(.ant-pagination-disabled):hover,
|
|
66
|
+
.bi-custom-pagination
|
|
67
|
+
.ant-pagination-item:not(.ant-pagination-item-active):hover {
|
|
68
|
+
border-color: #00bf8aff;
|
|
69
|
+
background-color: #f3f4f5;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.bi-custom-pagination
|
|
73
|
+
.ant-pagination-prev:not(.ant-pagination-disabled):hover
|
|
74
|
+
.ant-pagination-item-link,
|
|
75
|
+
.bi-custom-pagination
|
|
76
|
+
.ant-pagination-next:not(.ant-pagination-disabled):hover
|
|
77
|
+
.ant-pagination-item-link {
|
|
78
|
+
color: #00bf8aff;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.bi-custom-pagination
|
|
82
|
+
.ant-pagination-item:not(.ant-pagination-item-active):hover
|
|
83
|
+
a {
|
|
84
|
+
color: #00bf8aff;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* 禁用状态 */
|
|
88
|
+
.bi-custom-pagination .ant-pagination-prev.ant-pagination-disabled,
|
|
89
|
+
.bi-custom-pagination .ant-pagination-next.ant-pagination-disabled {
|
|
90
|
+
background-color: #f5f5f5;
|
|
91
|
+
/* border-color: #d9d9d9; */
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.bi-custom-pagination
|
|
95
|
+
.ant-pagination-prev.ant-pagination-disabled
|
|
96
|
+
.ant-pagination-item-link,
|
|
97
|
+
.bi-custom-pagination
|
|
98
|
+
.ant-pagination-next.ant-pagination-disabled
|
|
99
|
+
.ant-pagination-item-link {
|
|
100
|
+
color: #d9d9d9;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* 页大小选择器和快速跳转样式 */
|
|
104
|
+
.bi-custom-pagination .ant-pagination-options {
|
|
105
|
+
margin-left: 8px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.bi-custom-pagination .ant-pagination-options .ant-select-selector {
|
|
109
|
+
border-radius: 2px;
|
|
110
|
+
border: 1px solid #d9d9d9;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.bi-custom-pagination .ant-pagination-options .ant-select-selector:hover,
|
|
114
|
+
.bi-custom-pagination .ant-pagination-options .ant-select-selector:focus {
|
|
115
|
+
/* border-color: #00bf8aff !important; */
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.bi-custom-pagination
|
|
119
|
+
.ant-pagination-options
|
|
120
|
+
.ant-pagination-options-quick-jumper {
|
|
121
|
+
color: #4e5969;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.bi-custom-pagination
|
|
125
|
+
.ant-pagination-options
|
|
126
|
+
.ant-pagination-options-quick-jumper
|
|
127
|
+
input {
|
|
128
|
+
border-radius: 2px;
|
|
129
|
+
/* border: 1px solid #d9d9d9; */
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.bi-custom-pagination
|
|
133
|
+
.ant-pagination-options
|
|
134
|
+
.ant-pagination-options-quick-jumper
|
|
135
|
+
input:hover,
|
|
136
|
+
.bi-custom-pagination
|
|
137
|
+
.ant-pagination-options
|
|
138
|
+
.ant-pagination-options-quick-jumper
|
|
139
|
+
input:focus {
|
|
140
|
+
/* border-color: #00bf8aff !important; */
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* 页大小选择器下拉菜单选中项样式 */
|
|
144
|
+
.bi-custom-pagination .ant-select-dropdown .ant-select-item-option-selected {
|
|
145
|
+
/* background-color: #00bf8a1a; */
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* 总数显示样式 */
|
|
149
|
+
.bi-custom-pagination .ant-pagination-total-text {
|
|
150
|
+
color: #4e5969;
|
|
151
|
+
margin-right: 8px;
|
|
152
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ConfigProvider, Pagination } from "antd";
|
|
3
|
+
import zh_CN from "antd/locale/zh_CN";
|
|
4
|
+
import "./BiPagination.css";
|
|
5
|
+
const scrollToTop = ()=>{
|
|
6
|
+
const c = document.documentElement.scrollTop || document.body.scrollTop;
|
|
7
|
+
if (c > 0) {
|
|
8
|
+
window.requestAnimationFrame(scrollToTop);
|
|
9
|
+
window.scrollTo(0, c - c / 8);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const BiPagination = ({ total, page = 1, limit = 20, pageSizes = [
|
|
13
|
+
10,
|
|
14
|
+
20,
|
|
15
|
+
30,
|
|
16
|
+
50
|
|
17
|
+
], layout = 'total, prev, pager, next', background = true, autoScroll = true, hidden = false, onChange, onPageChange, onSizeChange, ...morePorps })=>{
|
|
18
|
+
const handlePageChange = (currentPage, currentPageSize)=>{
|
|
19
|
+
if (onChange) onChange(currentPage, currentPageSize || limit);
|
|
20
|
+
if (onPageChange) onPageChange(currentPage);
|
|
21
|
+
if (autoScroll) scrollToTop();
|
|
22
|
+
};
|
|
23
|
+
const handleSizeChange = (current, size)=>{
|
|
24
|
+
if (onChange) onChange(current, size);
|
|
25
|
+
if (onSizeChange) onSizeChange(size);
|
|
26
|
+
if (autoScroll) scrollToTop();
|
|
27
|
+
};
|
|
28
|
+
const getPaginationConfig = ()=>{
|
|
29
|
+
const layoutItems = layout.split(',').map((item)=>item.trim());
|
|
30
|
+
const config = {
|
|
31
|
+
total,
|
|
32
|
+
current: page,
|
|
33
|
+
pageSize: limit,
|
|
34
|
+
pageSizeOptions: pageSizes,
|
|
35
|
+
showSizeChanger: layoutItems.includes('sizes'),
|
|
36
|
+
showQuickJumper: layoutItems.includes('jumper'),
|
|
37
|
+
showTotal: layoutItems.includes('total') ? (total, range)=>`共 ${total} 条` : void 0
|
|
38
|
+
};
|
|
39
|
+
console.log({
|
|
40
|
+
...morePorps,
|
|
41
|
+
...config
|
|
42
|
+
}, 123123213);
|
|
43
|
+
return {
|
|
44
|
+
...morePorps,
|
|
45
|
+
...config
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
if (hidden) return null;
|
|
49
|
+
const paginationConfig = getPaginationConfig();
|
|
50
|
+
return /*#__PURE__*/ jsx(ConfigProvider, {
|
|
51
|
+
locale: zh_CN,
|
|
52
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
53
|
+
className: "pagination-container",
|
|
54
|
+
style: {
|
|
55
|
+
background: background ? 'transparent' : 'none'
|
|
56
|
+
},
|
|
57
|
+
children: /*#__PURE__*/ jsx(Pagination, {
|
|
58
|
+
...paginationConfig,
|
|
59
|
+
onChange: handlePageChange,
|
|
60
|
+
onShowSizeChange: handleSizeChange,
|
|
61
|
+
className: "bi-custom-pagination"
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const Pagination_Pagination = BiPagination;
|
|
67
|
+
export { Pagination_Pagination as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface BiPaginationProps {
|
|
2
|
+
total: number;
|
|
3
|
+
page?: number;
|
|
4
|
+
limit?: number;
|
|
5
|
+
pageSizes?: number[];
|
|
6
|
+
layout?: string;
|
|
7
|
+
background?: boolean;
|
|
8
|
+
autoScroll?: boolean;
|
|
9
|
+
hidden?: boolean;
|
|
10
|
+
onChange?: (page: number, limit: number) => void;
|
|
11
|
+
onPageChange?: (page: number) => void;
|
|
12
|
+
onSizeChange?: (limit: number) => void;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ResponseData {
|
|
2
|
+
status_code: number | string;
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
declare class ResponseInterceptor {
|
|
6
|
+
statusCodeHandlers: Record<number | string, (callback?: () => void) => void>;
|
|
7
|
+
customCallbacks: Record<number | string, () => void>;
|
|
8
|
+
constructor();
|
|
9
|
+
handleResponse(res: ResponseData, customCallbacks?: Record<number | string, () => void>): void;
|
|
10
|
+
addStatusCodeHandler(statusCode: number | string, handler: (callback?: () => void) => void): void;
|
|
11
|
+
setStatusCodeCallback(statusCode: number | string, callback: () => void): void;
|
|
12
|
+
getStatusCodeHandler(statusCode: number | string): ((callback?: () => void) => void) | undefined;
|
|
13
|
+
removeStatusCodeHandler(statusCode: number | string): void;
|
|
14
|
+
getSupportedStatusCodes(): (string | number)[];
|
|
15
|
+
}
|
|
16
|
+
declare const _default: ResponseInterceptor;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { doubleCheckVerification } from "../Verification/index.js";
|
|
2
|
+
class ResponseInterceptor_ResponseInterceptor {
|
|
3
|
+
statusCodeHandlers;
|
|
4
|
+
customCallbacks;
|
|
5
|
+
constructor(){
|
|
6
|
+
this.statusCodeHandlers = {
|
|
7
|
+
202: doubleCheckVerification
|
|
8
|
+
};
|
|
9
|
+
this.customCallbacks = {};
|
|
10
|
+
}
|
|
11
|
+
handleResponse(res, customCallbacks = {}) {
|
|
12
|
+
try {
|
|
13
|
+
const handler = this.statusCodeHandlers[res.status_code];
|
|
14
|
+
if (handler) {
|
|
15
|
+
const customCallback = customCallbacks[res.status_code] || this.customCallbacks[res.status_code];
|
|
16
|
+
if (customCallback && 'function' == typeof customCallback) handler(customCallback);
|
|
17
|
+
else handler();
|
|
18
|
+
}
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.error('bi-element-ui ResponseInterceptor 处理失败:', {
|
|
21
|
+
error: error,
|
|
22
|
+
response: res
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
addStatusCodeHandler(statusCode, handler) {
|
|
27
|
+
this.statusCodeHandlers[statusCode] = handler;
|
|
28
|
+
}
|
|
29
|
+
setStatusCodeCallback(statusCode, callback) {
|
|
30
|
+
this.customCallbacks[statusCode] = callback;
|
|
31
|
+
}
|
|
32
|
+
getStatusCodeHandler(statusCode) {
|
|
33
|
+
return this.statusCodeHandlers[statusCode];
|
|
34
|
+
}
|
|
35
|
+
removeStatusCodeHandler(statusCode) {
|
|
36
|
+
delete this.statusCodeHandlers[statusCode];
|
|
37
|
+
}
|
|
38
|
+
getSupportedStatusCodes() {
|
|
39
|
+
return Object.keys(this.statusCodeHandlers);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const ResponseInterceptor = new ResponseInterceptor_ResponseInterceptor();
|
|
43
|
+
export { ResponseInterceptor as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DatePicker } from 'antd';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import './SuperDate.scss';
|
|
4
|
+
import type { SuperDateProps } from './types';
|
|
5
|
+
declare const SuperDate: React.FC<SuperDateProps & Omit<React.ComponentProps<typeof DatePicker.RangePicker>, 'value' | 'popupClassName' | 'className' | 'onChange' | 'onOpenChange' | 'onCalendarChange' | 'components' | 'locale' | 'needConfirm'>>;
|
|
6
|
+
export default SuperDate;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DatePicker } from "antd";
|
|
3
|
+
import dayjs from "dayjs";
|
|
4
|
+
import { useCallback, useEffect, useMemo } from "react";
|
|
5
|
+
import CustomRangPanel from "./components/CustomRangPanel/CustomRangPanel.js";
|
|
6
|
+
import "./SuperDate.scss";
|
|
7
|
+
import zh_CN from "antd/locale/zh_CN";
|
|
8
|
+
import { classNames, isNotEmpty } from "../../utils/index.js";
|
|
9
|
+
import { TAB_ACTIVE_KEY } from "./constant.js";
|
|
10
|
+
import { useSuperDateStore } from "./store.js";
|
|
11
|
+
import { getDateFormat } from "./utils.js";
|
|
12
|
+
const DEFAULT_PRESETS = [
|
|
13
|
+
{
|
|
14
|
+
label: '最近一周',
|
|
15
|
+
value: [
|
|
16
|
+
dayjs().add(-7, 'd'),
|
|
17
|
+
dayjs()
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: '最近一个月',
|
|
22
|
+
value: [
|
|
23
|
+
dayjs().add(-30, 'd'),
|
|
24
|
+
dayjs()
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: '最近三个月',
|
|
29
|
+
value: [
|
|
30
|
+
dayjs().add(-90, 'd'),
|
|
31
|
+
dayjs()
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
const SuperDate = ({ value, format, popupClassName, className, needConfirm = true, needTime = false, onChange, onOpenChange, onCalendarChange, ...restProps })=>{
|
|
36
|
+
const { timeRange, handleCalendarChange, handleRangeChange, calcTitle, tabActiveKey, initRangePickerValue, calcReturnValues } = useSuperDateStore();
|
|
37
|
+
const panelComponents = useMemo(()=>({
|
|
38
|
+
date: ()=>/*#__PURE__*/ jsx(CustomRangPanel, {
|
|
39
|
+
needTime: needTime
|
|
40
|
+
})
|
|
41
|
+
}), [
|
|
42
|
+
needTime
|
|
43
|
+
]);
|
|
44
|
+
const isStartDateDifferentFromEndDate = useMemo(()=>timeRange?.[0] && !timeRange?.[0].isSame(timeRange[1], 'day'), [
|
|
45
|
+
timeRange
|
|
46
|
+
]);
|
|
47
|
+
const dateFormatStr = useMemo(()=>getDateFormat(needTime), [
|
|
48
|
+
needTime
|
|
49
|
+
]);
|
|
50
|
+
const customFormat = useMemo(()=>(dateValue)=>{
|
|
51
|
+
if (format) return dateValue.format(format);
|
|
52
|
+
const isStartDate = timeRange?.[0] && dateValue.isSame(timeRange[0], 'day') && isStartDateDifferentFromEndDate;
|
|
53
|
+
if (tabActiveKey === TAB_ACTIVE_KEY.DYNAMIC && isStartDate) return `${calcTitle()} | ${dateValue.format(dateFormatStr)}`;
|
|
54
|
+
return dateValue.format(dateFormatStr);
|
|
55
|
+
}, [
|
|
56
|
+
format,
|
|
57
|
+
timeRange,
|
|
58
|
+
isStartDateDifferentFromEndDate,
|
|
59
|
+
tabActiveKey,
|
|
60
|
+
calcTitle,
|
|
61
|
+
dateFormatStr
|
|
62
|
+
]);
|
|
63
|
+
const handleOpenChange = useCallback((open)=>{
|
|
64
|
+
if (!open) onChange?.(calcReturnValues());
|
|
65
|
+
onOpenChange?.(open);
|
|
66
|
+
}, [
|
|
67
|
+
onChange,
|
|
68
|
+
onOpenChange,
|
|
69
|
+
calcReturnValues
|
|
70
|
+
]);
|
|
71
|
+
const handleRangeCalendarChange = useCallback((value)=>{
|
|
72
|
+
handleCalendarChange();
|
|
73
|
+
onCalendarChange?.(value);
|
|
74
|
+
}, [
|
|
75
|
+
handleCalendarChange,
|
|
76
|
+
onCalendarChange
|
|
77
|
+
]);
|
|
78
|
+
useEffect(()=>{
|
|
79
|
+
if (isNotEmpty(value)) initRangePickerValue({
|
|
80
|
+
...value,
|
|
81
|
+
needTime
|
|
82
|
+
});
|
|
83
|
+
}, []);
|
|
84
|
+
return /*#__PURE__*/ jsx("div", {
|
|
85
|
+
className: "bi-super-date-container",
|
|
86
|
+
children: /*#__PURE__*/ jsx(DatePicker.RangePicker, {
|
|
87
|
+
value: timeRange,
|
|
88
|
+
presets: DEFAULT_PRESETS,
|
|
89
|
+
format: customFormat,
|
|
90
|
+
popupClassName: classNames([
|
|
91
|
+
'bi-super-date-range-picker',
|
|
92
|
+
{
|
|
93
|
+
'bi-super-date-range-picker-with-time': needTime
|
|
94
|
+
},
|
|
95
|
+
popupClassName
|
|
96
|
+
]),
|
|
97
|
+
onCalendarChange: handleRangeCalendarChange,
|
|
98
|
+
onChange: handleRangeChange,
|
|
99
|
+
components: panelComponents,
|
|
100
|
+
locale: zh_CN.DatePicker,
|
|
101
|
+
className: classNames({
|
|
102
|
+
'bi-super-date': true,
|
|
103
|
+
'bi-super-date-dynamic-class': tabActiveKey === TAB_ACTIVE_KEY.DYNAMIC && isStartDateDifferentFromEndDate && !format,
|
|
104
|
+
'bi-super-date-dynamic-class-with-time': tabActiveKey === TAB_ACTIVE_KEY.DYNAMIC && isStartDateDifferentFromEndDate && !format && needTime
|
|
105
|
+
}, className),
|
|
106
|
+
onOpenChange: handleOpenChange,
|
|
107
|
+
needConfirm: needConfirm,
|
|
108
|
+
...restProps
|
|
109
|
+
})
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
const SuperDate_SuperDate = SuperDate;
|
|
113
|
+
export { SuperDate_SuperDate as default };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.bi-super-date-container {
|
|
2
|
+
.bi-super-date {
|
|
3
|
+
width: 395px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.bi-super-date-dynamic-class {
|
|
7
|
+
width: 410px !important;
|
|
8
|
+
|
|
9
|
+
.ant-picker-input-end {
|
|
10
|
+
width: 120px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.bi-super-date-dynamic-class-with-time {
|
|
15
|
+
width: 600px !important;
|
|
16
|
+
|
|
17
|
+
.ant-picker-input-end {
|
|
18
|
+
width: 216px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.bi-super-date-range-picker {
|
|
24
|
+
.ant-picker-panels {
|
|
25
|
+
width: 576px !important;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.bi-super-date-range-picker-with-time {
|
|
30
|
+
.date-picker-panel-need-time .date-picker-panel-time-picker {
|
|
31
|
+
width: 101px;
|
|
32
|
+
margin-left: 4px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ant-tabs-nav-wrap {
|
|
36
|
+
height: 44px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ant-picker-footer {
|
|
40
|
+
margin-top: 16px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./CustomRangPanel.scss";
|
|
3
|
+
import { Tabs } from "antd";
|
|
4
|
+
import { classNames } from "../../../../utils/classNames.js";
|
|
5
|
+
import { useMemo } from "react";
|
|
6
|
+
import { BiDatePickerPanel } from "../../../index.js";
|
|
7
|
+
import { PANEL_HEIGHT, TAB_ACTIVE_KEY } from "../../constant.js";
|
|
8
|
+
import { useSuperDateStore } from "../../store.js";
|
|
9
|
+
import { getDateFormat } from "../../utils.js";
|
|
10
|
+
import DynamicTimeCom from "../DynamicTimeCom/DynamicTimeCom.js";
|
|
11
|
+
const CustomRangPanel = ({ needTime })=>{
|
|
12
|
+
const { tabActiveKey, timeRange, setTimeRange, handleTabChange, calcTitle } = useSuperDateStore();
|
|
13
|
+
const items = useMemo(()=>[
|
|
14
|
+
{
|
|
15
|
+
key: TAB_ACTIVE_KEY.STATIC,
|
|
16
|
+
label: '静态时间',
|
|
17
|
+
children: /*#__PURE__*/ jsx(BiDatePickerPanel, {
|
|
18
|
+
mode: "range",
|
|
19
|
+
value: timeRange,
|
|
20
|
+
onChange: setTimeRange,
|
|
21
|
+
needTime: needTime
|
|
22
|
+
})
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
key: TAB_ACTIVE_KEY.DYNAMIC,
|
|
26
|
+
label: '动态时间',
|
|
27
|
+
children: /*#__PURE__*/ jsx(DynamicTimeCom, {
|
|
28
|
+
needTime: needTime
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
], [
|
|
32
|
+
timeRange,
|
|
33
|
+
setTimeRange,
|
|
34
|
+
needTime
|
|
35
|
+
]);
|
|
36
|
+
const dateFormatStr = useMemo(()=>getDateFormat(needTime ?? false), [
|
|
37
|
+
needTime
|
|
38
|
+
]);
|
|
39
|
+
const renderTime = ()=>/*#__PURE__*/ jsxs("div", {
|
|
40
|
+
className: classNames('super-date-custom-rang-panel-time', {
|
|
41
|
+
'super-date-custom-rang-panel-time-dynamic-with-time': tabActiveKey === TAB_ACTIVE_KEY.DYNAMIC && needTime,
|
|
42
|
+
'super-date-custom-rang-panel-time-with-time': needTime
|
|
43
|
+
}),
|
|
44
|
+
children: [
|
|
45
|
+
tabActiveKey === TAB_ACTIVE_KEY.DYNAMIC && /*#__PURE__*/ jsxs(Fragment, {
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ jsx("div", {
|
|
48
|
+
className: "left-time-container",
|
|
49
|
+
children: calcTitle()
|
|
50
|
+
}),
|
|
51
|
+
!needTime && /*#__PURE__*/ jsx("i", {
|
|
52
|
+
className: "anticon",
|
|
53
|
+
children: "|"
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ jsxs("div", {
|
|
58
|
+
children: [
|
|
59
|
+
timeRange?.[0]?.format(dateFormatStr) ?? '',
|
|
60
|
+
" -",
|
|
61
|
+
' ',
|
|
62
|
+
timeRange?.[1]?.format(dateFormatStr) ?? ''
|
|
63
|
+
]
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
});
|
|
67
|
+
const panelHeight = tabActiveKey === TAB_ACTIVE_KEY.DYNAMIC ? PANEL_HEIGHT.DYNAMIC : PANEL_HEIGHT.STATIC;
|
|
68
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
69
|
+
className: classNames('super-date-custom-rang-panel', {
|
|
70
|
+
'super-date-custom-rang-panel-with-time': needTime
|
|
71
|
+
}),
|
|
72
|
+
style: {
|
|
73
|
+
height: panelHeight
|
|
74
|
+
},
|
|
75
|
+
children: [
|
|
76
|
+
/*#__PURE__*/ jsx(Tabs, {
|
|
77
|
+
activeKey: tabActiveKey,
|
|
78
|
+
className: "super-date-custom-rang-panel-tabs",
|
|
79
|
+
items: items,
|
|
80
|
+
onChange: handleTabChange
|
|
81
|
+
}),
|
|
82
|
+
renderTime()
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
const CustomRangPanel_CustomRangPanel = CustomRangPanel;
|
|
87
|
+
export { CustomRangPanel_CustomRangPanel as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.super-date-custom-rang-panel {
|
|
2
|
+
width: 756px;
|
|
3
|
+
height: 340px;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
.super-date-custom-rang-panel-tabs {
|
|
7
|
+
.ant-tabs-tab {
|
|
8
|
+
padding: 7px 16px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ant-tabs-nav {
|
|
12
|
+
margin-bottom: 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.super-date-tabs-content {
|
|
17
|
+
padding: 16px 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.super-date-custom-rang-panel-time {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 10px;
|
|
25
|
+
right: 16px;
|
|
26
|
+
color: #4e5969;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
|
|
29
|
+
.anticon {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
margin: -3px 4px 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.left-time-container {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
.super-date-custom-rang-panel-with-time {
|
|
43
|
+
.super-date-custom-rang-panel-time-with-time {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
top: 15px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.super-date-custom-rang-panel-time-dynamic-with-time {
|
|
50
|
+
top: 5px !important;
|
|
51
|
+
}
|
|
52
|
+
}
|