@cloudbase/weda-ui 3.3.0 → 3.3.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/dist/src/web/components/form/form/index.js +42 -38
- package/dist/src/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +12 -4
- package/dist/src/web/components/form/userOrgSelect/userTreeSelect.h5.js +6 -2
- package/dist/src/web/components/navigationBar/index.js +9 -4
- package/package.json +3 -3
- package/dist/configs/actions/showModal.json +0 -48
- package/dist/configs/actions/showToast.json +0 -41
- package/dist/configs/components/auth.json +0 -16
- package/dist/configs/components/button.json +0 -239
- package/dist/configs/components/calendar.json +0 -81
- package/dist/configs/components/carousel.json +0 -292
- package/dist/configs/components/chart/bar.json +0 -728
- package/dist/configs/components/chart/line.json +0 -681
- package/dist/configs/components/chart/pie.json +0 -500
- package/dist/configs/components/chart/statisticsCard.json +0 -376
- package/dist/configs/components/container.json +0 -50
- package/dist/configs/components/dataView.json +0 -239
- package/dist/configs/components/drawer.json +0 -115
- package/dist/configs/components/form/checkbox.json +0 -179
- package/dist/configs/components/form/departTreeSelect.json +0 -124
- package/dist/configs/components/form/form.json +0 -69
- package/dist/configs/components/form/input.json +0 -154
- package/dist/configs/components/form/location.json +0 -216
- package/dist/configs/components/form/radio.json +0 -203
- package/dist/configs/components/form/richText.json +0 -133
- package/dist/configs/components/form/select.json +0 -431
- package/dist/configs/components/form/switch.json +0 -58
- package/dist/configs/components/form/textarea.json +0 -116
- package/dist/configs/components/form/tips.json +0 -34
- package/dist/configs/components/form/uploader.json +0 -171
- package/dist/configs/components/form/uploaderFile.json +0 -158
- package/dist/configs/components/form/userTreeSelect.json +0 -128
- package/dist/configs/components/formdetail.json +0 -105
- package/dist/configs/components/graphicCard.json +0 -413
- package/dist/configs/components/image.json +0 -187
- package/dist/configs/components/link.json +0 -79
- package/dist/configs/components/listView.json +0 -378
- package/dist/configs/components/lottery.json +0 -163
- package/dist/configs/components/modal.json +0 -72
- package/dist/configs/components/navLayout.json +0 -368
- package/dist/configs/components/navigationBar.json +0 -62
- package/dist/configs/components/richtextview.json +0 -26
- package/dist/configs/components/scrollVeiw.json +0 -253
- package/dist/configs/components/slot.json +0 -17
- package/dist/configs/components/swiper.json +0 -90
- package/dist/configs/components/tabs.json +0 -122
- package/dist/configs/components/text.json +0 -95
- package/dist/configs/components/wedaVideo.json +0 -89
- package/dist/configs/components/wxOpenApi/phone.json +0 -127
- package/dist/configs/components/wxOpenApi/phoneCode.json +0 -109
- package/dist/configs/components/wxOpenApi/share.json +0 -160
- package/dist/configs/components/wxOpenApi/userInfo.json +0 -156
- package/dist/configs/index.d.ts +0 -103
- package/dist/configs/index.js +0 -111
- package/dist/docs/common/format.d.ts +0 -13
- package/dist/docs/common/format.js +0 -122
- package/dist/docs/common/tableView.d.ts +0 -30
- package/dist/docs/common/tableView.js +0 -159
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -3
- package/dist/setupTests.d.ts +0 -1
- package/dist/setupTests.js +0 -14
- package/dist/src/web/components/chart/common/error-boundary.d.ts +0 -5
- package/dist/src/web/components/chart/common/error-boundary.js +0 -26
- package/dist/src/web/utils/getUserService.d.ts +0 -11
- package/dist/src/web/utils/getUserService.js +0 -156
- package/dist/src/web/utils/tmap.d.ts +0 -3
- package/dist/src/web/utils/tmap.js +0 -21
- package/dist/web/actions/index.d.ts +0 -2
- package/dist/web/actions/index.js +0 -2
- package/dist/web/actions/showModal/index.d.ts +0 -4
- package/dist/web/actions/showModal/index.js +0 -67
- package/dist/web/actions/showToast/index.d.ts +0 -1
- package/dist/web/actions/showToast/index.js +0 -3
- package/dist/web/components/button/index.d.ts +0 -32
- package/dist/web/components/button/index.js +0 -48
- package/dist/web/components/calendar/index.d.ts +0 -19
- package/dist/web/components/calendar/index.js +0 -189
- package/dist/web/components/calendar/util.d.ts +0 -13
- package/dist/web/components/calendar/util.js +0 -74
- package/dist/web/components/carousel/index.d.ts +0 -41
- package/dist/web/components/carousel/index.js +0 -244
- package/dist/web/components/chart/bar/index.d.ts +0 -41
- package/dist/web/components/chart/bar/index.js +0 -56
- package/dist/web/components/chart/common/config/bar.d.ts +0 -48
- package/dist/web/components/chart/common/config/bar.js +0 -49
- package/dist/web/components/chart/common/config/global.d.ts +0 -13
- package/dist/web/components/chart/common/config/global.js +0 -16
- package/dist/web/components/chart/common/config/line.d.ts +0 -46
- package/dist/web/components/chart/common/config/line.js +0 -49
- package/dist/web/components/chart/common/config/pie.d.ts +0 -29
- package/dist/web/components/chart/common/config/pie.js +0 -36
- package/dist/web/components/chart/common/core/eChartBar.d.ts +0 -68
- package/dist/web/components/chart/common/core/eChartBar.js +0 -198
- package/dist/web/components/chart/common/core/eChartBase.d.ts +0 -128
- package/dist/web/components/chart/common/core/eChartBase.js +0 -352
- package/dist/web/components/chart/common/core/eChartLine.d.ts +0 -62
- package/dist/web/components/chart/common/core/eChartLine.js +0 -170
- package/dist/web/components/chart/common/core/eChartPie.d.ts +0 -50
- package/dist/web/components/chart/common/core/eChartPie.js +0 -132
- package/dist/web/components/chart/common/core/type.d.ts +0 -35
- package/dist/web/components/chart/common/core/type.js +0 -9
- package/dist/web/components/chart/common/echarts.d.ts +0 -2
- package/dist/web/components/chart/common/echarts.js +0 -24
- package/dist/web/components/chart/common/useChart.d.ts +0 -8
- package/dist/web/components/chart/common/useChart.js +0 -60
- package/dist/web/components/chart/line/index.d.ts +0 -39
- package/dist/web/components/chart/line/index.js +0 -53
- package/dist/web/components/chart/pie/index.d.ts +0 -27
- package/dist/web/components/chart/pie/index.js +0 -40
- package/dist/web/components/chart/statisticsCard/index.d.ts +0 -85
- package/dist/web/components/chart/statisticsCard/index.js +0 -203
- package/dist/web/components/chart/statisticsCard/interface.d.ts +0 -13
- package/dist/web/components/chart/statisticsCard/interface.js +0 -1
- package/dist/web/components/container/index.d.ts +0 -6
- package/dist/web/components/container/index.js +0 -6
- package/dist/web/components/dataView/index.d.ts +0 -6
- package/dist/web/components/dataView/index.js +0 -8
- package/dist/web/components/dataView/interface.d.ts +0 -5
- package/dist/web/components/dataView/interface.js +0 -1
- package/dist/web/components/drawer/index.d.ts +0 -13
- package/dist/web/components/drawer/index.js +0 -12
- package/dist/web/components/form/checkbox/index.d.ts +0 -13
- package/dist/web/components/form/checkbox/index.js +0 -167
- package/dist/web/components/form/enumSelect/MultipleSelect.d.ts +0 -78
- package/dist/web/components/form/enumSelect/MultipleSelect.js +0 -52
- package/dist/web/components/form/enumSelect/NormalSelect.d.ts +0 -83
- package/dist/web/components/form/enumSelect/NormalSelect.js +0 -52
- package/dist/web/components/form/enumSelect/SelectContainer.d.ts +0 -16
- package/dist/web/components/form/enumSelect/SelectContainer.js +0 -30
- package/dist/web/components/form/enumSelect/index.d.ts +0 -82
- package/dist/web/components/form/enumSelect/index.js +0 -6
- package/dist/web/components/form/enumSelect/props/defaultProps.d.ts +0 -34
- package/dist/web/components/form/enumSelect/props/defaultProps.js +0 -40
- package/dist/web/components/form/enumSelect/props/propsTypes.d.ts +0 -39
- package/dist/web/components/form/enumSelect/props/propsTypes.js +0 -47
- package/dist/web/components/form/form/index.d.ts +0 -32
- package/dist/web/components/form/form/index.js +0 -108
- package/dist/web/components/form/formcell/index.d.ts +0 -8
- package/dist/web/components/form/formcell/index.js +0 -40
- package/dist/web/components/form/input/index.d.ts +0 -14
- package/dist/web/components/form/input/index.js +0 -86
- package/dist/web/components/form/location/common/mapChoose.d.ts +0 -15
- package/dist/web/components/form/location/common/mapChoose.js +0 -495
- package/dist/web/components/form/location/common/mapView.d.ts +0 -19
- package/dist/web/components/form/location/common/mapView.js +0 -172
- package/dist/web/components/form/location/common/propsConfig.d.ts +0 -59
- package/dist/web/components/form/location/common/propsConfig.js +0 -50
- package/dist/web/components/form/location/common/selectModal.d.ts +0 -21
- package/dist/web/components/form/location/common/selectModal.js +0 -44
- package/dist/web/components/form/location/common/useLocationInfo.d.ts +0 -36
- package/dist/web/components/form/location/common/useLocationInfo.js +0 -104
- package/dist/web/components/form/location/components/LocationH5/location.h5.d.ts +0 -8
- package/dist/web/components/form/location/components/LocationH5/location.h5.js +0 -325
- package/dist/web/components/form/location/components/LocationPC/Header.d.ts +0 -12
- package/dist/web/components/form/location/components/LocationPC/Header.js +0 -43
- package/dist/web/components/form/location/components/LocationPC/location.PC.d.ts +0 -8
- package/dist/web/components/form/location/components/LocationPC/location.PC.js +0 -224
- package/dist/web/components/form/location/constants.d.ts +0 -2
- package/dist/web/components/form/location/constants.js +0 -3
- package/dist/web/components/form/location/index.d.ts +0 -1
- package/dist/web/components/form/location/index.js +0 -17
- package/dist/web/components/form/radio/index.d.ts +0 -11
- package/dist/web/components/form/radio/index.js +0 -115
- package/dist/web/components/form/renderDecorator.d.ts +0 -6
- package/dist/web/components/form/renderDecorator.js +0 -20
- package/dist/web/components/form/select/dropdown-select/ui.d.ts +0 -15
- package/dist/web/components/form/select/dropdown-select/ui.js +0 -55
- package/dist/web/components/form/select/h5.d.ts +0 -16
- package/dist/web/components/form/select/h5.js +0 -410
- package/dist/web/components/form/select/index.d.ts +0 -65
- package/dist/web/components/form/select/index.js +0 -232
- package/dist/web/components/form/select/region/index.d.ts +0 -6
- package/dist/web/components/form/select/region/index.js +0 -147
- package/dist/web/components/form/select/time.d.ts +0 -9
- package/dist/web/components/form/select/time.js +0 -146
- package/dist/web/components/form/select/use-options.d.ts +0 -26
- package/dist/web/components/form/select/use-options.js +0 -103
- package/dist/web/components/form/select/year.d.ts +0 -7
- package/dist/web/components/form/select/year.js +0 -72
- package/dist/web/components/form/switch/index.d.ts +0 -6
- package/dist/web/components/form/switch/index.js +0 -58
- package/dist/web/components/form/textarea/index.d.ts +0 -12
- package/dist/web/components/form/textarea/index.js +0 -66
- package/dist/web/components/form/tips/index.d.ts +0 -8
- package/dist/web/components/form/tips/index.js +0 -17
- package/dist/web/components/form/uploader/index.d.ts +0 -3
- package/dist/web/components/form/uploader/index.js +0 -42
- package/dist/web/components/form/uploader/uploader.h5.d.ts +0 -20
- package/dist/web/components/form/uploader/uploader.h5.js +0 -224
- package/dist/web/components/form/uploader/uploader.pc.d.ts +0 -29
- package/dist/web/components/form/uploader/uploader.pc.js +0 -214
- package/dist/web/components/form/uploaderFile/index.d.ts +0 -4
- package/dist/web/components/form/uploaderFile/index.js +0 -19
- package/dist/web/components/form/uploaderFile/uploadFile.h5.d.ts +0 -23
- package/dist/web/components/form/uploaderFile/uploadFile.h5.js +0 -337
- package/dist/web/components/form/uploaderFile/uploadFile.pc.d.ts +0 -24
- package/dist/web/components/form/uploaderFile/uploadFile.pc.js +0 -313
- package/dist/web/components/form/userOrgSelect/comTool.d.ts +0 -7
- package/dist/web/components/form/userOrgSelect/comTool.js +0 -89
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.d.ts +0 -20
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +0 -259
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.d.ts +0 -4
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.pc.js +0 -153
- package/dist/web/components/form/userOrgSelect/departTreeSelect/index.d.ts +0 -2
- package/dist/web/components/form/userOrgSelect/departTreeSelect/index.js +0 -17
- package/dist/web/components/form/userOrgSelect/index.d.ts +0 -2
- package/dist/web/components/form/userOrgSelect/index.js +0 -17
- package/dist/web/components/form/userOrgSelect/userOrgSelect.less +0 -643
- package/dist/web/components/form/userOrgSelect/userTreeSelect.h5.d.ts +0 -24
- package/dist/web/components/form/userOrgSelect/userTreeSelect.h5.js +0 -276
- package/dist/web/components/form/userOrgSelect/userTreeSelect.pc.d.ts +0 -9
- package/dist/web/components/form/userOrgSelect/userTreeSelect.pc.js +0 -229
- package/dist/web/components/form/userOrgSelect/utils.d.ts +0 -35
- package/dist/web/components/form/userOrgSelect/utils.js +0 -72
- package/dist/web/components/formdetail/index.d.ts +0 -28
- package/dist/web/components/formdetail/index.js +0 -170
- package/dist/web/components/graphicCard/index.d.ts +0 -31
- package/dist/web/components/graphicCard/index.js +0 -166
- package/dist/web/components/image/image.d.ts +0 -9
- package/dist/web/components/image/image.js +0 -119
- package/dist/web/components/image/index.d.ts +0 -13
- package/dist/web/components/image/index.js +0 -91
- package/dist/web/components/index.d.ts +0 -50
- package/dist/web/components/index.js +0 -97
- package/dist/web/components/link/index.d.ts +0 -24
- package/dist/web/components/link/index.js +0 -71
- package/dist/web/components/listView/index.d.ts +0 -7
- package/dist/web/components/listView/index.js +0 -286
- package/dist/web/components/listView/interface.d.ts +0 -127
- package/dist/web/components/listView/interface.js +0 -1
- package/dist/web/components/lottery/index.d.ts +0 -22
- package/dist/web/components/lottery/index.js +0 -391
- package/dist/web/components/lottery/lotteryUtil.d.ts +0 -23
- package/dist/web/components/lottery/lotteryUtil.js +0 -181
- package/dist/web/components/modal/index.d.ts +0 -17
- package/dist/web/components/modal/index.js +0 -11
- package/dist/web/components/modal/modal.h5.d.ts +0 -4
- package/dist/web/components/modal/modal.h5.js +0 -46
- package/dist/web/components/modal/modal.pc.d.ts +0 -3
- package/dist/web/components/modal/modal.pc.js +0 -31
- package/dist/web/components/navLayout/index.d.ts +0 -46
- package/dist/web/components/navLayout/index.js +0 -116
- package/dist/web/components/navigationBar/common.d.ts +0 -15
- package/dist/web/components/navigationBar/common.js +0 -127
- package/dist/web/components/navigationBar/h5Menu.d.ts +0 -14
- package/dist/web/components/navigationBar/h5Menu.js +0 -72
- package/dist/web/components/navigationBar/horizontalMenu.d.ts +0 -12
- package/dist/web/components/navigationBar/horizontalMenu.js +0 -99
- package/dist/web/components/navigationBar/index.d.ts +0 -13
- package/dist/web/components/navigationBar/index.js +0 -157
- package/dist/web/components/navigationBar/verticalMenu.d.ts +0 -13
- package/dist/web/components/navigationBar/verticalMenu.js +0 -38
- package/dist/web/components/phone/index.d.ts +0 -18
- package/dist/web/components/phone/index.js +0 -4
- package/dist/web/components/phoneCode/index.d.ts +0 -18
- package/dist/web/components/phoneCode/index.js +0 -4
- package/dist/web/components/picker/datePicker.d.ts +0 -10
- package/dist/web/components/picker/datePicker.js +0 -31
- package/dist/web/components/picker/picker.d.ts +0 -6
- package/dist/web/components/picker/picker.js +0 -45
- package/dist/web/components/picker/timePicker.d.ts +0 -7
- package/dist/web/components/picker/timePicker.js +0 -42
- package/dist/web/components/richText/const.d.ts +0 -1
- package/dist/web/components/richText/const.js +0 -2
- package/dist/web/components/richText/index.d.ts +0 -50
- package/dist/web/components/richText/index.js +0 -352
- package/dist/web/components/richTextView/index.d.ts +0 -7
- package/dist/web/components/richTextView/index.js +0 -44
- package/dist/web/components/scrollView/index.d.ts +0 -27
- package/dist/web/components/scrollView/index.js +0 -95
- package/dist/web/components/share/index.d.ts +0 -34
- package/dist/web/components/share/index.js +0 -4
- package/dist/web/components/slot/index.d.ts +0 -6
- package/dist/web/components/slot/index.js +0 -9
- package/dist/web/components/swiper/index.d.ts +0 -24
- package/dist/web/components/swiper/index.js +0 -153
- package/dist/web/components/tabs/index.d.ts +0 -13
- package/dist/web/components/tabs/index.js +0 -15
- package/dist/web/components/tabs/tabs.h5.d.ts +0 -4
- package/dist/web/components/tabs/tabs.h5.js +0 -42
- package/dist/web/components/tabs/tabs.pc.d.ts +0 -3
- package/dist/web/components/tabs/tabs.pc.js +0 -40
- package/dist/web/components/text/index.d.ts +0 -14
- package/dist/web/components/text/index.js +0 -17
- package/dist/web/components/uploaderFileView/index.d.ts +0 -10
- package/dist/web/components/uploaderFileView/index.js +0 -61
- package/dist/web/components/uploaderView/index.d.ts +0 -17
- package/dist/web/components/uploaderView/index.js +0 -48
- package/dist/web/components/userInfo/index.d.ts +0 -26
- package/dist/web/components/userInfo/index.js +0 -4
- package/dist/web/components/wedaVideo/index.d.ts +0 -17
- package/dist/web/components/wedaVideo/index.js +0 -160
- package/dist/web/index.d.ts +0 -8
- package/dist/web/index.js +0 -4
- package/dist/web/utils/classnames.d.ts +0 -2
- package/dist/web/utils/classnames.js +0 -37
- package/dist/web/utils/constant.d.ts +0 -23
- package/dist/web/utils/constant.js +0 -24
- package/dist/web/utils/debounce.d.ts +0 -2
- package/dist/web/utils/debounce.js +0 -92
- package/dist/web/utils/getLocalCounter.d.ts +0 -1
- package/dist/web/utils/getLocalCounter.js +0 -4
- package/dist/web/utils/getUserService.d.ts +0 -17
- package/dist/web/utils/getUserService.js +0 -148
- package/dist/web/utils/isObjectEqual.d.ts +0 -2
- package/dist/web/utils/isObjectEqual.js +0 -12
- package/dist/web/utils/loading-fallback.d.ts +0 -2
- package/dist/web/utils/loading-fallback.js +0 -2
- package/dist/web/utils/lodash.d.ts +0 -1
- package/dist/web/utils/lodash.js +0 -2
- package/dist/web/utils/platform.d.ts +0 -18
- package/dist/web/utils/platform.js +0 -193
- package/dist/web/utils/tcb.d.ts +0 -27
- package/dist/web/utils/tcb.js +0 -105
- package/dist/web/utils/tmap.d.ts +0 -3
- package/dist/web/utils/tmap.js +0 -21
- package/dist/web/utils/use-cloud-id-temp-url.d.ts +0 -1
- package/dist/web/utils/use-cloud-id-temp-url.js +0 -13
- package/dist/web/utils/useSetState.d.ts +0 -1
- package/dist/web/utils/useSetState.js +0 -8
- package/dist/web/utils/useSyncValue.d.ts +0 -4
- package/dist/web/utils/useSyncValue.js +0 -15
- package/dist/web/utils/weui.d.ts +0 -1
- package/dist/web/utils/weui.js +0 -2
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export function getTMap(): any;
|
|
2
|
-
export function calculateDistance(latlng1: any, latlng2: any): number;
|
|
3
|
-
export const base64LocationIcon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODQiIGhlaWdodD0iODgiIHZpZXdCb3g9IjAgMCA4NCA4OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgb3BhY2l0eT0iMC45OCIgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZGRkXzI0NDdfNTc0OSkiPgo8Y2lyY2xlIGN4PSI0MiIgY3k9IjM2IiByPSIxMiIgZmlsbD0id2hpdGUiLz4KPC9nPgo8Y2lyY2xlIGN4PSI0MiIgY3k9IjM2IiByPSI3IiBmaWxsPSIjMDA1MkQ5Ii8+CjxkZWZzPgo8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RkZF8yNDQ3XzU3NDkiIHg9IjAiIHk9IjAiIHdpZHRoPSI4NCIgaGVpZ2h0PSI4OCIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPgo8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgo8ZmVDb2xvck1hdHJpeCBpbj0iU291cmNlQWxwaGEiIHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz4KPGZlT2Zmc2V0IGR5PSI4Ii8+CjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjUiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDggMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18yNDQ3XzU3NDkiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iMTYiLz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTIiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDQgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJlZmZlY3QyX2Ryb3BTaGFkb3dfMjQ0N181NzQ5Ii8+CjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPgo8ZmVPZmZzZXQgZHk9IjYiLz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTUiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDUgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iZWZmZWN0Ml9kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJlZmZlY3QzX2Ryb3BTaGFkb3dfMjQ0N181NzQ5Ii8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW49IlNvdXJjZUdyYXBoaWMiIGluMj0iZWZmZWN0M19kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPC9kZWZzPgo8L3N2Zz4K";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export function getTMap() {
|
|
2
|
-
const TMap = window === null || window === void 0 ? void 0 : window.TMap;
|
|
3
|
-
return TMap;
|
|
4
|
-
}
|
|
5
|
-
export function calculateDistance(latlng1, latlng2) {
|
|
6
|
-
let lat1 = latlng1.latitude;
|
|
7
|
-
let lng1 = latlng1.longitude;
|
|
8
|
-
let lat2 = latlng2.latitude;
|
|
9
|
-
let lng2 = latlng2.longitude;
|
|
10
|
-
var radLat1 = (lat1 * Math.PI) / 180.0;
|
|
11
|
-
var radLat2 = (lat2 * Math.PI) / 180.0;
|
|
12
|
-
var a = radLat1 - radLat2;
|
|
13
|
-
var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
|
|
14
|
-
var s = 2 *
|
|
15
|
-
Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
|
|
16
|
-
Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
|
|
17
|
-
s = s * 6378.137; // EARTH_RADIUS;
|
|
18
|
-
s = Math.round(s * 10000) / 10000;
|
|
19
|
-
return s * 1000;
|
|
20
|
-
}
|
|
21
|
-
export const base64LocationIcon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODQiIGhlaWdodD0iODgiIHZpZXdCb3g9IjAgMCA4NCA4OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgb3BhY2l0eT0iMC45OCIgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZGRkXzI0NDdfNTc0OSkiPgo8Y2lyY2xlIGN4PSI0MiIgY3k9IjM2IiByPSIxMiIgZmlsbD0id2hpdGUiLz4KPC9nPgo8Y2lyY2xlIGN4PSI0MiIgY3k9IjM2IiByPSI3IiBmaWxsPSIjMDA1MkQ5Ii8+CjxkZWZzPgo8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RkZF8yNDQ3XzU3NDkiIHg9IjAiIHk9IjAiIHdpZHRoPSI4NCIgaGVpZ2h0PSI4OCIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPgo8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgo8ZmVDb2xvck1hdHJpeCBpbj0iU291cmNlQWxwaGEiIHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz4KPGZlT2Zmc2V0IGR5PSI4Ii8+CjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjUiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDggMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18yNDQ3XzU3NDkiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iMTYiLz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTIiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDQgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJlZmZlY3QyX2Ryb3BTaGFkb3dfMjQ0N181NzQ5Ii8+CjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPgo8ZmVPZmZzZXQgZHk9IjYiLz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMTUiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMDUgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iZWZmZWN0Ml9kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJlZmZlY3QzX2Ryb3BTaGFkb3dfMjQ0N181NzQ5Ii8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW49IlNvdXJjZUdyYXBoaWMiIGluMj0iZWZmZWN0M19kcm9wU2hhZG93XzI0NDdfNTc0OSIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPC9kZWZzPgo8L3N2Zz4K';
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import * as ReactDOM from 'react-dom';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { forwardRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
4
|
-
import { Modal, Button, Text, ConfigProvider } from 'tea-component';
|
|
5
|
-
import { noop } from '../../utils/constant';
|
|
6
|
-
import './index.css';
|
|
7
|
-
const ModalShow = forwardRef(function ModalShow(props, ref) {
|
|
8
|
-
const [visible, setVisible] = useState(false);
|
|
9
|
-
// 渲染之后,马上显示
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
setVisible(true);
|
|
12
|
-
}, []);
|
|
13
|
-
// 实例 ref 到外部
|
|
14
|
-
useImperativeHandle(ref, () => ({ setVisible }));
|
|
15
|
-
return React.createElement(Modal, { ...props, visible: visible });
|
|
16
|
-
});
|
|
17
|
-
function show(options) {
|
|
18
|
-
const el = document.createElement('div');
|
|
19
|
-
const instanceRef = React.createRef();
|
|
20
|
-
ReactDOM.render(React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
|
|
21
|
-
React.createElement(ModalShow, { ...options, ref: instanceRef, onExited: () => ReactDOM.unmountComponentAtNode(el) })), el);
|
|
22
|
-
return {
|
|
23
|
-
destroy: () => {
|
|
24
|
-
if (instanceRef.current) {
|
|
25
|
-
instanceRef.current.setVisible(false);
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export default async function showModal({ data }) {
|
|
31
|
-
const { title, content, showCancel, cancelText = '取消', cancelColor, confirmText = '确定', confirmColor, success = noop, fail = noop, complete = noop, } = data;
|
|
32
|
-
return new Promise((resolve) => {
|
|
33
|
-
const base = { cancel: false, confirm: false, content: null };
|
|
34
|
-
const modal = show({
|
|
35
|
-
caption: title,
|
|
36
|
-
children: (React.createElement(React.Fragment, null,
|
|
37
|
-
React.createElement(Modal.Body, null, content),
|
|
38
|
-
React.createElement(Modal.Footer, null,
|
|
39
|
-
React.createElement(Button
|
|
40
|
-
// type="primary"
|
|
41
|
-
, {
|
|
42
|
-
// type="primary"
|
|
43
|
-
onClick: () => {
|
|
44
|
-
resolve({ ...base, confirm: true });
|
|
45
|
-
modal.destroy();
|
|
46
|
-
} },
|
|
47
|
-
React.createElement(Text, { style: { color: confirmColor } }, confirmText)),
|
|
48
|
-
showCancel && (React.createElement(Button, { onClick: () => {
|
|
49
|
-
resolve({ ...base, cancel: true });
|
|
50
|
-
modal.destroy();
|
|
51
|
-
} },
|
|
52
|
-
React.createElement(Text, { style: { color: cancelColor } }, cancelText)))))),
|
|
53
|
-
onClose: () => {
|
|
54
|
-
resolve({ ...base, cancel: true });
|
|
55
|
-
modal.destroy();
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
}).then((res) => {
|
|
59
|
-
success && success(res);
|
|
60
|
-
return res;
|
|
61
|
-
}, (e) => {
|
|
62
|
-
// console.log(e);
|
|
63
|
-
fail && fail();
|
|
64
|
-
complete && complete();
|
|
65
|
-
throw e;
|
|
66
|
-
});
|
|
67
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function showToast(): void;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { CommonPropsType } from '../../types';
|
|
3
|
-
import './index.css';
|
|
4
|
-
declare const Button: ({ text, size, type, contentSlot, formType, loading, disabled, events, className, style, id, }: PropsType) => JSX.Element;
|
|
5
|
-
export interface PropsType extends CommonPropsType {
|
|
6
|
-
/**
|
|
7
|
-
* 内容
|
|
8
|
-
*/
|
|
9
|
-
text?: string;
|
|
10
|
-
/**
|
|
11
|
-
* 样式类型
|
|
12
|
-
*/
|
|
13
|
-
type?: 'primary' | 'warn' | 'wechat' | 'default';
|
|
14
|
-
/**
|
|
15
|
-
* 大小
|
|
16
|
-
*/
|
|
17
|
-
size?: 'default' | 'mini' | 'large';
|
|
18
|
-
/**
|
|
19
|
-
* 是否禁用
|
|
20
|
-
*/
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* 加载中
|
|
24
|
-
*/
|
|
25
|
-
loading?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* 用于 form 类型
|
|
28
|
-
*/
|
|
29
|
-
formType?: 'button' | 'submit' | 'reset';
|
|
30
|
-
contentSlot?: string;
|
|
31
|
-
}
|
|
32
|
-
export default Button;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Button as TeaButton, ConfigProvider, } from 'tea-component';
|
|
3
|
-
import classNames from '../../utils/classnames';
|
|
4
|
-
import { usePlatform } from '../../utils/platform';
|
|
5
|
-
import './index.css';
|
|
6
|
-
import { emptyObject } from '../../utils/constant';
|
|
7
|
-
// 不用 react-weui 而直接用底层实现的原因是 react-weui 不能支持表单类型
|
|
8
|
-
const Button = ({ text, size, type, contentSlot, formType, loading, disabled, events = emptyObject, className, style, id, }) => {
|
|
9
|
-
const platform = usePlatform();
|
|
10
|
-
const isH5 = platform === 'h5';
|
|
11
|
-
const cls = classNames({
|
|
12
|
-
'weda-ui': true,
|
|
13
|
-
'weda-button': true,
|
|
14
|
-
'weda-button-large': size === 'large',
|
|
15
|
-
'weda-button-mini': size === 'mini',
|
|
16
|
-
'weui-btn': isH5,
|
|
17
|
-
'weui-btn_mini': isH5 && size === 'mini',
|
|
18
|
-
'weui-btn_primary': isH5 && (type === 'primary' || type === 'wechat'),
|
|
19
|
-
'weui-btn_default': isH5 && type === 'default',
|
|
20
|
-
'weui-btn_warn': isH5 && type === 'warn',
|
|
21
|
-
'weui-btn_wechat': isH5 && type === 'wechat',
|
|
22
|
-
'weui-btn_disabled': isH5 && disabled,
|
|
23
|
-
[className]: className,
|
|
24
|
-
});
|
|
25
|
-
const onClick = (e) => {
|
|
26
|
-
if (events.tap) {
|
|
27
|
-
events.tap({}, { originEvent: e });
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
if (platform === 'h5') {
|
|
31
|
-
return (React.createElement("button", { className: cls, disabled: disabled, type: formType, style: style, id: id, onClick: onClick },
|
|
32
|
-
loading && (React.createElement("span", { className: "weui-btn_loading" },
|
|
33
|
-
React.createElement("i", { className: "weui-loading" }))),
|
|
34
|
-
text ? text : contentSlot));
|
|
35
|
-
}
|
|
36
|
-
return (React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
|
|
37
|
-
React.createElement(TeaButton, { loading: loading, onClick: onClick, disabled: disabled, htmlType: formType, type: toTeaButtonType(type), style: style, className: cls, id: id }, text ? text : contentSlot)));
|
|
38
|
-
};
|
|
39
|
-
function toTeaButtonType(type) {
|
|
40
|
-
if (type === 'primary')
|
|
41
|
-
return type;
|
|
42
|
-
if (type === 'warn')
|
|
43
|
-
return 'error';
|
|
44
|
-
if (type === 'default')
|
|
45
|
-
return 'primary';
|
|
46
|
-
return 'primary';
|
|
47
|
-
}
|
|
48
|
-
export default Button;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
declare function Calendar({ className, style, initVisible, initValue, configData, }: {
|
|
2
|
-
className: any;
|
|
3
|
-
style: any;
|
|
4
|
-
initVisible: any;
|
|
5
|
-
initValue: any;
|
|
6
|
-
configData?: readonly [];
|
|
7
|
-
}): JSX.Element;
|
|
8
|
-
declare namespace Calendar {
|
|
9
|
-
namespace propTypes {
|
|
10
|
-
const className: PropTypes.Requireable<string>;
|
|
11
|
-
const style: PropTypes.Requireable<object>;
|
|
12
|
-
const initValue: PropTypes.Requireable<string>;
|
|
13
|
-
const platform: PropTypes.Requireable<string>;
|
|
14
|
-
const initVisible: PropTypes.Requireable<boolean>;
|
|
15
|
-
const configData: PropTypes.Requireable<any[]>;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export default Calendar;
|
|
19
|
-
import * as PropTypes from "prop-types";
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useMemo } from 'react';
|
|
2
|
-
import { usePlatform } from '../../utils/platform';
|
|
3
|
-
import { ConfigProvider, Select } from 'tea-component';
|
|
4
|
-
import * as PropTypes from 'prop-types';
|
|
5
|
-
import classNames from '../../utils/classnames';
|
|
6
|
-
import dayjs from 'dayjs';
|
|
7
|
-
import { createDateList } from './util';
|
|
8
|
-
import './index.css';
|
|
9
|
-
import { emptyArray } from '../../utils/constant';
|
|
10
|
-
// 抽取配置常量
|
|
11
|
-
const blockName = 'weda-calendar'; // 类名前缀
|
|
12
|
-
const minYear = 1970; // 最早选择年份
|
|
13
|
-
const firstDayOfWeek = 1; // 日历从周一开始
|
|
14
|
-
const format = 'YYYY-MM-DD';
|
|
15
|
-
const controlSectionSize = 'auto'; // 操作栏控件尺寸
|
|
16
|
-
const week = ['一', '二', '三', '四', '五', '六', '日']; // 表头日历星期展示方式
|
|
17
|
-
const isShowWeekend = true; // 是否显示周末
|
|
18
|
-
export default function Calendar({ className, style, initVisible, initValue, configData = emptyArray, }) {
|
|
19
|
-
// 'h5' || 'pc'
|
|
20
|
-
const platform = usePlatform();
|
|
21
|
-
const visible = typeof initVisible === 'boolean' ? initVisible : true;
|
|
22
|
-
// dayjs.Dayjs
|
|
23
|
-
const [value, setValue] = useState(dayjs());
|
|
24
|
-
// number
|
|
25
|
-
const [year, setYear] = useState(dayjs().year());
|
|
26
|
-
const [month, setMonth] = useState(parseInt(dayjs().format('M'), 10));
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (initValue !== null && initValue !== '') {
|
|
29
|
-
setValue(dayjs(initValue));
|
|
30
|
-
setYear(dayjs(initValue).year());
|
|
31
|
-
setMonth(parseInt(dayjs(initValue).format('M'), 10));
|
|
32
|
-
}
|
|
33
|
-
}, [initValue]);
|
|
34
|
-
// 年份、月份 Select 选择框选项
|
|
35
|
-
const [yearSelectList, monthSelectList] = useMemo(() => {
|
|
36
|
-
const yearList = [];
|
|
37
|
-
const monthList = [];
|
|
38
|
-
// 年列表
|
|
39
|
-
const yearBegin = Math.min(minYear, year - 50);
|
|
40
|
-
const yearEnd = Math.max(minYear, year + 50); // parseInt(dayjs().format('YYYY-MM-DD'));
|
|
41
|
-
for (let i = yearBegin; i <= yearEnd; i++) {
|
|
42
|
-
yearList.push({
|
|
43
|
-
value: i,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
// 月列表
|
|
47
|
-
for (let i = 1; i <= 12; i++) {
|
|
48
|
-
monthList.push({
|
|
49
|
-
value: i,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
return [yearList, monthList];
|
|
53
|
-
}, [year, month]);
|
|
54
|
-
// 匹配数据
|
|
55
|
-
const _dateList = (configList) => {
|
|
56
|
-
const _map = new Map();
|
|
57
|
-
const configArr = JSON.parse(JSON.stringify(configData));
|
|
58
|
-
// 补日期的零
|
|
59
|
-
configArr &&
|
|
60
|
-
configArr.length &&
|
|
61
|
-
configArr.map((item) => {
|
|
62
|
-
if (item.matchDate === '' || item.matchDate === undefined)
|
|
63
|
-
return;
|
|
64
|
-
const date = item.matchDate.split('-');
|
|
65
|
-
const day = date[2].split('');
|
|
66
|
-
if (day.length === 1) {
|
|
67
|
-
date[2] = `0${date[2]}`;
|
|
68
|
-
item.matchDate = date.join('-');
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
for (const item of configArr) {
|
|
72
|
-
_map.set(item.matchDate, item);
|
|
73
|
-
}
|
|
74
|
-
return configList.map((item) => {
|
|
75
|
-
return item.reduce((res, i) => {
|
|
76
|
-
if (_map.has(i.formattedDate)) {
|
|
77
|
-
const _disabled = _map.get(i.formattedDate)['disabled'];
|
|
78
|
-
const _marked = _map.get(i.formattedDate)['marked'];
|
|
79
|
-
i['disabled'] =
|
|
80
|
-
_disabled !== undefined ? JSON.parse(_disabled) : false;
|
|
81
|
-
i['marked'] = _marked;
|
|
82
|
-
}
|
|
83
|
-
res.push(i);
|
|
84
|
-
return res;
|
|
85
|
-
}, []);
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
// 日历单元格数据
|
|
89
|
-
const dateList = useMemo(() => _dateList(createDateList(year, month, firstDayOfWeek, value, format)), [year, month, firstDayOfWeek, format, value, configData]);
|
|
90
|
-
// 表头数组
|
|
91
|
-
const colHeaderList = useMemo(() => {
|
|
92
|
-
const weekTextArr = week;
|
|
93
|
-
const list = [];
|
|
94
|
-
for (let i = firstDayOfWeek; i <= 7; i++) {
|
|
95
|
-
if (!isShowWeekend && i > 5) {
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
list.push({
|
|
99
|
-
day: i,
|
|
100
|
-
text: weekTextArr[i - 1],
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
if (firstDayOfWeek > 1) {
|
|
104
|
-
for (let i = 1; i < firstDayOfWeek; i++) {
|
|
105
|
-
if (!isShowWeekend && i > 5) {
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
list.push({
|
|
109
|
-
day: i,
|
|
110
|
-
text: weekTextArr[i - 1],
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return list;
|
|
115
|
-
}, [firstDayOfWeek, isShowWeekend, week]);
|
|
116
|
-
// 补零
|
|
117
|
-
// const fix0 = (num) => {
|
|
118
|
-
// return num < 10 ? `0${num}` : num;
|
|
119
|
-
// };
|
|
120
|
-
const yearSelectOptions = () => {
|
|
121
|
-
return yearSelectList.map((item) => ({
|
|
122
|
-
text: `${item.value} 年`,
|
|
123
|
-
value: `${item.value}`,
|
|
124
|
-
}));
|
|
125
|
-
};
|
|
126
|
-
const monthSelectOptions = () => {
|
|
127
|
-
return monthSelectList.map((item) => ({
|
|
128
|
-
text: `${item.value} 月`,
|
|
129
|
-
value: `${item.value}`,
|
|
130
|
-
}));
|
|
131
|
-
};
|
|
132
|
-
return (React.createElement("div", { "data-testid": "weda-calendar", className: classNames(blockName, 'weda-ui', platform === 'h5' ? `${blockName}-h5` : `${blockName}-pc`, {
|
|
133
|
-
[className]: className,
|
|
134
|
-
}), style: style },
|
|
135
|
-
React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
|
|
136
|
-
React.createElement("div", { className: blockName + '__control_pc', "data-testid": "weda-calendar-control-pc" }, visible ? (React.createElement("div", { className: blockName + '__control-section' },
|
|
137
|
-
React.createElement("div", { className: blockName + '__control-section-cell' },
|
|
138
|
-
React.createElement(Select, { appearance: "button", size: controlSectionSize, value: String(year), options: yearSelectOptions(), onChange: (selectYear) => setYear(parseInt(selectYear)) })),
|
|
139
|
-
React.createElement("div", { className: blockName + '__control-section-cell' },
|
|
140
|
-
React.createElement(Select, { appearance: "button", size: controlSectionSize, value: String(month), options: monthSelectOptions(), onChange: (selectMonth) => setMonth(parseInt(selectMonth)) })))) : (React.createElement("div", { className: `${blockName}__current-date` },
|
|
141
|
-
year,
|
|
142
|
-
" \u5E74 ",
|
|
143
|
-
month,
|
|
144
|
-
" \u6708")))),
|
|
145
|
-
React.createElement("div", { className: blockName + '__control_h5', "data-testid": "weda-calendar-control-h5" },
|
|
146
|
-
visible && (React.createElement("div", { className: blockName + '_prevMonth wedatea2td-icon-arrowleft--line', onClick: () => {
|
|
147
|
-
// 上一个月
|
|
148
|
-
setYear(month === 1 ? year - 1 : year);
|
|
149
|
-
setMonth(month === 1 ? 12 : month - 1);
|
|
150
|
-
} })),
|
|
151
|
-
React.createElement("div", { className: `${blockName}__current-date` },
|
|
152
|
-
year,
|
|
153
|
-
"\u5E74",
|
|
154
|
-
month,
|
|
155
|
-
"\u6708"),
|
|
156
|
-
visible && (React.createElement("div", { className: blockName + '_nextMonth wedatea2td-icon-arrowright--line', onClick: () => {
|
|
157
|
-
// 下一个月
|
|
158
|
-
setYear(month === 12 ? year + 1 : year);
|
|
159
|
-
setMonth(month === 12 ? 1 : month + 1);
|
|
160
|
-
} }))),
|
|
161
|
-
React.createElement("div", { className: blockName + '__panel' },
|
|
162
|
-
React.createElement("table", { className: blockName + '__table' },
|
|
163
|
-
colHeaderList.length > 0 && (React.createElement("thead", { className: blockName + '__table-head' },
|
|
164
|
-
React.createElement("tr", { className: blockName + '__table-head-row' }, colHeaderList.map((item) => (React.createElement("th", { key: item.day, className: blockName + '__table-head-cell' }, item.text)))))),
|
|
165
|
-
React.createElement("tbody", { className: blockName + '__table-body' }, dateList.map((dateRow, dateRowIndex) => (React.createElement("tr", { key: String(dateRowIndex), className: blockName + '__table-body-row' }, dateRow.map((dateCell, dateCellIndex) => {
|
|
166
|
-
if (!isShowWeekend && [6, 7].indexOf(dateCell.day) >= 0)
|
|
167
|
-
return null;
|
|
168
|
-
const isNow = (dateCell.formattedDate === dayjs().format('YYYY-MM-DD') &&
|
|
169
|
-
'is-now') ||
|
|
170
|
-
'';
|
|
171
|
-
return (React.createElement("td", { key: String(dateCellIndex), className: classNames(`${blockName}__table-body-cell`, isNow, dateCell.isCurrent ? 'is-checked' : '', dateCell.belongTo !== 0 ? 'is-disabled' : '', dateCell.disabled ? 'is-invalid' : '') },
|
|
172
|
-
React.createElement("div", { className: blockName + '__table-body-cell-value' },
|
|
173
|
-
dateCell.date.getDate(),
|
|
174
|
-
React.createElement("div", { className: `${blockName}__table-body-cell-bg` }),
|
|
175
|
-
dateCell.marked && dateCell.marked !== '' && (React.createElement("div", { style: { backgroundColor: `${dateCell.marked}` }, className: blockName + '__table-body-cell-marked', "data-testid": "weda-calendar-cell-marked" })))));
|
|
176
|
-
})))))))));
|
|
177
|
-
}
|
|
178
|
-
Calendar.propTypes = {
|
|
179
|
-
className: PropTypes.string,
|
|
180
|
-
style: PropTypes.object,
|
|
181
|
-
/** 传入日期 '2021-01-01' */
|
|
182
|
-
initValue: PropTypes.string,
|
|
183
|
-
/** 平台 'h5' || 'pc'*/
|
|
184
|
-
platform: PropTypes.string,
|
|
185
|
-
/** 时间控制器 */
|
|
186
|
-
initVisible: PropTypes.bool,
|
|
187
|
-
/** 展示配置 */
|
|
188
|
-
configData: PropTypes.array,
|
|
189
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export function getDay(dt: any): number;
|
|
2
|
-
export function createDateList(year: any, month: any, firstDayOfWeek: any, currentValue: any, format: any): {
|
|
3
|
-
mode: string;
|
|
4
|
-
belongTo: any;
|
|
5
|
-
isCurrent: any;
|
|
6
|
-
day: number;
|
|
7
|
-
weekOrder: any;
|
|
8
|
-
date: any;
|
|
9
|
-
formattedDate: string;
|
|
10
|
-
filterDate: any;
|
|
11
|
-
formattedFilterDate: any;
|
|
12
|
-
isShowWeekend: boolean;
|
|
13
|
-
}[][];
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
/**
|
|
3
|
-
* 获取一个日期是周几(1~7)
|
|
4
|
-
*/
|
|
5
|
-
export const getDay = (dt) => {
|
|
6
|
-
let day = dayjs(dt).day();
|
|
7
|
-
if (day === 0) {
|
|
8
|
-
day = 7;
|
|
9
|
-
}
|
|
10
|
-
return day;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* 创建日历单元格数据
|
|
14
|
-
* @param year 日历年份
|
|
15
|
-
* @param month 日历月份
|
|
16
|
-
* @param firstDayOfWeek 周起始日(1~7)
|
|
17
|
-
* @param currentValue 当前日期
|
|
18
|
-
* @param format 日期格式
|
|
19
|
-
*/
|
|
20
|
-
export const createDateList = (year, month, firstDayOfWeek, currentValue, format) => {
|
|
21
|
-
const createCellData = (belongTo, isCurrent, date, weekOrder) => {
|
|
22
|
-
const day = getDay(date);
|
|
23
|
-
return {
|
|
24
|
-
mode: 'month',
|
|
25
|
-
belongTo,
|
|
26
|
-
isCurrent,
|
|
27
|
-
day,
|
|
28
|
-
weekOrder,
|
|
29
|
-
date,
|
|
30
|
-
formattedDate: dayjs(date).format(format),
|
|
31
|
-
filterDate: null,
|
|
32
|
-
formattedFilterDate: null,
|
|
33
|
-
isShowWeekend: true,
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
const monthFirstDay = dayjs(`${year}-${month}`);
|
|
37
|
-
const rowList = [];
|
|
38
|
-
let list = [];
|
|
39
|
-
let weekCount = 1;
|
|
40
|
-
// 添加上个月中会在本月显示的最后几天日期
|
|
41
|
-
// getDay(monthFirstDay.toDate()) 获取每月第一天是周几
|
|
42
|
-
const lastMonthDaysCount = (getDay(monthFirstDay.toDate()) - firstDayOfWeek + 7) % 7;
|
|
43
|
-
for (let i = 0; i < lastMonthDaysCount; i++) {
|
|
44
|
-
// 获取显示在当前月的日历中,上月日期数据
|
|
45
|
-
// monthFirstDay.subtract(num, 'day' | 'month' | 'year') 表示以当月第一天日期为基准,在 日|月|年 数字上减去num
|
|
46
|
-
const dayObj = monthFirstDay.subtract(i + 1, 'day');
|
|
47
|
-
list.unshift(createCellData(-1, false, dayObj.toDate(), weekCount));
|
|
48
|
-
}
|
|
49
|
-
// 添加本月日期
|
|
50
|
-
// 获取本月最后一天是几号
|
|
51
|
-
const monthDaysCount = monthFirstDay.endOf('month').daysInMonth();
|
|
52
|
-
for (let i = 0; i < monthDaysCount; i++) {
|
|
53
|
-
const dayObj = monthFirstDay.add(i, 'day');
|
|
54
|
-
list.push(createCellData(0, currentValue.isSame(dayObj), dayObj.toDate(), weekCount));
|
|
55
|
-
if (list.length === 7) {
|
|
56
|
-
rowList.push(list);
|
|
57
|
-
list = [];
|
|
58
|
-
weekCount += 1;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
// 添加下月日期
|
|
62
|
-
if (list.length) {
|
|
63
|
-
// 获取当月最后一天
|
|
64
|
-
const monthLastDay = dayjs(`${year}-${month}`).endOf('month');
|
|
65
|
-
// 获取下月在当月日历中的天数
|
|
66
|
-
const nextMonthDaysCount = 7 - list.length;
|
|
67
|
-
for (let i = 0; i < nextMonthDaysCount; i++) {
|
|
68
|
-
const dayObj = monthLastDay.add(i + 1, 'day');
|
|
69
|
-
list.push(createCellData(1, false, dayObj.toDate(), weekCount));
|
|
70
|
-
}
|
|
71
|
-
rowList.push(list);
|
|
72
|
-
}
|
|
73
|
-
return rowList;
|
|
74
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import './index.css';
|
|
3
|
-
import type { CommonPropsType } from '../../types';
|
|
4
|
-
interface imagesItem {
|
|
5
|
-
image: string;
|
|
6
|
-
title: string;
|
|
7
|
-
tapMode: 'tap' | 'inside' | 'outer';
|
|
8
|
-
fit: React.CSSProperties['objectFit'];
|
|
9
|
-
height: string;
|
|
10
|
-
width: string;
|
|
11
|
-
insideUrl?: string;
|
|
12
|
-
outerUrl?: string;
|
|
13
|
-
newPage?: boolean;
|
|
14
|
-
params?: {
|
|
15
|
-
key: string;
|
|
16
|
-
value: string;
|
|
17
|
-
}[];
|
|
18
|
-
}
|
|
19
|
-
export interface PropsType extends CommonPropsType {
|
|
20
|
-
/**
|
|
21
|
-
* 是否启用指示点
|
|
22
|
-
*/
|
|
23
|
-
indicatorDots: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* 是否自动切换
|
|
26
|
-
*/
|
|
27
|
-
autoplay: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* 当前索引值
|
|
30
|
-
*/
|
|
31
|
-
current: number;
|
|
32
|
-
interval: number;
|
|
33
|
-
duration: number;
|
|
34
|
-
circular: boolean;
|
|
35
|
-
vertical: boolean;
|
|
36
|
-
indicatorColor: string;
|
|
37
|
-
indicatorActiveColor: string;
|
|
38
|
-
images: Array<imagesItem>;
|
|
39
|
-
}
|
|
40
|
-
export default function Carousel({ className, style, autoplay, circular, vertical, indicatorDots, indicatorColor, indicatorActiveColor, duration, interval, current, events, id, images, }: PropsType): JSX.Element;
|
|
41
|
-
export {};
|