@cloud-app-dev/vidc 4.0.15 → 4.0.19
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/.dumirc.ts +54 -70
- package/.editorconfig +13 -13
- package/.eslintignore +6 -6
- package/.eslintrc.js +3 -3
- package/.fatherrc.ts +14 -15
- package/.hintrc +8 -8
- package/.husky/commit-msg +5 -5
- package/.husky/pre-commit +4 -4
- package/.prettierignore +8 -8
- package/.prettierrc.js +16 -16
- package/.stylelintrc.js +113 -113
- package/README.md +19 -19
- package/{icon-fix.js → icon-fix.mjs} +31 -31
- package/package.json +97 -96
- package/release-build.sh +48 -47
- package/scripts/entry.js +20 -20
- package/theme-config.ts +125 -125
- package/tsconfig.json +16 -16
- package/typings/global.d.ts +4 -4
- package/es/AppContext/Sync.d.ts +0 -8
- package/es/AppContext/Sync.js +0 -44
- package/es/AppContext/index.d.ts +0 -10
- package/es/AppContext/index.js +0 -144
- package/es/AppContext/interface.d.ts +0 -41
- package/es/AppContext/static.d.ts +0 -8
- package/es/AppContext/static.js +0 -9
- package/es/Auth/index.d.ts +0 -8
- package/es/Auth/index.js +0 -18
- package/es/AutoExit/index.d.ts +0 -6
- package/es/AutoExit/index.js +0 -23
- package/es/CheckGroupFixed/demo.d.ts +0 -3
- package/es/CheckGroupFixed/demo.js +0 -25
- package/es/CheckGroupFixed/index.d.ts +0 -18
- package/es/CheckGroupFixed/index.js +0 -150
- package/es/CheckGroupFixed/index.less +0 -53
- package/es/Config/index.d.ts +0 -4
- package/es/Config/index.js +0 -77
- package/es/Config/interface.d.ts +0 -65
- package/es/Config/utils.d.ts +0 -4
- package/es/Config/utils.js +0 -33
- package/es/ConfigContext/index.d.ts +0 -22
- package/es/ConfigContext/index.js +0 -25
- package/es/CustomRenderSelect/index.d.ts +0 -12
- package/es/CustomRenderSelect/index.js +0 -83
- package/es/CustomRenderSelect/index.less +0 -25
- package/es/DBTools/index.d.ts +0 -25
- package/es/DBTools/index.js +0 -337
- package/es/DisableMark/index.d.ts +0 -9
- package/es/DisableMark/index.js +0 -22
- package/es/DisableMark/index.less +0 -9
- package/es/DomMove/demo.d.ts +0 -2
- package/es/DomMove/demo.js +0 -20
- package/es/DomMove/index.d.ts +0 -16
- package/es/DomMove/index.js +0 -149
- package/es/DomMove/utils.d.ts +0 -8
- package/es/DomMove/utils.js +0 -33
- package/es/Drag/DragAndDropItem.d.ts +0 -4
- package/es/Drag/DragAndDropItem.js +0 -133
- package/es/Drag/DropItem.d.ts +0 -4
- package/es/Drag/DropItem.js +0 -50
- package/es/Drag/index.d.ts +0 -7
- package/es/Drag/index.js +0 -7
- package/es/Drag/interface.d.ts +0 -16
- package/es/DynamicGridList/Demo.d.ts +0 -3
- package/es/DynamicGridList/Demo.js +0 -86
- package/es/DynamicGridList/index.d.ts +0 -27
- package/es/DynamicGridList/index.js +0 -71
- package/es/DynamicList/demo.d.ts +0 -2
- package/es/DynamicList/demo.js +0 -50
- package/es/DynamicList/index.d.ts +0 -31
- package/es/DynamicList/index.js +0 -96
- package/es/DynamicList/index.less +0 -17
- package/es/DynamicList/interface.d.ts +0 -19
- package/es/DynamicList/utils.d.ts +0 -4
- package/es/DynamicList/utils.js +0 -6
- package/es/ErrorFallback/index.d.ts +0 -9
- package/es/ErrorFallback/index.js +0 -38
- package/es/ErrorFallback/inerface.d.ts +0 -48
- package/es/EventTools/index.d.ts +0 -3
- package/es/EventTools/index.js +0 -12
- package/es/FrontendPlayer/index.d.ts +0 -4
- package/es/FrontendPlayer/index.js +0 -2
- package/es/FullScreen/index.d.ts +0 -22
- package/es/FullScreen/index.js +0 -36
- package/es/FullScreen/index.less +0 -18
- package/es/GridList/Demo.d.ts +0 -3
- package/es/GridList/Demo.js +0 -89
- package/es/GridList/data.d.ts +0 -16
- package/es/GridList/data.js +0 -609
- package/es/GridList/hook.d.ts +0 -13
- package/es/GridList/hook.js +0 -270
- package/es/GridList/index.d.ts +0 -15
- package/es/GridList/index.js +0 -48
- package/es/GridList/index.less +0 -8
- package/es/GridList/interface.d.ts +0 -59
- package/es/GridList/utils.d.ts +0 -9
- package/es/GridList/utils.js +0 -42
- package/es/HightLevel/index.d.ts +0 -9
- package/es/HightLevel/index.js +0 -21
- package/es/HightLevel/index.less +0 -3
- package/es/IconFont/index.d.ts +0 -12
- package/es/IconFont/index.js +0 -63
- package/es/ImageView/index.d.ts +0 -17
- package/es/ImageView/index.js +0 -58
- package/es/ImageView/index.less +0 -11
- package/es/InstanceHistory/index.d.ts +0 -3
- package/es/InstanceHistory/index.js +0 -7
- package/es/LabelPlayer/111.png +0 -0
- package/es/LabelPlayer/demo.d.ts +0 -2
- package/es/LabelPlayer/demo.js +0 -123
- package/es/LabelPlayer/index.d.ts +0 -21
- package/es/LabelPlayer/index.js +0 -169
- package/es/LabelPlayer/index.less +0 -24
- package/es/LabelValue/index.d.ts +0 -15
- package/es/LabelValue/index.js +0 -32
- package/es/LabelValue/index.less +0 -23
- package/es/List/demo.d.ts +0 -3
- package/es/List/demo.js +0 -26
- package/es/List/index.d.ts +0 -28
- package/es/List/index.js +0 -30
- package/es/List/index.less +0 -13
- package/es/ListWithSizeAnimate/demo.d.ts +0 -2
- package/es/ListWithSizeAnimate/demo.js +0 -128
- package/es/ListWithSizeAnimate/index.d.ts +0 -14
- package/es/ListWithSizeAnimate/index.js +0 -97
- package/es/ListWithSizeAnimate/index.less +0 -23
- package/es/LoaderScript/index.d.ts +0 -47
- package/es/LoaderScript/index.js +0 -38
- package/es/LoaderScript/utils.d.ts +0 -13
- package/es/LoaderScript/utils.js +0 -179
- package/es/Map/AMap.d.ts +0 -7109
- package/es/Map/BasicMap/AMapInstance.d.ts +0 -19
- package/es/Map/BasicMap/AMapInstance.js +0 -98
- package/es/Map/BasicMap/LeafletInstance.d.ts +0 -18
- package/es/Map/BasicMap/LeafletInstance.js +0 -111
- package/es/Map/BasicMap/index.d.ts +0 -9
- package/es/Map/BasicMap/index.js +0 -98
- package/es/Map/BasicMap/index.less +0 -29
- package/es/Map/ClusterLayer/demo.d.ts +0 -3
- package/es/Map/ClusterLayer/demo.js +0 -22
- package/es/Map/ClusterLayer/hook.d.ts +0 -5
- package/es/Map/ClusterLayer/hook.js +0 -124
- package/es/Map/ClusterLayer/index.d.ts +0 -6
- package/es/Map/ClusterLayer/index.js +0 -32
- package/es/Map/ClusterLayer/index.less +0 -29
- package/es/Map/ClusterLayer/props.d.ts +0 -8
- package/es/Map/Config/index.d.ts +0 -9
- package/es/Map/Config/index.js +0 -52
- package/es/Map/Config/utils.d.ts +0 -2
- package/es/Map/Config/utils.js +0 -65
- package/es/Map/Context/index.d.ts +0 -11
- package/es/Map/Context/index.js +0 -56
- package/es/Map/FindPio/index.d.ts +0 -4
- package/es/Map/FindPio/index.js +0 -14
- package/es/Map/FindPio/index.less +0 -7
- package/es/Map/InfoWindow/MakerLikeWindow.d.ts +0 -4
- package/es/Map/InfoWindow/MakerLikeWindow.js +0 -113
- package/es/Map/InfoWindow/demo.d.ts +0 -3
- package/es/Map/InfoWindow/demo.js +0 -76
- package/es/Map/InfoWindow/index.d.ts +0 -11
- package/es/Map/InfoWindow/index.js +0 -67
- package/es/Map/LevelCenter/DragMarker/index.d.ts +0 -10
- package/es/Map/LevelCenter/DragMarker/index.js +0 -44
- package/es/Map/LevelCenter/demo.d.ts +0 -3
- package/es/Map/LevelCenter/demo.js +0 -46
- package/es/Map/LevelCenter/index.d.ts +0 -15
- package/es/Map/LevelCenter/index.js +0 -71
- package/es/Map/LoaderMap/index.d.ts +0 -12
- package/es/Map/LoaderMap/index.js +0 -71
- package/es/Map/MapDrawSelect/demo.d.ts +0 -3
- package/es/Map/MapDrawSelect/demo.js +0 -79
- package/es/Map/MapDrawSelect/index.d.ts +0 -15
- package/es/Map/MapDrawSelect/index.js +0 -62
- package/es/Map/MouseTool/index.d.ts +0 -10
- package/es/Map/MouseTool/index.js +0 -44
- package/es/Map/MouseTool/useMouseTools.d.ts +0 -7
- package/es/Map/MouseTool/useMouseTools.js +0 -83
- package/es/Map/ResetTools/index.d.ts +0 -10
- package/es/Map/ResetTools/index.js +0 -67
- package/es/Map/ResetTools/index.less +0 -39
- package/es/Map/SinglePoint/demo.d.ts +0 -3
- package/es/Map/SinglePoint/demo.js +0 -16
- package/es/Map/SinglePoint/index.d.ts +0 -27
- package/es/Map/SinglePoint/index.js +0 -57
- package/es/Map/SinglePoint/index.less +0 -41
- package/es/Map/hook/useMapEvent.d.ts +0 -2
- package/es/Map/hook/useMapEvent.js +0 -19
- package/es/Map/hook/useMapType.d.ts +0 -4
- package/es/Map/hook/useMapType.js +0 -12
- package/es/Map/icon.d.ts +0 -2
- package/es/Map/icon.js +0 -10
- package/es/Map/index.d.ts +0 -24
- package/es/Map/index.js +0 -25
- package/es/Map/interface.d.ts +0 -74
- package/es/Map/points.d.ts +0 -74
- package/es/Map/points.js +0 -1
- package/es/Map/useMarker/index.d.ts +0 -10
- package/es/Map/useMarker/index.js +0 -71
- package/es/Map/withMap/index.d.ts +0 -3
- package/es/Map/withMap/index.js +0 -18
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +0 -8
- package/es/Picture/component/DefaultRects/RectInfo.js +0 -88
- package/es/Picture/component/DefaultRects/index.d.ts +0 -13
- package/es/Picture/component/DefaultRects/index.js +0 -58
- package/es/Picture/component/DefaultRects/index.less +0 -211
- package/es/Picture/component/DefaultRects/utils.d.ts +0 -2
- package/es/Picture/component/DefaultRects/utils.js +0 -11
- package/es/Picture/component/DrawRect/index.d.ts +0 -13
- package/es/Picture/component/DrawRect/index.js +0 -51
- package/es/Picture/component/DrawRect/index.less +0 -8
- package/es/Picture/component/RectMenu/index.d.ts +0 -12
- package/es/Picture/component/RectMenu/index.js +0 -79
- package/es/Picture/component/RectMenu/index.less +0 -36
- package/es/Picture/component/RectMenu/utils.d.ts +0 -12
- package/es/Picture/component/RectMenu/utils.js +0 -19
- package/es/Picture/component/Tools/index.d.ts +0 -12
- package/es/Picture/component/Tools/index.js +0 -93
- package/es/Picture/component/Tools/index.less +0 -49
- package/es/Picture/component/WheelScale/index.d.ts +0 -7
- package/es/Picture/component/WheelScale/index.js +0 -29
- package/es/Picture/demo.d.ts +0 -2
- package/es/Picture/demo.js +0 -114
- package/es/Picture/index.d.ts +0 -19
- package/es/Picture/index.js +0 -354
- package/es/Picture/index.less +0 -20
- package/es/Picture/interface.d.ts +0 -196
- package/es/Picture/loadCaptureRectImage.d.ts +0 -3
- package/es/Picture/loadCaptureRectImage.js +0 -99
- package/es/Picture/useDraw.d.ts +0 -1
- package/es/Picture/useDraw.js +0 -103
- package/es/Picture/utils.d.ts +0 -26
- package/es/Picture/utils.js +0 -143
- package/es/Player/api/index.d.ts +0 -68
- package/es/Player/api/index.js +0 -283
- package/es/Player/context.d.ts +0 -21
- package/es/Player/context.js +0 -25
- package/es/Player/contraller_bar/bar.d.ts +0 -8
- package/es/Player/contraller_bar/bar.js +0 -28
- package/es/Player/contraller_bar/contraller_event.d.ts +0 -6
- package/es/Player/contraller_bar/contraller_event.js +0 -53
- package/es/Player/contraller_bar/index.d.ts +0 -14
- package/es/Player/contraller_bar/index.js +0 -33
- package/es/Player/contraller_bar/left_bar.d.ts +0 -10
- package/es/Player/contraller_bar/left_bar.js +0 -88
- package/es/Player/contraller_bar/right_bar.d.ts +0 -8
- package/es/Player/contraller_bar/right_bar.js +0 -37
- package/es/Player/contraller_bar/time.d.ts +0 -3
- package/es/Player/contraller_bar/time.js +0 -21
- package/es/Player/contraller_bar/useBarStatus.d.ts +0 -2
- package/es/Player/contraller_bar/useBarStatus.js +0 -43
- package/es/Player/contraller_bar/volume.d.ts +0 -9
- package/es/Player/contraller_bar/volume.js +0 -65
- package/es/Player/demo.d.ts +0 -3
- package/es/Player/demo.js +0 -277
- package/es/Player/empty.d.ts +0 -2
- package/es/Player/empty.js +0 -6
- package/es/Player/event/errorEvent.d.ts +0 -14
- package/es/Player/event/errorEvent.js +0 -88
- package/es/Player/event/eventName.d.ts +0 -18
- package/es/Player/event/eventName.js +0 -30
- package/es/Player/event/index.d.ts +0 -24
- package/es/Player/event/index.js +0 -204
- package/es/Player/fps_play.d.ts +0 -11
- package/es/Player/fps_play.js +0 -84
- package/es/Player/frontend_player.d.ts +0 -8
- package/es/Player/frontend_player.js +0 -72
- package/es/Player/frontend_timeline.d.ts +0 -10
- package/es/Player/frontend_timeline.js +0 -145
- package/es/Player/iconfont.d.ts +0 -5
- package/es/Player/iconfont.js +0 -22
- package/es/Player/index.d.ts +0 -2
- package/es/Player/index.js +0 -2
- package/es/Player/live_heart.d.ts +0 -8
- package/es/Player/live_heart.js +0 -46
- package/es/Player/message.d.ts +0 -5
- package/es/Player/message.js +0 -138
- package/es/Player/player.d.ts +0 -231
- package/es/Player/segment_player.d.ts +0 -9
- package/es/Player/segment_player.js +0 -230
- package/es/Player/segment_timeline.d.ts +0 -12
- package/es/Player/segment_timeline.js +0 -190
- package/es/Player/single_player.d.ts +0 -5
- package/es/Player/single_player.js +0 -275
- package/es/Player/style/bar.less +0 -43
- package/es/Player/style/iconfont.js +0 -43
- package/es/Player/style/index.less +0 -34
- package/es/Player/style/message.less +0 -56
- package/es/Player/style/slider.less +0 -106
- package/es/Player/style/timeline.less +0 -116
- package/es/Player/style/volume.less +0 -24
- package/es/Player/timeline.d.ts +0 -5
- package/es/Player/timeline.js +0 -98
- package/es/Player/util.d.ts +0 -43
- package/es/Player/util.js +0 -189
- package/es/PlayerExt/demo.d.ts +0 -3
- package/es/PlayerExt/demo.js +0 -170
- package/es/PlayerExt/index.d.ts +0 -48
- package/es/PlayerExt/index.js +0 -207
- package/es/PlayerExt/index.less +0 -10
- package/es/Progress/index.d.ts +0 -12
- package/es/Progress/index.js +0 -56
- package/es/Progress/index.less +0 -21
- package/es/ROI/demo.d.ts +0 -3
- package/es/ROI/demo.js +0 -18
- package/es/ROI/index.d.ts +0 -33
- package/es/ROI/index.js +0 -57
- package/es/ROI/index.less +0 -33
- package/es/RefDrawer/Footer.d.ts +0 -9
- package/es/RefDrawer/Footer.js +0 -27
- package/es/RefDrawer/demo.d.ts +0 -3
- package/es/RefDrawer/demo.js +0 -32
- package/es/RefDrawer/index.d.ts +0 -26
- package/es/RefDrawer/index.js +0 -73
- package/es/RefModal/demo.d.ts +0 -3
- package/es/RefModal/demo.js +0 -32
- package/es/RefModal/index.d.ts +0 -17
- package/es/RefModal/index.js +0 -71
- package/es/ScreenPlayer/Live.d.ts +0 -10
- package/es/ScreenPlayer/Live.js +0 -220
- package/es/ScreenPlayer/LiveTools.d.ts +0 -29
- package/es/ScreenPlayer/LiveTools.js +0 -167
- package/es/ScreenPlayer/PlayerWithExt.d.ts +0 -34
- package/es/ScreenPlayer/PlayerWithExt.js +0 -240
- package/es/ScreenPlayer/RatePick.d.ts +0 -8
- package/es/ScreenPlayer/RatePick.js +0 -30
- package/es/ScreenPlayer/Record.d.ts +0 -10
- package/es/ScreenPlayer/Record.js +0 -447
- package/es/ScreenPlayer/RecordTools.d.ts +0 -38
- package/es/ScreenPlayer/RecordTools.js +0 -216
- package/es/ScreenPlayer/ScreenSelect.d.ts +0 -7
- package/es/ScreenPlayer/ScreenSelect.js +0 -51
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +0 -17
- package/es/ScreenPlayer/SegmentTimeLine.js +0 -38
- package/es/ScreenPlayer/TimeMode.d.ts +0 -7
- package/es/ScreenPlayer/TimeMode.js +0 -30
- package/es/ScreenPlayer/TimeSelect.d.ts +0 -7
- package/es/ScreenPlayer/TimeSelect.js +0 -94
- package/es/ScreenPlayer/demo.d.ts +0 -2
- package/es/ScreenPlayer/demo.js +0 -24
- package/es/ScreenPlayer/demo2.d.ts +0 -2
- package/es/ScreenPlayer/demo2.js +0 -200
- package/es/ScreenPlayer/index.d.ts +0 -6
- package/es/ScreenPlayer/index.js +0 -9
- package/es/ScreenPlayer/index.less +0 -335
- package/es/ScreenPlayer/interface.d.ts +0 -216
- package/es/ScreenPlayer/useTimeSlider.d.ts +0 -25
- package/es/ScreenPlayer/useTimeSlider.js +0 -450
- package/es/ScreenPlayer/useVideoFit.d.ts +0 -5
- package/es/ScreenPlayer/useVideoFit.js +0 -35
- package/es/ScreenPlayer/utils.d.ts +0 -17
- package/es/ScreenPlayer/utils.js +0 -85
- package/es/SegmentPlayer/index.d.ts +0 -2
- package/es/SegmentPlayer/index.js +0 -2
- package/es/Service/http.d.ts +0 -6
- package/es/Service/http.js +0 -125
- package/es/Service/index.d.ts +0 -3
- package/es/Service/index.js +0 -10
- package/es/Service/interface.d.ts +0 -22
- package/es/Service/middleware.d.ts +0 -5
- package/es/Service/middleware.js +0 -15
- package/es/SocketEmitter/eventEmitter.d.ts +0 -27
- package/es/SocketEmitter/eventEmitter.js +0 -88
- package/es/SocketEmitter/index.d.ts +0 -24
- package/es/SocketEmitter/index.js +0 -125
- package/es/SocketEmitter/interface.d.ts +0 -4
- package/es/TableLayout/index.d.ts +0 -10
- package/es/TableLayout/index.js +0 -29
- package/es/TableLayout/index.less +0 -4
- package/es/ThemeAntd/demo.d.ts +0 -4
- package/es/ThemeAntd/demo.js +0 -129
- package/es/ThemeAntd/demo.less +0 -20
- package/es/ThemeAntd/index.d.ts +0 -7
- package/es/ThemeAntd/index.js +0 -23
- package/es/ThemeAntd/index.less +0 -4
- package/es/Timeout/index.d.ts +0 -32
- package/es/Timeout/index.js +0 -70
- package/es/VList/index.d.ts +0 -11
- package/es/VList/index.js +0 -42
- package/es/VList/index.less +0 -6
- package/es/VList/utils.d.ts +0 -14
- package/es/VList/utils.js +0 -17
- package/es/bigNumberTransformCN/index.d.ts +0 -5
- package/es/bigNumberTransformCN/index.js +0 -60
- package/es/cache/index.d.ts +0 -34
- package/es/cache/index.js +0 -94
- package/es/copy/index.d.ts +0 -1
- package/es/copy/index.js +0 -9
- package/es/core.d.ts +0 -0
- package/es/getThemeStyle/index.d.ts +0 -2
- package/es/getThemeStyle/index.js +0 -5
- package/es/index.d.ts +0 -60
- package/es/index.js +0 -60
- package/es/logger/index.d.ts +0 -7
- package/es/logger/index.js +0 -30
- package/es/nextTick/index.d.ts +0 -1
- package/es/nextTick/index.js +0 -7
- package/es/submidstr/index.d.ts +0 -5
- package/es/submidstr/index.js +0 -14
- package/es/treeHelper/index.d.ts +0 -11
- package/es/treeHelper/index.js +0 -189
- package/es/typings.d.ts +0 -2
- package/es/useDrawROI/index.d.ts +0 -16
- package/es/useDrawROI/index.js +0 -322
- package/es/useEventEmitterHandle/index.d.ts +0 -2
- package/es/useEventEmitterHandle/index.js +0 -17
- package/es/useFullscreen/demo.d.ts +0 -2
- package/es/useFullscreen/demo.js +0 -48
- package/es/useFullscreen/index.d.ts +0 -12
- package/es/useFullscreen/index.js +0 -76
- package/es/useHistory/index.d.ts +0 -3
- package/es/useHistory/index.js +0 -9
- package/es/useHistory/interface.d.ts +0 -3
- package/es/useInfiniteScroll/index.d.ts +0 -16
- package/es/useInfiniteScroll/index.js +0 -101
- package/es/useRafInterval/index.d.ts +0 -5
- package/es/useRafInterval/index.js +0 -70
- package/es/useSimpleState/index.d.ts +0 -3
- package/es/useSimpleState/index.js +0 -36
- package/es/useVirtualList/index.d.ts +0 -13
- package/es/useVirtualList/index.js +0 -139
- package/es/utils.d.ts +0 -14
- package/es/utils.js +0 -75
- package/es/uuid/index.d.ts +0 -4
- package/es/uuid/index.js +0 -15
package/es/ThemeAntd/demo.d.ts
DELETED
package/es/ThemeAntd/demo.js
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { Button, Checkbox, ConfigProvider, DatePicker, Input, InputNumber, Pagination, Radio, Select, Table } from 'antd';
|
|
2
|
-
import React, { useRef } from 'react';
|
|
3
|
-
import ThemeAntd from '.';
|
|
4
|
-
import "./demo.less";
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
var App = function App() {
|
|
8
|
-
var ref = useRef(null);
|
|
9
|
-
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
10
|
-
prefixCls: "cloudapp",
|
|
11
|
-
children: /*#__PURE__*/_jsx(ThemeAntd, {
|
|
12
|
-
children: /*#__PURE__*/_jsxs("div", {
|
|
13
|
-
className: "theme-antd-demo",
|
|
14
|
-
ref: ref,
|
|
15
|
-
children: [/*#__PURE__*/_jsx("p", {
|
|
16
|
-
children: /*#__PURE__*/_jsx(Input, {
|
|
17
|
-
placeholder: "\u6587\u672C\u8F93\u5165",
|
|
18
|
-
prefix: /*#__PURE__*/_jsx("div", {
|
|
19
|
-
children: "111"
|
|
20
|
-
}),
|
|
21
|
-
suffix: /*#__PURE__*/_jsx("div", {
|
|
22
|
-
children: "2222"
|
|
23
|
-
})
|
|
24
|
-
})
|
|
25
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
26
|
-
children: /*#__PURE__*/_jsx(Input, {
|
|
27
|
-
placeholder: "\u6587\u672C\u8F93\u5165"
|
|
28
|
-
})
|
|
29
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
30
|
-
children: /*#__PURE__*/_jsx(InputNumber, {
|
|
31
|
-
placeholder: "\u6570\u5B57\u8F93\u5165"
|
|
32
|
-
})
|
|
33
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
34
|
-
children: /*#__PURE__*/_jsx(Input.TextArea, {
|
|
35
|
-
placeholder: "\u591A\u884C\u6587\u672C\u8F93\u5165"
|
|
36
|
-
})
|
|
37
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
38
|
-
children: /*#__PURE__*/_jsxs(Select, {
|
|
39
|
-
placeholder: "\u9009\u62E9\u8F93\u5165",
|
|
40
|
-
getPopupContainer: function getPopupContainer() {
|
|
41
|
-
return ref.current;
|
|
42
|
-
},
|
|
43
|
-
children: [/*#__PURE__*/_jsx(Select.Option, {
|
|
44
|
-
value: 1,
|
|
45
|
-
children: "\u9009\u98791"
|
|
46
|
-
}), /*#__PURE__*/_jsx(Select.Option, {
|
|
47
|
-
value: 2,
|
|
48
|
-
children: "\u9009\u98792"
|
|
49
|
-
})]
|
|
50
|
-
})
|
|
51
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
52
|
-
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
|
53
|
-
children: [/*#__PURE__*/_jsx(Radio, {
|
|
54
|
-
value: 1,
|
|
55
|
-
children: "\u9009\u98791"
|
|
56
|
-
}), /*#__PURE__*/_jsx(Radio, {
|
|
57
|
-
value: 2,
|
|
58
|
-
children: "\u9009\u98792"
|
|
59
|
-
})]
|
|
60
|
-
})
|
|
61
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
62
|
-
children: /*#__PURE__*/_jsxs(Checkbox.Group, {
|
|
63
|
-
children: [/*#__PURE__*/_jsx(Checkbox, {
|
|
64
|
-
value: 1,
|
|
65
|
-
children: "\u9009\u98791"
|
|
66
|
-
}), /*#__PURE__*/_jsx(Checkbox, {
|
|
67
|
-
value: 2,
|
|
68
|
-
children: "\u9009\u98792"
|
|
69
|
-
})]
|
|
70
|
-
})
|
|
71
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
72
|
-
children: /*#__PURE__*/_jsx(DatePicker, {
|
|
73
|
-
getPopupContainer: function getPopupContainer() {
|
|
74
|
-
return ref.current;
|
|
75
|
-
}
|
|
76
|
-
})
|
|
77
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
78
|
-
children: /*#__PURE__*/_jsx(DatePicker.RangePicker, {
|
|
79
|
-
getPopupContainer: function getPopupContainer() {
|
|
80
|
-
return ref.current;
|
|
81
|
-
}
|
|
82
|
-
})
|
|
83
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
84
|
-
children: /*#__PURE__*/_jsx(Pagination, {
|
|
85
|
-
total: 100
|
|
86
|
-
})
|
|
87
|
-
}), /*#__PURE__*/_jsxs("p", {
|
|
88
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
89
|
-
children: "\u6309\u94AE1"
|
|
90
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
91
|
-
style: {
|
|
92
|
-
paddingRight: 10
|
|
93
|
-
}
|
|
94
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
95
|
-
type: "primary",
|
|
96
|
-
children: "\u6309\u94AE2"
|
|
97
|
-
})]
|
|
98
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
99
|
-
children: /*#__PURE__*/_jsx(Table, {
|
|
100
|
-
columns: [{
|
|
101
|
-
title: '姓名',
|
|
102
|
-
dataIndex: 'name'
|
|
103
|
-
}, {
|
|
104
|
-
title: '年龄',
|
|
105
|
-
dataIndex: 'age'
|
|
106
|
-
}, {
|
|
107
|
-
title: '性别',
|
|
108
|
-
dataIndex: 'sex'
|
|
109
|
-
}],
|
|
110
|
-
dataSource: [{
|
|
111
|
-
name: '张三',
|
|
112
|
-
sex: '男',
|
|
113
|
-
age: 20
|
|
114
|
-
}, {
|
|
115
|
-
name: '李四',
|
|
116
|
-
sex: '男',
|
|
117
|
-
age: 20
|
|
118
|
-
}, {
|
|
119
|
-
name: '王五',
|
|
120
|
-
sex: '男',
|
|
121
|
-
age: 20
|
|
122
|
-
}]
|
|
123
|
-
})
|
|
124
|
-
})]
|
|
125
|
-
})
|
|
126
|
-
})
|
|
127
|
-
});
|
|
128
|
-
};
|
|
129
|
-
export default App;
|
package/es/ThemeAntd/demo.less
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
.theme-antd-demo {
|
|
2
|
-
padding: 40px;
|
|
3
|
-
color: #fff;
|
|
4
|
-
background-color: #0f2e61;
|
|
5
|
-
|
|
6
|
-
a {
|
|
7
|
-
color: inherit;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
--form-bg: #1d4788;
|
|
11
|
-
--form-bd: rgb(255 255 255 / 30%);
|
|
12
|
-
--form-active-bg: #e8b127;
|
|
13
|
-
--table-bg: #0f2e61;
|
|
14
|
-
--table-bd: rgb(255 255 255 / 30%);
|
|
15
|
-
--table-head-bg: #1d4788;
|
|
16
|
-
--table-row-hover-color: #1d4788;
|
|
17
|
-
--radius1: 4px;
|
|
18
|
-
--color1: #fff;
|
|
19
|
-
--color: #333;
|
|
20
|
-
}
|
package/es/ThemeAntd/index.d.ts
DELETED
package/es/ThemeAntd/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ConfigProvider } from 'antd';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import "./index.less";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export default function ThemeAntd(_ref) {
|
|
6
|
-
var children = _ref.children;
|
|
7
|
-
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
8
|
-
theme: {
|
|
9
|
-
token: {
|
|
10
|
-
colorBgBase: '#1d4788',
|
|
11
|
-
colorTextBase: '#fff',
|
|
12
|
-
colorBgContainer: '#1d4788',
|
|
13
|
-
colorBgElevated: '#2a64bc',
|
|
14
|
-
controlItemBgActive: '#1d4788',
|
|
15
|
-
// 表单选中颜色
|
|
16
|
-
colorPrimary: 'orange',
|
|
17
|
-
// 主色
|
|
18
|
-
controlOutline: 'transparent' // 表单阴影
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
children: children
|
|
22
|
-
});
|
|
23
|
-
}
|
package/es/ThemeAntd/index.less
DELETED
package/es/Timeout/index.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BasicTarget } from 'ahooks/es/utils/domTarget';
|
|
3
|
-
interface ITimeoutProps {
|
|
4
|
-
/**
|
|
5
|
-
* 容器
|
|
6
|
-
* @default `document.body`
|
|
7
|
-
*/
|
|
8
|
-
contianer?: BasicTarget;
|
|
9
|
-
/**
|
|
10
|
-
* 超时时长单位s
|
|
11
|
-
*/
|
|
12
|
-
time?: number;
|
|
13
|
-
/**
|
|
14
|
-
* 超时动作,默认退出登录
|
|
15
|
-
*/
|
|
16
|
-
onTimeout?: () => void;
|
|
17
|
-
/**
|
|
18
|
-
* 忽略的情况
|
|
19
|
-
*/
|
|
20
|
-
ignore?: () => boolean;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @desc 用户创建界面超时回调
|
|
24
|
-
*/
|
|
25
|
-
declare function Timeout({ contianer, time, onTimeout, ignore }: ITimeoutProps): JSX.Element;
|
|
26
|
-
declare namespace Timeout {
|
|
27
|
-
var defaultProps: {
|
|
28
|
-
time: number;
|
|
29
|
-
contianer: HTMLElement;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
export default Timeout;
|
package/es/Timeout/index.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
import _useEventListener from "ahooks/es/useEventListener";
|
|
3
|
-
import _useRafInterval from "ahooks/es/useRafInterval";
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
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; }
|
|
7
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
14
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
16
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
-
/**
|
|
19
|
-
* @desc 用户创建界面超时回调
|
|
20
|
-
*/
|
|
21
|
-
function Timeout(_ref) {
|
|
22
|
-
var contianer = _ref.contianer,
|
|
23
|
-
time = _ref.time,
|
|
24
|
-
onTimeout = _ref.onTimeout,
|
|
25
|
-
ignore = _ref.ignore;
|
|
26
|
-
var cuurentTimeRef = useRef(Date.now());
|
|
27
|
-
var lockstatusRef = useRef(false);
|
|
28
|
-
var _useState = useState({
|
|
29
|
-
timelock: Date.now()
|
|
30
|
-
}),
|
|
31
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
-
state = _useState2[0],
|
|
33
|
-
setState = _useState2[1];
|
|
34
|
-
_useRafInterval(function () {
|
|
35
|
-
var now = Date.now();
|
|
36
|
-
setState(function (old) {
|
|
37
|
-
return _objectSpread(_objectSpread({}, old), {}, {
|
|
38
|
-
timelock: now
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
var isIgnore = ignore ? ignore() : false;
|
|
42
|
-
if (isIgnore) {
|
|
43
|
-
// 如果当前需要忽略,那么重置时间
|
|
44
|
-
cuurentTimeRef.current = now;
|
|
45
|
-
}
|
|
46
|
-
}, 1 * 1000);
|
|
47
|
-
useEffect(function () {
|
|
48
|
-
var isIgnore = ignore ? ignore() : false;
|
|
49
|
-
if (!lockstatusRef.current && state.timelock - cuurentTimeRef.current > time * 1000 && !isIgnore) {
|
|
50
|
-
lockstatusRef.current = true;
|
|
51
|
-
onTimeout === null || onTimeout === void 0 ? void 0 : onTimeout();
|
|
52
|
-
setTimeout(function () {
|
|
53
|
-
lockstatusRef.current = false;
|
|
54
|
-
}, 1000);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
58
|
-
}, [state.timelock, time]);
|
|
59
|
-
_useEventListener('mousemove', function () {
|
|
60
|
-
return cuurentTimeRef.current = Date.now();
|
|
61
|
-
}, {
|
|
62
|
-
target: contianer
|
|
63
|
-
});
|
|
64
|
-
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
65
|
-
}
|
|
66
|
-
Timeout.defaultProps = {
|
|
67
|
-
time: 15 * 60,
|
|
68
|
-
contianer: document.body
|
|
69
|
-
};
|
|
70
|
-
export default Timeout;
|
package/es/VList/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './index.less';
|
|
3
|
-
interface IVListProps<T> {
|
|
4
|
-
data?: Array<T>;
|
|
5
|
-
rowHeight?: number;
|
|
6
|
-
className?: string;
|
|
7
|
-
renderItem(item: T, index: number): JSX.Element;
|
|
8
|
-
overscan?: number;
|
|
9
|
-
}
|
|
10
|
-
declare function VList<T>({ className, rowHeight, data, renderItem, overscan }: IVListProps<T>): JSX.Element;
|
|
11
|
-
export default VList;
|
package/es/VList/index.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useRef } from 'react';
|
|
8
|
-
import useVirtualList from "../useVirtualList";
|
|
9
|
-
import "./index.less";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
function VList(_ref) {
|
|
12
|
-
var _ref$className = _ref.className,
|
|
13
|
-
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14
|
-
_ref$rowHeight = _ref.rowHeight,
|
|
15
|
-
rowHeight = _ref$rowHeight === void 0 ? 30 : _ref$rowHeight,
|
|
16
|
-
_ref$data = _ref.data,
|
|
17
|
-
data = _ref$data === void 0 ? [] : _ref$data,
|
|
18
|
-
renderItem = _ref.renderItem,
|
|
19
|
-
_ref$overscan = _ref.overscan,
|
|
20
|
-
overscan = _ref$overscan === void 0 ? 10 : _ref$overscan;
|
|
21
|
-
var containerRef = useRef(null);
|
|
22
|
-
var wrapperRef = useRef(null);
|
|
23
|
-
var _useVirtualList = useVirtualList(data, {
|
|
24
|
-
containerTarget: containerRef,
|
|
25
|
-
wrapperTarget: wrapperRef,
|
|
26
|
-
itemHeight: rowHeight,
|
|
27
|
-
overscan: overscan
|
|
28
|
-
}),
|
|
29
|
-
_useVirtualList2 = _slicedToArray(_useVirtualList, 1),
|
|
30
|
-
list = _useVirtualList2[0];
|
|
31
|
-
return /*#__PURE__*/_jsx("div", {
|
|
32
|
-
className: "vidc-simple-list-layout ".concat(className),
|
|
33
|
-
ref: containerRef,
|
|
34
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
35
|
-
ref: wrapperRef,
|
|
36
|
-
children: list.map(function (ele) {
|
|
37
|
-
return renderItem(ele.data, ele.index);
|
|
38
|
-
})
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
export default VList;
|
package/es/VList/index.less
DELETED
package/es/VList/utils.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React, { Key } from 'react';
|
|
2
|
-
export declare function renderRowItem(rowRenderer?: ({ data, index, style }: {
|
|
3
|
-
data: any;
|
|
4
|
-
index: number;
|
|
5
|
-
style?: React.CSSProperties;
|
|
6
|
-
}) => JSX.Element, renderItem?: (item: any, index: number) => JSX.Element, data?: any[]): (({ data, index, style }: {
|
|
7
|
-
data: any;
|
|
8
|
-
index: number;
|
|
9
|
-
style?: React.CSSProperties | undefined;
|
|
10
|
-
}) => JSX.Element) | (({ key, index, style }: {
|
|
11
|
-
key: Key;
|
|
12
|
-
index: number;
|
|
13
|
-
style?: React.CSSProperties | undefined;
|
|
14
|
-
}) => JSX.Element);
|
package/es/VList/utils.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
export function renderRowItem(rowRenderer, renderItem, data) {
|
|
4
|
-
if (rowRenderer) {
|
|
5
|
-
return rowRenderer;
|
|
6
|
-
}
|
|
7
|
-
return function (_ref) {
|
|
8
|
-
var key = _ref.key,
|
|
9
|
-
index = _ref.index,
|
|
10
|
-
style = _ref.style;
|
|
11
|
-
var item = data[index];
|
|
12
|
-
return /*#__PURE__*/_jsx("div", {
|
|
13
|
-
style: style,
|
|
14
|
-
children: renderItem(item, index)
|
|
15
|
-
}, key);
|
|
16
|
-
};
|
|
17
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 大数字转换,将大额数字转换为万、千万、亿等
|
|
3
|
-
* @param value 数字值
|
|
4
|
-
*/
|
|
5
|
-
export default function bigNumberTransformCN(value) {
|
|
6
|
-
var newValue = ['', '', ''];
|
|
7
|
-
var fr = 1000;
|
|
8
|
-
var num = 3;
|
|
9
|
-
var text1 = '';
|
|
10
|
-
var fm = 1;
|
|
11
|
-
while (value / fr >= 1) {
|
|
12
|
-
fr *= 10;
|
|
13
|
-
num += 1;
|
|
14
|
-
// console.log('数字', value / fr, 'num:', num)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (num <= 4) {
|
|
18
|
-
// 千
|
|
19
|
-
newValue[0] = "".concat(Math.round(value / 1000));
|
|
20
|
-
newValue[1] = '千';
|
|
21
|
-
} else if (num <= 8) {
|
|
22
|
-
// 万
|
|
23
|
-
text1 = Math.round(num - 4) / 3 > 1 ? '千万' : '万';
|
|
24
|
-
// tslint:disable-next-line:no-shadowed-variable
|
|
25
|
-
fm = text1 === '万' ? 10000 : 10000000;
|
|
26
|
-
if (value % fm === 0) {
|
|
27
|
-
newValue[0] = Math.round(value / fm) + '';
|
|
28
|
-
} else {
|
|
29
|
-
newValue[0] = Math.round(value / fm).toFixed(2) + '';
|
|
30
|
-
}
|
|
31
|
-
newValue[1] = text1;
|
|
32
|
-
} else if (num <= 16) {
|
|
33
|
-
// 亿
|
|
34
|
-
text1 = (num - 8) / 3 > 1 ? '千亿' : '亿';
|
|
35
|
-
text1 = (num - 8) / 4 > 1 ? '万亿' : text1;
|
|
36
|
-
text1 = (num - 8) / 7 > 1 ? '千万亿' : text1;
|
|
37
|
-
// tslint:disable-next-line:no-shadowed-variable
|
|
38
|
-
fm = 1;
|
|
39
|
-
if (text1 === '亿') {
|
|
40
|
-
fm = 100000000;
|
|
41
|
-
} else if (text1 === '千亿') {
|
|
42
|
-
fm = 100000000000;
|
|
43
|
-
} else if (text1 === '万亿') {
|
|
44
|
-
fm = 1000000000000;
|
|
45
|
-
} else if (text1 === '千万亿') {
|
|
46
|
-
fm = 1000000000000000;
|
|
47
|
-
}
|
|
48
|
-
if (value % fm === 0) {
|
|
49
|
-
newValue[0] = Math.round(value / fm) + '';
|
|
50
|
-
} else {
|
|
51
|
-
newValue[0] = Math.round(value / fm).toFixed(2) + '';
|
|
52
|
-
}
|
|
53
|
-
newValue[1] = text1;
|
|
54
|
-
}
|
|
55
|
-
if (value < 1000) {
|
|
56
|
-
newValue[0] = value + '';
|
|
57
|
-
newValue[1] = '';
|
|
58
|
-
}
|
|
59
|
-
return newValue.join('');
|
|
60
|
-
}
|
package/es/cache/index.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
declare type CacheType = 'local' | 'session' | 'cookie';
|
|
2
|
-
/**
|
|
3
|
-
* 获取缓存数据
|
|
4
|
-
* @param {string} key
|
|
5
|
-
* @param {string} type: 缓存类型 'local'(默认) / cookie / session;
|
|
6
|
-
*/
|
|
7
|
-
declare function getCache(key: string, type?: CacheType): any;
|
|
8
|
-
/**
|
|
9
|
-
* 获取缓存数据
|
|
10
|
-
* @param {string} key
|
|
11
|
-
* @param {any} value
|
|
12
|
-
* @param {string} type: 缓存类型 'local'(默认) / cookie / session;
|
|
13
|
-
*/
|
|
14
|
-
declare function setCache(key: string, value: any, type?: CacheType): void;
|
|
15
|
-
/**
|
|
16
|
-
* 获取用户缓存
|
|
17
|
-
* @param {*} key
|
|
18
|
-
* @param {*} type
|
|
19
|
-
*/
|
|
20
|
-
declare function getUserCache(key: string, type?: CacheType): any;
|
|
21
|
-
/**
|
|
22
|
-
* 设置用户缓存
|
|
23
|
-
* @param {*} key
|
|
24
|
-
* @param {*} value
|
|
25
|
-
* @param {*} type
|
|
26
|
-
*/
|
|
27
|
-
declare function setUserCache(key: string, value: any, type?: CacheType): void;
|
|
28
|
-
declare const _default: {
|
|
29
|
-
getCache: typeof getCache;
|
|
30
|
-
setCache: typeof setCache;
|
|
31
|
-
getUserCache: typeof getUserCache;
|
|
32
|
-
setUserCache: typeof setUserCache;
|
|
33
|
-
};
|
|
34
|
-
export default _default;
|
package/es/cache/index.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import Cookie from 'js-cookie';
|
|
2
|
-
/**
|
|
3
|
-
* 获取缓存数据
|
|
4
|
-
* @param {string} key
|
|
5
|
-
* @param {string} type: 缓存类型 'local'(默认) / cookie / session;
|
|
6
|
-
*/
|
|
7
|
-
function getCache(key) {
|
|
8
|
-
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'local';
|
|
9
|
-
var data;
|
|
10
|
-
switch (type) {
|
|
11
|
-
case 'cookie':
|
|
12
|
-
data = Cookie.get(key);
|
|
13
|
-
break;
|
|
14
|
-
case 'session':
|
|
15
|
-
// eslint-disable-next-line no-case-declarations
|
|
16
|
-
var strS = sessionStorage.getItem(key);
|
|
17
|
-
try {
|
|
18
|
-
data = JSON.parse(strS);
|
|
19
|
-
} catch (e) {
|
|
20
|
-
data = strS;
|
|
21
|
-
}
|
|
22
|
-
break;
|
|
23
|
-
default:
|
|
24
|
-
// eslint-disable-next-line no-case-declarations
|
|
25
|
-
var strL = localStorage.getItem(key);
|
|
26
|
-
try {
|
|
27
|
-
data = JSON.parse(strL);
|
|
28
|
-
} catch (e) {
|
|
29
|
-
data = strL;
|
|
30
|
-
}
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
return data;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* 获取缓存数据
|
|
38
|
-
* @param {string} key
|
|
39
|
-
* @param {any} value
|
|
40
|
-
* @param {string} type: 缓存类型 'local'(默认) / cookie / session;
|
|
41
|
-
*/
|
|
42
|
-
function setCache(key, value) {
|
|
43
|
-
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'local';
|
|
44
|
-
switch (type) {
|
|
45
|
-
case 'cookie':
|
|
46
|
-
Cookie.set(key, value, {
|
|
47
|
-
expires: 7
|
|
48
|
-
});
|
|
49
|
-
break;
|
|
50
|
-
case 'session':
|
|
51
|
-
sessionStorage.setItem(key, JSON.stringify(value));
|
|
52
|
-
break;
|
|
53
|
-
default:
|
|
54
|
-
localStorage.setItem(key, JSON.stringify(value));
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* 获取用户缓存
|
|
61
|
-
* @param {*} key
|
|
62
|
-
* @param {*} type
|
|
63
|
-
*/
|
|
64
|
-
function getUserCache(key) {
|
|
65
|
-
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'local';
|
|
66
|
-
var id = getCache('userId', 'session');
|
|
67
|
-
if (!id) {
|
|
68
|
-
console.error('无法获取用户信息!');
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
return getCache("".concat(id, "-").concat(key), type);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* 设置用户缓存
|
|
76
|
-
* @param {*} key
|
|
77
|
-
* @param {*} value
|
|
78
|
-
* @param {*} type
|
|
79
|
-
*/
|
|
80
|
-
function setUserCache(key, value) {
|
|
81
|
-
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'local';
|
|
82
|
-
var id = getCache('userId', 'session');
|
|
83
|
-
if (!id) {
|
|
84
|
-
console.error('无法获取用户信息!');
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
return setCache("".concat(id, "-").concat(key), value, type);
|
|
88
|
-
}
|
|
89
|
-
export default {
|
|
90
|
-
getCache: getCache,
|
|
91
|
-
setCache: setCache,
|
|
92
|
-
getUserCache: getUserCache,
|
|
93
|
-
setUserCache: setUserCache
|
|
94
|
-
};
|
package/es/copy/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function copy(text: string): void;
|
package/es/copy/index.js
DELETED
package/es/core.d.ts
DELETED
|
File without changes
|