@cloudbase/weda-ui 2.0.26 → 3.1.0
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/package.json +12 -13
- package/src/configs/actions/showModal.json +0 -48
- package/src/configs/actions/showToast.json +0 -41
- package/src/configs/components/auth.json +0 -16
- package/src/configs/components/button.json +0 -239
- package/src/configs/components/calendar.json +0 -81
- package/src/configs/components/carousel.json +0 -292
- package/src/configs/components/chart/bar.json +0 -721
- package/src/configs/components/chart/line.json +0 -674
- package/src/configs/components/chart/pie.json +0 -494
- package/src/configs/components/chart/statisticsCard.json +0 -376
- package/src/configs/components/container.json +0 -50
- package/src/configs/components/dataView.json +0 -151
- package/src/configs/components/drawer.json +0 -115
- package/src/configs/components/form/checkbox.json +0 -173
- package/src/configs/components/form/form.json +0 -45
- package/src/configs/components/form/input.json +0 -154
- package/src/configs/components/form/label.json +0 -22
- package/src/configs/components/form/location.json +0 -155
- package/src/configs/components/form/radio.json +0 -203
- package/src/configs/components/form/richText.json +0 -125
- package/src/configs/components/form/select.json +0 -411
- package/src/configs/components/form/switch.json +0 -58
- package/src/configs/components/form/textarea.json +0 -116
- package/src/configs/components/form/tips.json +0 -34
- package/src/configs/components/form/uploader.json +0 -169
- package/src/configs/components/form/uploaderFile.json +0 -158
- package/src/configs/components/graphicCard.json +0 -413
- package/src/configs/components/image.json +0 -179
- package/src/configs/components/link.json +0 -79
- package/src/configs/components/listView.json +0 -281
- package/src/configs/components/lottery.json +0 -157
- package/src/configs/components/modal.json +0 -83
- package/src/configs/components/navLayout.json +0 -368
- package/src/configs/components/navigationBar.json +0 -62
- package/src/configs/components/picker/datePicker.json +0 -33
- package/src/configs/components/picker/picker.json +0 -18
- package/src/configs/components/picker/timePicker.json +0 -23
- package/src/configs/components/richtextview.json +0 -26
- package/src/configs/components/scrollVeiw.json +0 -253
- package/src/configs/components/slot.json +0 -17
- package/src/configs/components/swiper.json +0 -90
- package/src/configs/components/tabs.json +0 -121
- package/src/configs/components/text.json +0 -95
- package/src/configs/components/wedaVideo.json +0 -89
- package/src/configs/components/wxOpenApi/phone.json +0 -127
- package/src/configs/components/wxOpenApi/phoneCode.json +0 -109
- package/src/configs/components/wxOpenApi/share.json +0 -157
- package/src/configs/components/wxOpenApi/userInfo.json +0 -156
- package/src/configs/index.js +0 -111
- package/src/index.js +0 -4
- package/src/mp/README.md +0 -1
- package/src/mp/actions/showModal/index.js +0 -3
- package/src/mp/actions/showToast/index.js +0 -3
- package/src/mp/components/button/index.js +0 -91
- package/src/mp/components/button/index.json +0 -4
- package/src/mp/components/button/index.wxml +0 -22
- package/src/mp/components/button/index.wxss +0 -13
- package/src/mp/components/calendar/arrowright--line.svg +0 -11
- package/src/mp/components/calendar/index.js +0 -268
- package/src/mp/components/calendar/index.json +0 -5
- package/src/mp/components/calendar/index.wxml +0 -35
- package/src/mp/components/calendar/index.wxss +0 -179
- package/src/mp/components/carousel/index.js +0 -88
- package/src/mp/components/carousel/index.json +0 -7
- package/src/mp/components/carousel/index.wxml +0 -6
- package/src/mp/components/chart/bar/index.js +0 -257
- package/src/mp/components/chart/bar/index.json +0 -6
- package/src/mp/components/chart/bar/index.wxml +0 -3
- package/src/mp/components/chart/bar/index.wxss +0 -9
- package/src/mp/components/chart/common/config/bar.js +0 -50
- package/src/mp/components/chart/common/config/global.js +0 -16
- package/src/mp/components/chart/common/config/line.js +0 -48
- package/src/mp/components/chart/common/config/pie.js +0 -36
- package/src/mp/components/chart/common/core/eChartBar.js +0 -258
- package/src/mp/components/chart/common/core/eChartBase.js +0 -389
- package/src/mp/components/chart/common/core/eChartLine.js +0 -223
- package/src/mp/components/chart/common/core/eChartPie.js +0 -169
- package/src/mp/components/chart/common/lib/echarts.min.js +0 -18
- package/src/mp/components/chart/ec-canvas/ec-canvas.js +0 -277
- package/src/mp/components/chart/ec-canvas/ec-canvas.json +0 -4
- package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +0 -4
- package/src/mp/components/chart/ec-canvas/ec-canvas.wxss +0 -4
- package/src/mp/components/chart/ec-canvas/wx-canvas.js +0 -109
- package/src/mp/components/chart/line/index.js +0 -247
- package/src/mp/components/chart/line/index.json +0 -6
- package/src/mp/components/chart/line/index.wxml +0 -3
- package/src/mp/components/chart/line/index.wxss +0 -9
- package/src/mp/components/chart/pie/index.js +0 -182
- package/src/mp/components/chart/pie/index.json +0 -6
- package/src/mp/components/chart/pie/index.wxml +0 -3
- package/src/mp/components/chart/pie/index.wxss +0 -9
- package/src/mp/components/chart/statisticsCard/index.js +0 -253
- package/src/mp/components/chart/statisticsCard/index.json +0 -4
- package/src/mp/components/chart/statisticsCard/index.wxml +0 -9
- package/src/mp/components/chart/statisticsCard/index.wxss +0 -42
- package/src/mp/components/container/index.js +0 -20
- package/src/mp/components/container/index.json +0 -4
- package/src/mp/components/container/index.wxml +0 -3
- package/src/mp/components/dataView/index.js +0 -34
- package/src/mp/components/dataView/index.json +0 -7
- package/src/mp/components/dataView/index.wxml +0 -3
- package/src/mp/components/dataView/index.wxss +0 -0
- package/src/mp/components/form/checkbox/index.js +0 -124
- package/src/mp/components/form/checkbox/index.json +0 -7
- package/src/mp/components/form/checkbox/index.wxml +0 -13
- package/src/mp/components/form/checkbox/index.wxss +0 -1
- package/src/mp/components/form/form/index.js +0 -18
- package/src/mp/components/form/form/index.json +0 -4
- package/src/mp/components/form/form/index.wxml +0 -5
- package/src/mp/components/form/form/index.wxss +0 -1
- package/src/mp/components/form/formcell/index.js +0 -54
- package/src/mp/components/form/formcell/index.json +0 -4
- package/src/mp/components/form/formcell/index.wxml +0 -11
- package/src/mp/components/form/formcell/index.wxss +0 -31
- package/src/mp/components/form/input/index.js +0 -110
- package/src/mp/components/form/input/index.json +0 -7
- package/src/mp/components/form/input/index.wxml +0 -24
- package/src/mp/components/form/input/index.wxss +0 -22
- package/src/mp/components/form/location/components/mapChoose/index.js +0 -201
- package/src/mp/components/form/location/components/mapChoose/index.json +0 -4
- package/src/mp/components/form/location/components/mapChoose/index.wxml +0 -42
- package/src/mp/components/form/location/components/mapChoose/index.wxss +0 -188
- package/src/mp/components/form/location/index.js +0 -388
- package/src/mp/components/form/location/index.json +0 -6
- package/src/mp/components/form/location/index.wxml +0 -21
- package/src/mp/components/form/location/index.wxss +0 -89
- package/src/mp/components/form/radio/index.js +0 -124
- package/src/mp/components/form/radio/index.json +0 -7
- package/src/mp/components/form/radio/index.wxml +0 -13
- package/src/mp/components/form/radio/index.wxss +0 -1
- package/src/mp/components/form/select/index.js +0 -677
- package/src/mp/components/form/select/index.json +0 -7
- package/src/mp/components/form/select/index.wxml +0 -12
- package/src/mp/components/form/select/index.wxss +0 -16
- package/src/mp/components/form/select/region/index.js +0 -107
- package/src/mp/components/form/switch/index.js +0 -75
- package/src/mp/components/form/switch/index.json +0 -7
- package/src/mp/components/form/switch/index.wxml +0 -11
- package/src/mp/components/form/switch/index.wxss +0 -1
- package/src/mp/components/form/textarea/index.js +0 -90
- package/src/mp/components/form/textarea/index.json +0 -7
- package/src/mp/components/form/textarea/index.wxml +0 -8
- package/src/mp/components/form/textarea/index.wxss +0 -10
- package/src/mp/components/form/tips/index.js +0 -41
- package/src/mp/components/form/tips/index.json +0 -4
- package/src/mp/components/form/tips/index.wxml +0 -1
- package/src/mp/components/form/tips/index.wxss +0 -1
- package/src/mp/components/form/uploader/index.js +0 -158
- package/src/mp/components/form/uploader/index.json +0 -10
- package/src/mp/components/form/uploader/index.wxml +0 -14
- package/src/mp/components/form/uploader/index.wxss +0 -36
- package/src/mp/components/form/uploader/weui-uploader.js +0 -219
- package/src/mp/components/form/uploader/weui-uploader.json +0 -7
- package/src/mp/components/form/uploader/weui-uploader.wxml +0 -45
- package/src/mp/components/form/uploader/weui-uploader.wxss +0 -1
- package/src/mp/components/form/uploaderFile/index.js +0 -313
- package/src/mp/components/form/uploaderFile/index.json +0 -9
- package/src/mp/components/form/uploaderFile/index.wxml +0 -45
- package/src/mp/components/form/uploaderFile/index.wxss +0 -105
- package/src/mp/components/graphicCard/chevron-right.svg +0 -3
- package/src/mp/components/graphicCard/index.js +0 -203
- package/src/mp/components/graphicCard/index.json +0 -4
- package/src/mp/components/graphicCard/index.wxml +0 -25
- package/src/mp/components/graphicCard/index.wxss +0 -157
- package/src/mp/components/image/index.js +0 -182
- package/src/mp/components/image/index.json +0 -7
- package/src/mp/components/image/index.wxml +0 -9
- package/src/mp/components/image/index.wxss +0 -49
- package/src/mp/components/listView/arrow-right-line.svg +0 -3
- package/src/mp/components/listView/index.js +0 -274
- package/src/mp/components/listView/index.json +0 -4
- package/src/mp/components/listView/index.wxml +0 -38
- package/src/mp/components/listView/index.wxss +0 -155
- package/src/mp/components/listView/more-line.svg +0 -3
- package/src/mp/components/lottery/index.js +0 -270
- package/src/mp/components/lottery/index.json +0 -4
- package/src/mp/components/lottery/index.wxml +0 -41
- package/src/mp/components/lottery/index.wxss +0 -323
- package/src/mp/components/modal/index.js +0 -39
- package/src/mp/components/modal/index.json +0 -4
- package/src/mp/components/modal/index.wxml +0 -1
- package/src/mp/components/navLayout/index.js +0 -120
- package/src/mp/components/navLayout/index.json +0 -7
- package/src/mp/components/navLayout/index.wxml +0 -23
- package/src/mp/components/navLayout/index.wxss +0 -1193
- package/src/mp/components/navigationBar/index.js +0 -193
- package/src/mp/components/navigationBar/index.json +0 -5
- package/src/mp/components/navigationBar/index.wxml +0 -80
- package/src/mp/components/navigationBar/index.wxss +0 -1257
- package/src/mp/components/richText/index.js +0 -67
- package/src/mp/components/richText/index.json +0 -4
- package/src/mp/components/richText/index.wxml +0 -3
- package/src/mp/components/richText/index.wxss +0 -27
- package/src/mp/components/scrollView/index.js +0 -119
- package/src/mp/components/scrollView/index.json +0 -4
- package/src/mp/components/scrollView/index.wxml +0 -38
- package/src/mp/components/slot/index.js +0 -20
- package/src/mp/components/slot/index.json +0 -4
- package/src/mp/components/slot/index.wxml +0 -3
- package/src/mp/components/swiper/index.js +0 -65
- package/src/mp/components/swiper/index.json +0 -4
- package/src/mp/components/swiper/index.wxml +0 -3
- package/src/mp/components/tabs/index.js +0 -59
- package/src/mp/components/tabs/index.json +0 -4
- package/src/mp/components/tabs/index.wxml +0 -12
- package/src/mp/components/tabs/index.wxss +0 -57
- package/src/mp/components/text/index.js +0 -40
- package/src/mp/components/text/index.json +0 -4
- package/src/mp/components/text/index.wxml +0 -1
- package/src/mp/components/text/index.wxss +0 -26
- package/src/mp/components/wedaVideo/index.js +0 -86
- package/src/mp/components/wedaVideo/index.json +0 -4
- package/src/mp/components/wedaVideo/index.wxml +0 -4
- package/src/mp/components/wedaVideo/index.wxss +0 -20
- package/src/mp/components/wxOpenApi/phone/index.js +0 -109
- package/src/mp/components/wxOpenApi/phone/index.json +0 -4
- package/src/mp/components/wxOpenApi/phone/index.wxml +0 -4
- package/src/mp/components/wxOpenApi/phone/index.wxss +0 -22
- package/src/mp/components/wxOpenApi/phoneCode/index.js +0 -89
- package/src/mp/components/wxOpenApi/phoneCode/index.json +0 -4
- package/src/mp/components/wxOpenApi/phoneCode/index.wxml +0 -4
- package/src/mp/components/wxOpenApi/phoneCode/index.wxss +0 -22
- package/src/mp/components/wxOpenApi/share/index.js +0 -117
- package/src/mp/components/wxOpenApi/share/index.json +0 -4
- package/src/mp/components/wxOpenApi/share/index.wxml +0 -4
- package/src/mp/components/wxOpenApi/share/index.wxss +0 -22
- package/src/mp/components/wxOpenApi/userInfo/index.js +0 -88
- package/src/mp/components/wxOpenApi/userInfo/index.json +0 -4
- package/src/mp/components/wxOpenApi/userInfo/index.wxml +0 -4
- package/src/mp/components/wxOpenApi/userInfo/index.wxss +0 -22
- package/src/mp/index.json +0 -52
- package/src/mp/package.json +0 -6
- package/src/mp/style/weda-ui.wxss +0 -71
- package/src/mp/utils/classnames.js +0 -39
- package/src/mp/utils/constant.js +0 -20
- package/src/mp/utils/dayjs.min.js +0 -1
- package/src/mp/utils/debounce.js +0 -133
- package/src/mp/utils/deepEqual.js +0 -42
- package/src/mp/utils/destr.js +0 -49
- package/src/mp/utils/dr_square_point.js +0 -29
- package/src/mp/utils/handleEvents.js +0 -32
- package/src/mp/utils/lodash.js +0 -2
- package/src/mp/utils/platform.js +0 -45
- package/src/mp/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +0 -1336
- package/src/mp/utils/spark-md5.js +0 -776
- package/src/mp/utils/tcb.js +0 -76
- package/src/setupTests.js +0 -14
- package/src/web/actions/index.js +0 -2
- package/src/web/actions/showModal/index.tsx +0 -118
- package/src/web/actions/showToast/index.js +0 -3
- package/src/web/components/auth/index.css +0 -0
- package/src/web/components/auth/index.js +0 -66
- package/src/web/components/button/index.css +0 -27
- package/src/web/components/button/index.tsx +0 -119
- package/src/web/components/calendar/index.css +0 -416
- package/src/web/components/calendar/index.jsx +0 -312
- package/src/web/components/calendar/util.js +0 -90
- package/src/web/components/carousel/index.css +0 -119
- package/src/web/components/carousel/index.tsx +0 -417
- package/src/web/components/chart/bar/index.tsx +0 -140
- package/src/web/components/chart/common/config/bar.js +0 -49
- package/src/web/components/chart/common/config/global.js +0 -16
- package/src/web/components/chart/common/config/line.js +0 -50
- package/src/web/components/chart/common/config/pie.js +0 -37
- package/src/web/components/chart/common/core/eChartBar.js +0 -259
- package/src/web/components/chart/common/core/eChartBase.ts +0 -396
- package/src/web/components/chart/common/core/eChartLine.js +0 -225
- package/src/web/components/chart/common/core/eChartPie.js +0 -173
- package/src/web/components/chart/common/core/type.ts +0 -34
- package/src/web/components/chart/common/echart.css +0 -106
- package/src/web/components/chart/common/echarts.ts +0 -31
- package/src/web/components/chart/common/useChart.tsx +0 -87
- package/src/web/components/chart/line/index.tsx +0 -136
- package/src/web/components/chart/pie/index.tsx +0 -99
- package/src/web/components/chart/statisticsCard/index.css +0 -63
- package/src/web/components/chart/statisticsCard/index.tsx +0 -307
- package/src/web/components/chart/statisticsCard/interface.ts +0 -14
- package/src/web/components/container/index.tsx +0 -34
- package/src/web/components/dataView/index.tsx +0 -20
- package/src/web/components/dataView/interface.ts +0 -6
- package/src/web/components/drawer/index.tsx +0 -68
- package/src/web/components/form/checkbox/index.tsx +0 -210
- package/src/web/components/form/enumSelect/MultipleSelect.jsx +0 -89
- package/src/web/components/form/enumSelect/NormalSelect.tsx +0 -92
- package/src/web/components/form/enumSelect/SelectContainer.jsx +0 -43
- package/src/web/components/form/enumSelect/index.jsx +0 -9
- package/src/web/components/form/enumSelect/props/defaultProps.js +0 -39
- package/src/web/components/form/enumSelect/props/propsTypes.js +0 -50
- package/src/web/components/form/form/index.css +0 -9
- package/src/web/components/form/form/index.tsx +0 -51
- package/src/web/components/form/formcell/index.css +0 -85
- package/src/web/components/form/formcell/index.tsx +0 -85
- package/src/web/components/form/input/index.css +0 -40
- package/src/web/components/form/input/index.tsx +0 -166
- package/src/web/components/form/location/common/mapChoose.css +0 -180
- package/src/web/components/form/location/common/mapChoose.jsx +0 -343
- package/src/web/components/form/location/common/mapView.jsx +0 -190
- package/src/web/components/form/location/common/propsConfig.js +0 -54
- package/src/web/components/form/location/common/selectModal.css +0 -44
- package/src/web/components/form/location/common/selectModal.jsx +0 -73
- package/src/web/components/form/location/common/useLocationInfo.js +0 -104
- package/src/web/components/form/location/components/LocationH5/index.css +0 -239
- package/src/web/components/form/location/components/LocationH5/location.h5.jsx +0 -413
- package/src/web/components/form/location/components/LocationPC/Header.jsx +0 -96
- package/src/web/components/form/location/components/LocationPC/index.css +0 -44
- package/src/web/components/form/location/components/LocationPC/location.PC.jsx +0 -332
- package/src/web/components/form/location/constants.js +0 -4
- package/src/web/components/form/location/index.css +0 -0
- package/src/web/components/form/location/index.jsx +0 -25
- package/src/web/components/form/radio/index.css +0 -12
- package/src/web/components/form/radio/index.tsx +0 -179
- package/src/web/components/form/renderDecorator.tsx +0 -28
- package/src/web/components/form/select/h5.tsx +0 -602
- package/src/web/components/form/select/index.css +0 -27
- package/src/web/components/form/select/index.tsx +0 -510
- package/src/web/components/form/select/region/index.ts +0 -152
- package/src/web/components/form/select/time.jsx +0 -145
- package/src/web/components/form/select/year.tsx +0 -172
- package/src/web/components/form/switch/index.tsx +0 -100
- package/src/web/components/form/textarea/index.css +0 -11
- package/src/web/components/form/textarea/index.tsx +0 -127
- package/src/web/components/form/tips/index.css +0 -4
- package/src/web/components/form/tips/index.tsx +0 -34
- package/src/web/components/form/types.d.ts +0 -12
- package/src/web/components/form/uploader/index.css +0 -118
- package/src/web/components/form/uploader/index.tsx +0 -65
- package/src/web/components/form/uploader/uploader.h5.tsx +0 -290
- package/src/web/components/form/uploader/uploader.pc.tsx +0 -287
- package/src/web/components/form/uploaderFile/fail.svg +0 -12
- package/src/web/components/form/uploaderFile/index.css +0 -422
- package/src/web/components/form/uploaderFile/index.jsx +0 -25
- package/src/web/components/form/uploaderFile/pending.svg +0 -18
- package/src/web/components/form/uploaderFile/success.svg +0 -12
- package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +0 -606
- package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +0 -520
- package/src/web/components/graphicCard/index.css +0 -159
- package/src/web/components/graphicCard/index.tsx +0 -310
- package/src/web/components/image/image.tsx +0 -187
- package/src/web/components/image/index.css +0 -54
- package/src/web/components/image/index.tsx +0 -121
- package/src/web/components/index.js +0 -95
- package/src/web/components/link/index.css +0 -8
- package/src/web/components/link/index.tsx +0 -119
- package/src/web/components/listView/arrow-right-line.svg +0 -3
- package/src/web/components/listView/index.css +0 -143
- package/src/web/components/listView/index.tsx +0 -346
- package/src/web/components/listView/interface.ts +0 -98
- package/src/web/components/lottery/index.css +0 -333
- package/src/web/components/lottery/index.tsx +0 -567
- package/src/web/components/lottery/lotteryUtil.ts +0 -130
- package/src/web/components/modal/index.tsx +0 -60
- package/src/web/components/navLayout/index.css +0 -332
- package/src/web/components/navLayout/index.tsx +0 -247
- package/src/web/components/navigationBar/chevron-right--double.svg +0 -3
- package/src/web/components/navigationBar/common.tsx +0 -198
- package/src/web/components/navigationBar/h5Menu.tsx +0 -179
- package/src/web/components/navigationBar/horizontalMenu.tsx +0 -200
- package/src/web/components/navigationBar/index.css +0 -762
- package/src/web/components/navigationBar/index.tsx +0 -230
- package/src/web/components/navigationBar/type.d.ts +0 -111
- package/src/web/components/navigationBar/verticalMenu.tsx +0 -81
- package/src/web/components/phone/index.css +0 -0
- package/src/web/components/phone/index.tsx +0 -22
- package/src/web/components/phoneCode/index.css +0 -0
- package/src/web/components/phoneCode/index.tsx +0 -22
- package/src/web/components/picker/datePicker.tsx +0 -48
- package/src/web/components/picker/picker.tsx +0 -59
- package/src/web/components/picker/timePicker.tsx +0 -56
- package/src/web/components/richText/const.ts +0 -3
- package/src/web/components/richText/index.css +0 -93
- package/src/web/components/richText/index.jsx +0 -473
- package/src/web/components/richTextView/index.css +0 -63
- package/src/web/components/richTextView/index.tsx +0 -63
- package/src/web/components/scrollView/index.tsx +0 -148
- package/src/web/components/share/index.css +0 -0
- package/src/web/components/share/index.tsx +0 -38
- package/src/web/components/slot/index.tsx +0 -19
- package/src/web/components/swiper/index.css +0 -106
- package/src/web/components/swiper/index.tsx +0 -291
- package/src/web/components/tabs/index.css +0 -64
- package/src/web/components/tabs/index.tsx +0 -35
- package/src/web/components/tabs/tabs.h5.tsx +0 -84
- package/src/web/components/tabs/tabs.pc.tsx +0 -74
- package/src/web/components/text/index.css +0 -26
- package/src/web/components/text/index.tsx +0 -60
- package/src/web/components/uploaderFileView/index.css +0 -11
- package/src/web/components/uploaderFileView/index.jsx +0 -84
- package/src/web/components/uploaderView/index.css +0 -31
- package/src/web/components/uploaderView/index.tsx +0 -92
- package/src/web/components/userInfo/index.css +0 -0
- package/src/web/components/userInfo/index.tsx +0 -30
- package/src/web/components/wedaVideo/index.css +0 -42
- package/src/web/components/wedaVideo/index.tsx +0 -208
- package/src/web/index.js +0 -4
- package/src/web/types.d.ts +0 -21
- package/src/web/utils/classnames.js +0 -39
- package/src/web/utils/constant.ts +0 -23
- package/src/web/utils/debounce.js +0 -98
- package/src/web/utils/events.js +0 -2
- package/src/web/utils/getLocalCounter.js +0 -5
- package/src/web/utils/isObjectEqual.js +0 -15
- package/src/web/utils/loading-fallback.tsx +0 -2
- package/src/web/utils/lodash.ts +0 -2
- package/src/web/utils/platform.js +0 -156
- package/src/web/utils/tcb.js +0 -86
- package/src/web/utils/tmap.js +0 -4
- package/src/web/utils/useSetState.ts +0 -18
- package/src/web/utils/useSyncValue.ts +0 -17
- package/src/web/utils/weui.js +0 -3
- package/src/web/weda-ui.css +0 -86
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Weda 自定义样式
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
page .weda-ui {
|
|
6
|
-
--weui-BRAND: #006eff;
|
|
7
|
-
--weui-TAG-TEXT-BLUE: #0067eb;
|
|
8
|
-
--weui-BTN-DEFAULT-COLOR: #576b95;
|
|
9
|
-
--weui-WECHAT: #07c160;
|
|
10
|
-
--weui-TAG-TEXT-GREEN: #06ae56;
|
|
11
|
-
--weui-BG-2: rgba(255, 255, 255, 0);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.weui-form {
|
|
15
|
-
min-height: 0%;
|
|
16
|
-
padding: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.weui-cells {
|
|
20
|
-
margin-top: 0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.weda-ui.weui-form .weui-cells__tips {
|
|
24
|
-
margin-bottom: 16px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.weui-cells__group_form .weui-cells__tips_warn {
|
|
28
|
-
color: #fa5151;
|
|
29
|
-
color: var(--weui-RED);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.weda-ui .weui-btn_input-clear {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.weda-ui.weda-picker .weui-btn_primary:not(.weui-btn_disabled):active {
|
|
37
|
-
background-color: var(--weui-TAG-TEXT-BLUE);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.weda-ui .weui-cell {
|
|
41
|
-
font-size: inherit;
|
|
42
|
-
}
|
|
43
|
-
.weda-ui .weui-cells {
|
|
44
|
-
font-size: 1em;
|
|
45
|
-
}
|
|
46
|
-
.weui-cells__group_form .weui-cell::before,
|
|
47
|
-
.weui-cells__group_form .weui-cells::before {
|
|
48
|
-
left: 16px;
|
|
49
|
-
right: 16px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.weui-cells__group_form .weui-cells::after {
|
|
53
|
-
left: 16px;
|
|
54
|
-
right: 16px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.weui-picker a:link:hover {
|
|
58
|
-
text-decoration: none;
|
|
59
|
-
}
|
|
60
|
-
.weda-ui .weui-input {
|
|
61
|
-
padding: 28rpx 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.weda-ui .weui-btn_input-clear {
|
|
65
|
-
visibility: hidden; /* visibilty 防止居中而且宽度auto时,出现输入时宽度抖动 */
|
|
66
|
-
display: inline;
|
|
67
|
-
}
|
|
68
|
-
.weda-ui .weui-input.focus.not-placeholder-shown + .weui-btn_input-clear {
|
|
69
|
-
visibility: visible;
|
|
70
|
-
display: inline;
|
|
71
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/* !
|
|
2
|
-
Copyright (c) 2018 Jed Watson.
|
|
3
|
-
Licensed under the MIT License (MIT), see
|
|
4
|
-
http://jedwatson.github.io/classnames
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
function classNames(...args) {
|
|
8
|
-
const classes = [];
|
|
9
|
-
|
|
10
|
-
for (let i = 0; i < args.length; i++) {
|
|
11
|
-
const arg = args[i];
|
|
12
|
-
if (!arg) continue;
|
|
13
|
-
|
|
14
|
-
const argType = typeof arg;
|
|
15
|
-
|
|
16
|
-
if (argType === 'string' || argType === 'number') {
|
|
17
|
-
classes.push(arg);
|
|
18
|
-
} else if (Array.isArray(arg)) {
|
|
19
|
-
if (arg.length) {
|
|
20
|
-
const inner = classes.push(classNames(...arg));
|
|
21
|
-
if (inner) {
|
|
22
|
-
classes.push(inner);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
} else if (argType === 'object') {
|
|
26
|
-
if (arg.toString === Object.prototype.toString) {
|
|
27
|
-
Object.keys(arg).forEach((key) => {
|
|
28
|
-
arg[key] && classes.push(key);
|
|
29
|
-
});
|
|
30
|
-
} else {
|
|
31
|
-
classes.push(arg.toString());
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return classes.join(' ');
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export default classNames;
|
package/src/mp/utils/constant.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export const TitleType = {
|
|
2
|
-
LEFT: 'left',
|
|
3
|
-
TOP: 'top',
|
|
4
|
-
NONE: 'none',
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const REL_DICT = {
|
|
8
|
-
equal: 'eq', // 等于
|
|
9
|
-
unequal: 'neq', // 不等于
|
|
10
|
-
include: 'search', // 包含
|
|
11
|
-
exclude: '_exclude', // 不包含
|
|
12
|
-
begin_with: '_begin_with', // 开头是
|
|
13
|
-
greater: 'gt', // 大于
|
|
14
|
-
greater_or_equal: 'gte', // 大于等于
|
|
15
|
-
bigger_or_equal: 'gte', //大于等于
|
|
16
|
-
less: 'lt', // 小于
|
|
17
|
-
less_or_equal: 'lte', // 小于等于
|
|
18
|
-
in: 'in', // 多选值
|
|
19
|
-
not_in: 'nin', // 不在多选值
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs=e();}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t;},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0");},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0);},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t);},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"");},u:function(t){return void 0===t;}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _;},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else{var i=t.name;v[i]=t,r=i;}return!n&&r&&(D=r),r||!n&&D;},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n);},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset});};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s);}}return new Date(e);}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O;},m.isValid=function(){return!(this.$d.toString()===$);},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e);},m.isAfter=function(t,e){return w(t)<this.startOf(e);},m.isBefore=function(t,e){return this.endOf(e)<w(t);},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t);},m.unix=function(){return Math.floor(this.valueOf()/1e3);},m.valueOf=function(){return this.$d.getTime();},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a);},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n);},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone();}},m.endOf=function(t){return this.startOf(t,!1);},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this;},m.set=function(t,e){return this.clone().$set(t,e);},m.get=function(t){return this[O.p(t)]();},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$);};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this);},m.subtract=function(t,e){return this.add(-1*t,e);},m.format=function(t){var e=this;if(!this.isValid())return $;var n=t||"YYYY-MM-DDTHH:mm:ssZ",r=O.z(this),i=this.$locale(),s=this.$H,u=this.$m,a=this.$M,o=i.weekdays,f=i.months,h=function(t,r,i,s){return t&&(t[r]||t(e,n))||i[r].substr(0,s);},c=function(t){return O.s(s%12||12,t,"0");},d=i.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r;},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(i.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(i.weekdaysMin,this.$W,o,2),ddd:h(i.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:r};return n.replace(y,(function(t,e){return e||l[t]||r.replace(":","");}));},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15);},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D);},m.daysInMonth=function(){return this.endOf(f).$D;},m.$locale=function(){return v[this.$L];},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n;},m.clone=function(){return O.w(this.$d,this);},m.toDate=function(){return new Date(this.valueOf());},m.toJSON=function(){return this.isValid()?this.toISOString():null;},m.toISOString=function(){return this.$d.toISOString();},m.toString=function(){return this.$d.toUTCString();},M;}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1]);};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w;},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t);},w.en=v[D],w.Ls=v,w.p={},w;}));
|
package/src/mp/utils/debounce.js
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
function isObject(value) {
|
|
2
|
-
const type = typeof value;
|
|
3
|
-
return value != null && (type === 'object' || type === 'function');
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
function debounce(func, wait, options) {
|
|
7
|
-
let lastArgs, lastThis, maxWait, result, timerId, lastCallTime;
|
|
8
|
-
|
|
9
|
-
let lastInvokeTime = 0;
|
|
10
|
-
let leading = false;
|
|
11
|
-
let maxing = false;
|
|
12
|
-
let trailing = true;
|
|
13
|
-
|
|
14
|
-
// 初始化
|
|
15
|
-
if (typeof func !== 'function') {
|
|
16
|
-
throw new TypeError('Expected a function');
|
|
17
|
-
}
|
|
18
|
-
wait = +wait || 0;
|
|
19
|
-
if (isObject(options)) {
|
|
20
|
-
leading = !!options.leading;
|
|
21
|
-
maxing = 'maxWait' in options;
|
|
22
|
-
maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : maxWait;
|
|
23
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// 调用func
|
|
27
|
-
function invokeFunc(time) {
|
|
28
|
-
const args = lastArgs;
|
|
29
|
-
const thisArg = lastThis;
|
|
30
|
-
|
|
31
|
-
lastArgs = lastThis = undefined;
|
|
32
|
-
lastInvokeTime = time;
|
|
33
|
-
result = func.apply(thisArg, args);
|
|
34
|
-
return result;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// 启动延时
|
|
38
|
-
function startTimer(pendingFunc, wait) {
|
|
39
|
-
return setTimeout(pendingFunc, wait);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// 延时开始前
|
|
43
|
-
function leadingEdge(time) {
|
|
44
|
-
lastInvokeTime = time;
|
|
45
|
-
// 启动延时
|
|
46
|
-
timerId = startTimer(timerExpired, wait);
|
|
47
|
-
// 如果是leading模式,延时前调用func
|
|
48
|
-
return leading ? invokeFunc(time) : result;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//计算剩余的延时时间:
|
|
52
|
-
//1. 不存在maxWait:(上一次debouncedFunc调用后)延时不能超过wait
|
|
53
|
-
//2. 存在maxWait:func调用不能被延时超过maxWait
|
|
54
|
-
//根据这两种情况计算出最短时间
|
|
55
|
-
function remainingWait(time) {
|
|
56
|
-
const timeSinceLastCall = time - lastCallTime;
|
|
57
|
-
const timeSinceLastInvoke = time - lastInvokeTime;
|
|
58
|
-
const timeWaiting = wait - timeSinceLastCall;
|
|
59
|
-
|
|
60
|
-
return maxing
|
|
61
|
-
? Math.min(timeWaiting, maxWait - timeSinceLastInvoke)
|
|
62
|
-
: timeWaiting;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
//判断当前时间是否能调用func:
|
|
66
|
-
//1.首次调用debouncedFunc
|
|
67
|
-
//2.距离上一次debouncedFunc调用后已延迟wait毫秒
|
|
68
|
-
//3.func调用总延迟达到maxWait毫秒
|
|
69
|
-
//4.系统时间倒退
|
|
70
|
-
function shouldInvoke(time) {
|
|
71
|
-
const timeSinceLastCall = time - lastCallTime;
|
|
72
|
-
const timeSinceLastInvoke = time - lastInvokeTime;
|
|
73
|
-
return (
|
|
74
|
-
lastCallTime === undefined ||
|
|
75
|
-
timeSinceLastCall >= wait ||
|
|
76
|
-
timeSinceLastCall < 0 ||
|
|
77
|
-
(maxing && timeSinceLastInvoke >= maxWait)
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// 延时器回调
|
|
82
|
-
function timerExpired() {
|
|
83
|
-
const time = Date.now();
|
|
84
|
-
// 如果满足时间条件,结束延时
|
|
85
|
-
if (shouldInvoke(time)) {
|
|
86
|
-
return trailingEdge(time);
|
|
87
|
-
}
|
|
88
|
-
// 没满足时间条件,计算剩余等待时间,继续延时
|
|
89
|
-
timerId = startTimer(timerExpired, remainingWait(time));
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
//延时结束后
|
|
93
|
-
function trailingEdge(time) {
|
|
94
|
-
timerId = undefined;
|
|
95
|
-
//如果是trailing模式,调用func
|
|
96
|
-
if (trailing && lastArgs) {
|
|
97
|
-
return invokeFunc(time);
|
|
98
|
-
}
|
|
99
|
-
lastArgs = lastThis = undefined;
|
|
100
|
-
return result;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
//debouncedFunc
|
|
104
|
-
function debounced(...args) {
|
|
105
|
-
const time = Date.now();
|
|
106
|
-
const isInvoking = shouldInvoke(time);
|
|
107
|
-
|
|
108
|
-
lastArgs = args;
|
|
109
|
-
lastThis = this;
|
|
110
|
-
lastCallTime = time;
|
|
111
|
-
|
|
112
|
-
if (isInvoking) {
|
|
113
|
-
//timerId不存在有两种原因:
|
|
114
|
-
//1. 首次调用
|
|
115
|
-
//2. 上次延时调用结束
|
|
116
|
-
if (timerId === undefined) {
|
|
117
|
-
return leadingEdge(lastCallTime);
|
|
118
|
-
}
|
|
119
|
-
// 存在func调用最长延时限制时,执行func并启动下一次延时,可实现throttle
|
|
120
|
-
if (maxing) {
|
|
121
|
-
timerId = startTimer(timerExpired, wait);
|
|
122
|
-
return invokeFunc(lastCallTime);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
if (timerId === undefined) {
|
|
126
|
-
timerId = startTimer(timerExpired, wait);
|
|
127
|
-
}
|
|
128
|
-
return result;
|
|
129
|
-
}
|
|
130
|
-
return debounced;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export default debounce;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
function equal(a, b) {
|
|
2
|
-
if (a === b) return true;
|
|
3
|
-
|
|
4
|
-
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
5
|
-
if (a.constructor !== b.constructor) return false;
|
|
6
|
-
|
|
7
|
-
var length, i, keys;
|
|
8
|
-
if (Array.isArray(a)) {
|
|
9
|
-
length = a.length;
|
|
10
|
-
if (length != b.length) return false;
|
|
11
|
-
for (i = length; i-- !== 0; ) if (!equal(a[i], b[i])) return false;
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (a.constructor === RegExp)
|
|
16
|
-
return a.source === b.source && a.flags === b.flags;
|
|
17
|
-
if (a.valueOf !== Object.prototype.valueOf)
|
|
18
|
-
return a.valueOf() === b.valueOf();
|
|
19
|
-
if (a.toString !== Object.prototype.toString)
|
|
20
|
-
return a.toString() === b.toString();
|
|
21
|
-
|
|
22
|
-
keys = Object.keys(a);
|
|
23
|
-
length = keys.length;
|
|
24
|
-
if (length !== Object.keys(b).length) return false;
|
|
25
|
-
|
|
26
|
-
for (i = length; i-- !== 0; )
|
|
27
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
28
|
-
|
|
29
|
-
for (i = length; i-- !== 0; ) {
|
|
30
|
-
var key = keys[i];
|
|
31
|
-
|
|
32
|
-
if (!equal(a[key], b[key])) return false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// true if both NaN, false otherwise
|
|
39
|
-
return a !== a && b !== b;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export default equal;
|
package/src/mp/utils/destr.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// https://github.com/unjs/destr/blob/2f6612533dd798d2ff5786274f2244558f86d09c/src/index.ts
|
|
2
|
-
// https://github.com/fastify/secure-json-parse
|
|
3
|
-
// https://github.com/hapijs/bourne
|
|
4
|
-
const suspectProtoRx =
|
|
5
|
-
/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/;
|
|
6
|
-
const suspectConstructorRx =
|
|
7
|
-
/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
8
|
-
const JsonSigRx = /^["{[]|^-?[0-9][0-9.]{0,14}$/;
|
|
9
|
-
function jsonParseTransform(key, value) {
|
|
10
|
-
if (key === '__proto__' || key === 'constructor') {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
return value;
|
|
14
|
-
}
|
|
15
|
-
export default function destr(val) {
|
|
16
|
-
if (typeof val !== 'string') {
|
|
17
|
-
return val;
|
|
18
|
-
}
|
|
19
|
-
const _lval = val.toLowerCase();
|
|
20
|
-
if (_lval === 'true') {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
if (_lval === 'false') {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
if (_lval === 'null') {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
if (_lval === 'nan') {
|
|
30
|
-
return NaN;
|
|
31
|
-
}
|
|
32
|
-
if (_lval === 'infinity') {
|
|
33
|
-
return Infinity;
|
|
34
|
-
}
|
|
35
|
-
if (_lval === 'undefined') {
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
if (!JsonSigRx.test(val)) {
|
|
39
|
-
return val;
|
|
40
|
-
}
|
|
41
|
-
try {
|
|
42
|
-
if (suspectProtoRx.test(val) || suspectConstructorRx.test(val)) {
|
|
43
|
-
return JSON.parse(val, jsonParseTransform);
|
|
44
|
-
}
|
|
45
|
-
return JSON.parse(val);
|
|
46
|
-
} catch (_e) {
|
|
47
|
-
return val;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*计算某个经纬度的周围某段距离的正方形的四个点
|
|
3
|
-
*
|
|
4
|
-
*@param lng float 经度
|
|
5
|
-
*@param lat float 纬度
|
|
6
|
-
*@param distance float 该点所在圆的半径,该圆与此正方形内切,默认值为0.5千米
|
|
7
|
-
*@return array 正方形的四个点的经纬度坐标
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
function dr_square_point($lng, $lat, $distance = 0.5) {
|
|
11
|
-
$distance = $distance ? $distance : 1;
|
|
12
|
-
let $r = 6371; //地球半径,平均半径为6371km
|
|
13
|
-
let $dlng =
|
|
14
|
-
2 *
|
|
15
|
-
Math.asin(
|
|
16
|
-
Math.sin($distance / (2 * $r)) / Math.cos($lat * (Math.PI / 180))
|
|
17
|
-
);
|
|
18
|
-
$dlng = $dlng * (180 / Math.PI);
|
|
19
|
-
let $dlat = $distance / $r;
|
|
20
|
-
$dlat = $dlat * (180 / Math.PI);
|
|
21
|
-
return {
|
|
22
|
-
leftTop: [$lat + $dlat, $lng - $dlng],
|
|
23
|
-
leftBottom: [$lat - $dlat, $lng - $dlng],
|
|
24
|
-
rightBottom: [$lat - $dlat, $lng + $dlng],
|
|
25
|
-
rightTop: [$lat + $dlat, $lng + $dlng],
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default dr_square_point;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// 小程序自定义组件, 内联事件
|
|
2
|
-
const bulidinEvents = [
|
|
3
|
-
'touchstart', // 手指触摸动作开始
|
|
4
|
-
'touchmove', // 手指触摸后移动
|
|
5
|
-
'touchcancel', // 手指触摸动作被打断,如来电提醒,弹窗
|
|
6
|
-
'touchend', // 手指触摸动作结束
|
|
7
|
-
'tap', // 手指触摸后马上离开
|
|
8
|
-
'longpress', // 手指触摸后,超过350ms再离开,如果指定了事件回调函数并触发了这个事件,tap事件将不被触发 1.5.0
|
|
9
|
-
'longtap', // 手指触摸后,超过350ms再离开(推荐使用longpress事件代替)
|
|
10
|
-
'transitionend', // 会在 WXSS transition 或 wx.createAnimation 动画结束后触发
|
|
11
|
-
'animationstart', // 会在一个 WXSS animation 动画开始时触发
|
|
12
|
-
'animationiteration', // 会在一个 WXSS animation 一次迭代结束时触发
|
|
13
|
-
'animationend', // 会在一个 WXSS animation 动画完成时触发
|
|
14
|
-
'touchforcechange', // 在支持 3D Touch 的 iPhone 设备,重按时会触发
|
|
15
|
-
];
|
|
16
|
-
|
|
17
|
-
function triggerEvent(name) {
|
|
18
|
-
return function (e) {
|
|
19
|
-
// 如果命中了自定义组件内联事件,不需要重复触发
|
|
20
|
-
if (!bulidinEvents.includes(name)) {
|
|
21
|
-
this.triggerEvent(name, e.detail);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default function (events) {
|
|
27
|
-
const methods = {};
|
|
28
|
-
events.forEach((item) => {
|
|
29
|
-
methods[item.name] = triggerEvent(item.name);
|
|
30
|
-
});
|
|
31
|
-
return methods;
|
|
32
|
-
}
|
package/src/mp/utils/lodash.js
DELETED
package/src/mp/utils/platform.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 文件字节转换
|
|
3
|
-
*/
|
|
4
|
-
export const transSize = (size) => {
|
|
5
|
-
const b = parseInt(size) || 0;
|
|
6
|
-
const getBig = (d) => Math.ceil(d / 1024) || 0;
|
|
7
|
-
if (b < 1024) {
|
|
8
|
-
return `${size}B`;
|
|
9
|
-
}
|
|
10
|
-
const k = getBig(size);
|
|
11
|
-
if (k < 1024) {
|
|
12
|
-
return `${k}K`;
|
|
13
|
-
}
|
|
14
|
-
const m = getBig(k);
|
|
15
|
-
if (m < 1024) {
|
|
16
|
-
return `${m}M`;
|
|
17
|
-
}
|
|
18
|
-
const g = getBig(m);
|
|
19
|
-
return `${g}G`;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 判断是否是url
|
|
24
|
-
*/
|
|
25
|
-
const reg =
|
|
26
|
-
// eslint-disable-next-line no-useless-escape
|
|
27
|
-
/(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
|
|
28
|
-
|
|
29
|
-
export const isUrl = (path) => reg.test(path);
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 生成随机数
|
|
33
|
-
*/
|
|
34
|
-
export const uuid = () => {
|
|
35
|
-
var s = [];
|
|
36
|
-
var hexDigits = '0123456789abcdef';
|
|
37
|
-
for (var i = 0; i < 36; i++) {
|
|
38
|
-
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
|
|
39
|
-
}
|
|
40
|
-
s[14] = '4'; // bits 12-15 of the time_hi_and_version field to 0010
|
|
41
|
-
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
|
|
42
|
-
s[8] = s[13] = s[18] = s[23] = '-';
|
|
43
|
-
var uuid = s.join('');
|
|
44
|
-
return uuid;
|
|
45
|
-
};
|