@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,38 @@
|
|
|
1
|
+
.search-item {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
min-width: 350px;
|
|
6
|
+
padding: 0 16px 16px 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.search-item .search-item-label {
|
|
10
|
+
width: 96px;
|
|
11
|
+
padding: 0 12px 0 8px;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: flex-end;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.search-item .ant-form-item {
|
|
19
|
+
margin-bottom: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.search-item .search-label-select {
|
|
23
|
+
padding-right: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.search-item .search-item-content {
|
|
27
|
+
flex: 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.search-item .ant-select {
|
|
31
|
+
width: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.search-item-button {
|
|
35
|
+
width: 100%;
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
/* 允许元素根据需要增长 */
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './FormItem.css';
|
|
2
|
+
import { type FormItemProps } from 'antd';
|
|
3
|
+
interface BaseFormItemProps extends Omit<FormItemProps, 'label'> {
|
|
4
|
+
label?: string | React.ReactNode;
|
|
5
|
+
button?: boolean;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const FormItem: React.FC<BaseFormItemProps>;
|
|
9
|
+
export default FormItem;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./FormItem.css";
|
|
3
|
+
import { Form } from "antd";
|
|
4
|
+
const FormItem = (props)=>{
|
|
5
|
+
const { children, label, button, ...rest } = props;
|
|
6
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
7
|
+
className: button ? 'search-item-button search-item' : 'search-item',
|
|
8
|
+
children: [
|
|
9
|
+
label && !button && /*#__PURE__*/ jsx("div", {
|
|
10
|
+
className: 'string' == typeof label ? 'search-item-label' : 'search-item-label search-label-select',
|
|
11
|
+
children: label
|
|
12
|
+
}),
|
|
13
|
+
/*#__PURE__*/ jsx("div", {
|
|
14
|
+
className: "search-item-content",
|
|
15
|
+
children: button ? children : /*#__PURE__*/ jsx(Form.Item, {
|
|
16
|
+
label: void 0,
|
|
17
|
+
...rest,
|
|
18
|
+
children: children
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
]
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const FormItem_FormItem = FormItem;
|
|
25
|
+
export { FormItem_FormItem as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BiFormItem } from './FormItem';
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LeftCircleOutlined, RightCircleOutlined, SearchOutlined } from "@ant-design/icons";
|
|
3
|
+
import { Button, Carousel, Drawer, Input, Space } from "antd";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import request from "../../utils/request/index.js";
|
|
6
|
+
import { getEnv, getSystem } from "../../utils/tools.js";
|
|
7
|
+
import "./HomeData.scss";
|
|
8
|
+
getSystem();
|
|
9
|
+
const env = getEnv() ?? '';
|
|
10
|
+
const HomeData_HomeData = (props)=>{
|
|
11
|
+
const [uid, setUid] = useState(props.userId);
|
|
12
|
+
const [searchData, setSearchData] = useState({
|
|
13
|
+
uid: props.userId,
|
|
14
|
+
combination: '',
|
|
15
|
+
category_id: '',
|
|
16
|
+
page: 1,
|
|
17
|
+
page_size: 4,
|
|
18
|
+
total: 0
|
|
19
|
+
});
|
|
20
|
+
const [options, setOptions] = useState({
|
|
21
|
+
buttonList: []
|
|
22
|
+
});
|
|
23
|
+
const [swiperData, setSwiperData] = useState([]);
|
|
24
|
+
const [messageData, setMessageData] = useState([]);
|
|
25
|
+
const [dataDetail, setDataDetail] = useState({
|
|
26
|
+
isShow: false,
|
|
27
|
+
data: {}
|
|
28
|
+
});
|
|
29
|
+
let loading = false;
|
|
30
|
+
const onClose = ()=>{
|
|
31
|
+
setDataDetail({
|
|
32
|
+
isShow: false,
|
|
33
|
+
data: {}
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
const sendRaed = async (data)=>{
|
|
37
|
+
const res = await request({
|
|
38
|
+
env: env,
|
|
39
|
+
system: 'applause',
|
|
40
|
+
api: '/api/home/notify/read',
|
|
41
|
+
data: {
|
|
42
|
+
uid,
|
|
43
|
+
notify_id: data.id
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
if (1 === res.status_code) {
|
|
47
|
+
const index = messageData.findIndex((item)=>item.id === data.id);
|
|
48
|
+
const newMessageData = [
|
|
49
|
+
...messageData
|
|
50
|
+
];
|
|
51
|
+
newMessageData[index].is_read = true;
|
|
52
|
+
setMessageData(newMessageData);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const getDataDetail = (item)=>{
|
|
56
|
+
sendRaed(item);
|
|
57
|
+
getDetail(uid, item.id);
|
|
58
|
+
};
|
|
59
|
+
const getDetail = async (uid, notify_id)=>{
|
|
60
|
+
const res = await request({
|
|
61
|
+
env: env,
|
|
62
|
+
system: 'applause',
|
|
63
|
+
api: '/api/home/notify/detail',
|
|
64
|
+
data: {
|
|
65
|
+
uid: uid,
|
|
66
|
+
notify_id: notify_id
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
if (1 === res.status_code) setDataDetail({
|
|
70
|
+
isShow: true,
|
|
71
|
+
data: res.data.data
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
const onClickSwiper = (item)=>{
|
|
75
|
+
if ('1' === item.type) window.open(item.jump_url, '_blank');
|
|
76
|
+
if ('2' === item.type) getDetail(uid, item.notify_id);
|
|
77
|
+
};
|
|
78
|
+
const searchcondition = async ()=>{
|
|
79
|
+
const res = await request({
|
|
80
|
+
env: env,
|
|
81
|
+
system: 'applause',
|
|
82
|
+
api: '/api/home/Searchcondition/index',
|
|
83
|
+
data: {
|
|
84
|
+
uid: uid,
|
|
85
|
+
notify_category: 1
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
if (1 === res.status_code) setOptions({
|
|
89
|
+
buttonList: res.data.notify_category
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
const getSwiper = async ()=>{
|
|
93
|
+
const res = await request({
|
|
94
|
+
env: env,
|
|
95
|
+
system: 'applause',
|
|
96
|
+
api: '/api/home/carousel/list',
|
|
97
|
+
data: {
|
|
98
|
+
uid: uid
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
console.log(res, '>>>>>>swiperData');
|
|
102
|
+
if (1 === res.status_code) setSwiperData(res.data.data);
|
|
103
|
+
};
|
|
104
|
+
const getMessage = async (data)=>{
|
|
105
|
+
if (loading) return;
|
|
106
|
+
const requestData = data || searchData;
|
|
107
|
+
loading = true;
|
|
108
|
+
const res = await request({
|
|
109
|
+
env: env,
|
|
110
|
+
system: 'applause',
|
|
111
|
+
api: '/api/home/notify/list',
|
|
112
|
+
data: requestData
|
|
113
|
+
});
|
|
114
|
+
if (1 === res.status_code) {
|
|
115
|
+
const searchData_info = {
|
|
116
|
+
uid: uid,
|
|
117
|
+
combination: requestData.combination,
|
|
118
|
+
category_id: requestData.category_id,
|
|
119
|
+
page: res.data.page_info.page,
|
|
120
|
+
page_size: requestData.page_size,
|
|
121
|
+
total: res.data.page_info.total
|
|
122
|
+
};
|
|
123
|
+
setMessageData(res.data.data);
|
|
124
|
+
setSearchData(searchData_info);
|
|
125
|
+
console.log(data, '>>>>>>searchData_info');
|
|
126
|
+
loading = false;
|
|
127
|
+
} else loading = false;
|
|
128
|
+
};
|
|
129
|
+
const returnCategoryImg = (id)=>{
|
|
130
|
+
switch(id){
|
|
131
|
+
case '1':
|
|
132
|
+
return 'https://wanxiaomeng-1255977238.file.myqcloud.com/bi-element-ui/homeData/1.png';
|
|
133
|
+
case '2':
|
|
134
|
+
return 'https://wanxiaomeng-1255977238.file.myqcloud.com/bi-element-ui/homeData/2.png';
|
|
135
|
+
case '3':
|
|
136
|
+
return 'https://wanxiaomeng-1255977238.file.myqcloud.com/bi-element-ui/homeData/3.png';
|
|
137
|
+
case '4':
|
|
138
|
+
return 'https://wanxiaomeng-1255977238.file.myqcloud.com/bi-element-ui/homeData/4.png';
|
|
139
|
+
default:
|
|
140
|
+
return 'https://wanxiaomeng-1255977238.file.myqcloud.com/bi-element-ui/homeData/1.png';
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
const initData = ()=>{
|
|
144
|
+
searchcondition();
|
|
145
|
+
getSwiper();
|
|
146
|
+
getMessage();
|
|
147
|
+
};
|
|
148
|
+
const handleChange = (e)=>{
|
|
149
|
+
setSearchData({
|
|
150
|
+
...searchData,
|
|
151
|
+
combination: e.target.value
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
const handleClick = async (id)=>{
|
|
155
|
+
const data = {
|
|
156
|
+
uid: uid,
|
|
157
|
+
combination: searchData.combination,
|
|
158
|
+
category_id: id,
|
|
159
|
+
page: 1,
|
|
160
|
+
page_size: searchData.page_size,
|
|
161
|
+
total: searchData.total
|
|
162
|
+
};
|
|
163
|
+
setSearchData(data);
|
|
164
|
+
getMessage(data);
|
|
165
|
+
};
|
|
166
|
+
const handleSearch = ()=>{
|
|
167
|
+
const dataInfo = {
|
|
168
|
+
uid: uid,
|
|
169
|
+
combination: searchData.combination,
|
|
170
|
+
category_id: '',
|
|
171
|
+
page: 1,
|
|
172
|
+
page_size: searchData.page_size,
|
|
173
|
+
total: searchData.total
|
|
174
|
+
};
|
|
175
|
+
getMessage(dataInfo);
|
|
176
|
+
};
|
|
177
|
+
const handleNext = (type)=>{
|
|
178
|
+
if ('prev' === type && 1 === searchData.page) return;
|
|
179
|
+
if ('next' === type && searchData.page === Math.ceil(searchData.total / searchData.page_size)) return;
|
|
180
|
+
const dataInfo = {
|
|
181
|
+
uid: uid,
|
|
182
|
+
combination: searchData.combination,
|
|
183
|
+
category_id: searchData.category_id,
|
|
184
|
+
page: 'prev' === type ? searchData.page - 1 : searchData.page + 1,
|
|
185
|
+
page_size: searchData.page_size,
|
|
186
|
+
total: searchData.total
|
|
187
|
+
};
|
|
188
|
+
console.log(dataInfo, '>>>>>>dataInfo');
|
|
189
|
+
getMessage(dataInfo);
|
|
190
|
+
};
|
|
191
|
+
useEffect(()=>{
|
|
192
|
+
initData();
|
|
193
|
+
}, []);
|
|
194
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
195
|
+
className: "home-data-content",
|
|
196
|
+
children: [
|
|
197
|
+
/*#__PURE__*/ jsx("div", {
|
|
198
|
+
className: "home-swiper",
|
|
199
|
+
children: /*#__PURE__*/ jsx(Carousel, {
|
|
200
|
+
autoplay: true,
|
|
201
|
+
arrows: true,
|
|
202
|
+
adaptiveHeight: true,
|
|
203
|
+
draggable: true,
|
|
204
|
+
infinite: true,
|
|
205
|
+
children: swiperData.map((item)=>/*#__PURE__*/ jsx("div", {
|
|
206
|
+
children: /*#__PURE__*/ jsx("img", {
|
|
207
|
+
onClick: ()=>onClickSwiper(item),
|
|
208
|
+
style: {
|
|
209
|
+
width: '100%',
|
|
210
|
+
height: '100%'
|
|
211
|
+
},
|
|
212
|
+
src: item.image_path
|
|
213
|
+
})
|
|
214
|
+
}, item.id))
|
|
215
|
+
})
|
|
216
|
+
}),
|
|
217
|
+
/*#__PURE__*/ jsxs("div", {
|
|
218
|
+
className: "home-data",
|
|
219
|
+
children: [
|
|
220
|
+
/*#__PURE__*/ jsxs("div", {
|
|
221
|
+
className: "home-search",
|
|
222
|
+
children: [
|
|
223
|
+
/*#__PURE__*/ jsxs(Space.Compact, {
|
|
224
|
+
children: [
|
|
225
|
+
/*#__PURE__*/ jsx(Input, {
|
|
226
|
+
value: searchData.combination,
|
|
227
|
+
onChange: (e)=>handleChange(e),
|
|
228
|
+
placeholder: "输入标题关键词",
|
|
229
|
+
allowClear: true
|
|
230
|
+
}),
|
|
231
|
+
/*#__PURE__*/ jsx(Button, {
|
|
232
|
+
onClick: ()=>handleSearch(),
|
|
233
|
+
icon: /*#__PURE__*/ jsx(SearchOutlined, {})
|
|
234
|
+
})
|
|
235
|
+
]
|
|
236
|
+
}),
|
|
237
|
+
/*#__PURE__*/ jsx("div", {
|
|
238
|
+
className: "home-search-button-list",
|
|
239
|
+
children: options.buttonList.map((item)=>/*#__PURE__*/ jsx(Button, {
|
|
240
|
+
onClick: ()=>handleClick(item.value),
|
|
241
|
+
style: {
|
|
242
|
+
marginLeft: 10
|
|
243
|
+
},
|
|
244
|
+
children: item.label
|
|
245
|
+
}, item.value))
|
|
246
|
+
}, searchData.category_id)
|
|
247
|
+
]
|
|
248
|
+
}),
|
|
249
|
+
/*#__PURE__*/ jsxs("div", {
|
|
250
|
+
className: "home-data-grid",
|
|
251
|
+
children: [
|
|
252
|
+
/*#__PURE__*/ jsx(LeftCircleOutlined, {
|
|
253
|
+
onClick: ()=>handleNext('prev'),
|
|
254
|
+
className: "home-data-grid-left"
|
|
255
|
+
}),
|
|
256
|
+
/*#__PURE__*/ jsx(RightCircleOutlined, {
|
|
257
|
+
onClick: ()=>handleNext('next'),
|
|
258
|
+
className: "home-data-grid-right"
|
|
259
|
+
}),
|
|
260
|
+
/*#__PURE__*/ jsx("div", {
|
|
261
|
+
className: "home-data-grid-center",
|
|
262
|
+
children: messageData.map((item)=>/*#__PURE__*/ jsxs("div", {
|
|
263
|
+
className: "home-data-message-item",
|
|
264
|
+
onClick: ()=>getDataDetail(item),
|
|
265
|
+
children: [
|
|
266
|
+
/*#__PURE__*/ jsxs("div", {
|
|
267
|
+
className: "home-data-message-type",
|
|
268
|
+
children: [
|
|
269
|
+
/*#__PURE__*/ jsx("img", {
|
|
270
|
+
className: "home-data-message-type-img",
|
|
271
|
+
src: returnCategoryImg(item.category_id)
|
|
272
|
+
}),
|
|
273
|
+
/*#__PURE__*/ jsx("div", {
|
|
274
|
+
className: "home-data-message-type-text",
|
|
275
|
+
children: item.category
|
|
276
|
+
})
|
|
277
|
+
]
|
|
278
|
+
}),
|
|
279
|
+
/*#__PURE__*/ jsxs("div", {
|
|
280
|
+
className: "home-data-message-item-container",
|
|
281
|
+
children: [
|
|
282
|
+
/*#__PURE__*/ jsx("img", {
|
|
283
|
+
className: "home-data-message-item-left",
|
|
284
|
+
src: item.cover_image
|
|
285
|
+
}),
|
|
286
|
+
/*#__PURE__*/ jsxs("div", {
|
|
287
|
+
className: "home-data-message-item-right",
|
|
288
|
+
children: [
|
|
289
|
+
/*#__PURE__*/ jsxs("div", {
|
|
290
|
+
className: "home-data-message-item-right-top",
|
|
291
|
+
children: [
|
|
292
|
+
/*#__PURE__*/ jsx("div", {
|
|
293
|
+
className: "home-data-message-item-right-top-name",
|
|
294
|
+
children: item.title
|
|
295
|
+
}),
|
|
296
|
+
/*#__PURE__*/ jsx("div", {
|
|
297
|
+
className: "home-data-message-item-right-bottom",
|
|
298
|
+
children: item.create_time
|
|
299
|
+
})
|
|
300
|
+
]
|
|
301
|
+
}),
|
|
302
|
+
/*#__PURE__*/ jsx("div", {
|
|
303
|
+
className: "home-data-message-item-right-top-time",
|
|
304
|
+
children: item.short_desc
|
|
305
|
+
})
|
|
306
|
+
]
|
|
307
|
+
})
|
|
308
|
+
]
|
|
309
|
+
}),
|
|
310
|
+
item.is_read ? null : /*#__PURE__*/ jsx("img", {
|
|
311
|
+
className: "is_read",
|
|
312
|
+
src: "https://wanxiaomeng-1255977238.file.myqcloud.com/bi-element-ui/homeData/new.png",
|
|
313
|
+
alt: ""
|
|
314
|
+
})
|
|
315
|
+
]
|
|
316
|
+
}, item.id))
|
|
317
|
+
})
|
|
318
|
+
]
|
|
319
|
+
})
|
|
320
|
+
]
|
|
321
|
+
}),
|
|
322
|
+
/*#__PURE__*/ jsx(Drawer, {
|
|
323
|
+
title: "消息详情",
|
|
324
|
+
closable: {
|
|
325
|
+
placement: 'end'
|
|
326
|
+
},
|
|
327
|
+
onClose: onClose,
|
|
328
|
+
open: dataDetail.isShow,
|
|
329
|
+
size: "560px",
|
|
330
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
331
|
+
className: "home-data-detail",
|
|
332
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
333
|
+
className: "detail",
|
|
334
|
+
children: [
|
|
335
|
+
/*#__PURE__*/ jsx("div", {
|
|
336
|
+
className: "detail_title",
|
|
337
|
+
children: dataDetail.data.title
|
|
338
|
+
}),
|
|
339
|
+
/*#__PURE__*/ jsx("div", {
|
|
340
|
+
className: "detail_time",
|
|
341
|
+
children: dataDetail.data.create_time
|
|
342
|
+
}),
|
|
343
|
+
/*#__PURE__*/ jsx("div", {
|
|
344
|
+
className: "detail_desc",
|
|
345
|
+
children: dataDetail.data.short_desc
|
|
346
|
+
}),
|
|
347
|
+
/*#__PURE__*/ jsx("div", {
|
|
348
|
+
className: "detail_content",
|
|
349
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
350
|
+
className: "content_content",
|
|
351
|
+
dangerouslySetInnerHTML: {
|
|
352
|
+
__html: dataDetail.data.content
|
|
353
|
+
}
|
|
354
|
+
})
|
|
355
|
+
})
|
|
356
|
+
]
|
|
357
|
+
})
|
|
358
|
+
})
|
|
359
|
+
})
|
|
360
|
+
]
|
|
361
|
+
});
|
|
362
|
+
};
|
|
363
|
+
const HomeData = HomeData_HomeData;
|
|
364
|
+
export { HomeData as default };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
.home-data-content {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
background-color: #ffffff;
|
|
5
|
+
.home-swiper {
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
}
|
|
9
|
+
.home-data {
|
|
10
|
+
.home-search {
|
|
11
|
+
margin: 1vw 3.5vw;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
}
|
|
16
|
+
.home-data-grid {
|
|
17
|
+
height: 19.5vw;
|
|
18
|
+
position: relative;
|
|
19
|
+
.home-data-grid-center {
|
|
20
|
+
margin: 1vw 3.5vw;
|
|
21
|
+
height: 17vw;
|
|
22
|
+
display: grid;
|
|
23
|
+
grid-template-columns: 1fr 1fr;
|
|
24
|
+
grid-gap: 1vw;
|
|
25
|
+
.home-data-message-item {
|
|
26
|
+
position: relative;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
height: 9vw;
|
|
29
|
+
background-color: #f8f8fa;
|
|
30
|
+
box-shadow: 0px 0.1vw 0.45vw 0px rgba(168, 203, 255, 0.36);
|
|
31
|
+
border-radius: 0.2vw;
|
|
32
|
+
border: 0.1vw solid #fff;
|
|
33
|
+
padding: 1vw;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
justify-content: space-between;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
.home-data-message-type {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
line-height: 1vw;
|
|
42
|
+
height: 1vw;
|
|
43
|
+
.home-data-message-type-img {
|
|
44
|
+
width: 1vw;
|
|
45
|
+
height: 1vw;
|
|
46
|
+
}
|
|
47
|
+
.home-data-message-type-text {
|
|
48
|
+
margin: 0 0 0 0.5vw;
|
|
49
|
+
font-size: 1.1vw;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
.home-data-message-item-container {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: space-between;
|
|
56
|
+
.home-data-message-item-left {
|
|
57
|
+
width: 4vw;
|
|
58
|
+
height: 4vw;
|
|
59
|
+
margin-right: 1.2vw;
|
|
60
|
+
}
|
|
61
|
+
.home-data-message-item-right {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
justify-content: space-between;
|
|
65
|
+
font-size: 0.7vw;
|
|
66
|
+
flex: 1;
|
|
67
|
+
.home-data-message-item-right-top {
|
|
68
|
+
display: flex;
|
|
69
|
+
.home-data-message-item-right-top-name {
|
|
70
|
+
max-width: 20vw;
|
|
71
|
+
height: 1.1vw;
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
color: #333;
|
|
74
|
+
line-height: 1.1vw;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
text-overflow: ellipsis;
|
|
78
|
+
flex: 1;
|
|
79
|
+
}
|
|
80
|
+
.home-data-message-item-right-bottom {
|
|
81
|
+
flex-shrink: 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
.home-data-message-item-right-top-time {
|
|
85
|
+
max-width: 26vw;
|
|
86
|
+
height: 1vw;
|
|
87
|
+
margin-top: 0.8vw;
|
|
88
|
+
font-size: 0.7vw;
|
|
89
|
+
font-weight: 400;
|
|
90
|
+
color: #333;
|
|
91
|
+
line-height: 1vw;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
white-space: nowrap;
|
|
94
|
+
text-overflow: ellipsis;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
.home-data-grid-left {
|
|
101
|
+
position: absolute;
|
|
102
|
+
left: 0;
|
|
103
|
+
top: 50%;
|
|
104
|
+
transform: translateY(-50%);
|
|
105
|
+
color: #888888;
|
|
106
|
+
}
|
|
107
|
+
.home-data-grid-right {
|
|
108
|
+
position: absolute;
|
|
109
|
+
right: 0;
|
|
110
|
+
top: 50%;
|
|
111
|
+
transform: translateY(-50%);
|
|
112
|
+
color: #888888;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.is_read {
|
|
117
|
+
position: absolute;
|
|
118
|
+
right: 0.1vw;
|
|
119
|
+
top: 0.3vw;
|
|
120
|
+
width: 1.5vw;
|
|
121
|
+
height: 0.8vw;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
.home-data-detail {
|
|
125
|
+
height: 100%;
|
|
126
|
+
box-sizing: border-box;
|
|
127
|
+
overflow-x: hidden;
|
|
128
|
+
overflow-y: auto;
|
|
129
|
+
|
|
130
|
+
.detail_title {
|
|
131
|
+
width: 440px;
|
|
132
|
+
height: 22px;
|
|
133
|
+
font-size: 16px;
|
|
134
|
+
font-weight: 500;
|
|
135
|
+
color: #333;
|
|
136
|
+
line-height: 22px;
|
|
137
|
+
overflow: hidden;
|
|
138
|
+
white-space: nowrap;
|
|
139
|
+
text-overflow: ellipsis;
|
|
140
|
+
}
|
|
141
|
+
.detail_time {
|
|
142
|
+
width: 320px;
|
|
143
|
+
height: 16px;
|
|
144
|
+
margin-top: 12px;
|
|
145
|
+
font-size: 12px;
|
|
146
|
+
font-weight: 400;
|
|
147
|
+
color: #999;
|
|
148
|
+
line-height: 16px;
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
white-space: nowrap;
|
|
151
|
+
text-overflow: ellipsis;
|
|
152
|
+
}
|
|
153
|
+
.detail_desc {
|
|
154
|
+
margin-top: 24px;
|
|
155
|
+
width: 500px;
|
|
156
|
+
font-size: 14px;
|
|
157
|
+
font-weight: 400;
|
|
158
|
+
color: #333;
|
|
159
|
+
line-height: 20px;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as HomeData } from './HomeData';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import react, { memo, useMemo } from "react";
|
|
3
|
+
import { useConfig } from "../ConfigProvider/ConfigContext.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__ant_design_icons_a8184985__ from "@ant-design/icons";
|
|
5
|
+
const BiIcon = /*#__PURE__*/ memo((props)=>{
|
|
6
|
+
const { contextValue } = useConfig();
|
|
7
|
+
const { iconList } = contextValue;
|
|
8
|
+
const { name = '', iconType = '', iconId = '', ...restProps } = props;
|
|
9
|
+
const upperIconType = useMemo(()=>iconType.toUpperCase(), [
|
|
10
|
+
iconType
|
|
11
|
+
]);
|
|
12
|
+
const getCustomIcon = ()=>{
|
|
13
|
+
const iconGroup = iconList[upperIconType];
|
|
14
|
+
if (!iconGroup) return '';
|
|
15
|
+
const iconObj = iconGroup[iconId];
|
|
16
|
+
if (!iconObj || !iconObj.icon) return '';
|
|
17
|
+
return '#' + iconObj.icon;
|
|
18
|
+
};
|
|
19
|
+
const customIcon = getCustomIcon();
|
|
20
|
+
if (customIcon) return /*#__PURE__*/ jsx("svg", {
|
|
21
|
+
...restProps,
|
|
22
|
+
children: /*#__PURE__*/ jsx("use", {
|
|
23
|
+
xlinkHref: customIcon
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
const IconComponent = __WEBPACK_EXTERNAL_MODULE__ant_design_icons_a8184985__[name];
|
|
27
|
+
if (!IconComponent) {
|
|
28
|
+
console.warn(`图标 "${name}" 未找到,请检查 BiIcon 或 @ant-design/icons 中是否存在该图标`);
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return /*#__PURE__*/ react.createElement(IconComponent, restProps);
|
|
32
|
+
});
|
|
33
|
+
const Icon = BiIcon;
|
|
34
|
+
export { Icon as default };
|
|
File without changes
|