@cloudbase/weda-ui 2.0.27 → 3.1.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/CHANGELOG.md +7 -0
- package/dist/configs/actions/showModal.json +48 -0
- package/dist/configs/actions/showToast.json +41 -0
- package/dist/configs/components/auth.json +16 -0
- package/dist/configs/components/button.json +239 -0
- package/dist/configs/components/calendar.json +81 -0
- package/dist/configs/components/carousel.json +292 -0
- package/dist/configs/components/chart/bar.json +721 -0
- package/dist/configs/components/chart/line.json +674 -0
- package/dist/configs/components/chart/pie.json +494 -0
- package/dist/configs/components/chart/statisticsCard.json +376 -0
- package/dist/configs/components/container.json +50 -0
- package/dist/configs/components/dataView.json +239 -0
- package/dist/configs/components/drawer.json +115 -0
- package/dist/configs/components/form/checkbox.json +178 -0
- package/dist/configs/components/form/form.json +45 -0
- package/dist/configs/components/form/input.json +154 -0
- package/dist/configs/components/form/location.json +248 -0
- package/dist/configs/components/form/radio.json +203 -0
- package/dist/configs/components/form/richText.json +125 -0
- package/dist/configs/components/form/select.json +430 -0
- package/dist/configs/components/form/switch.json +58 -0
- package/dist/configs/components/form/textarea.json +116 -0
- package/dist/configs/components/form/tips.json +34 -0
- package/dist/configs/components/form/uploader.json +171 -0
- package/dist/configs/components/form/uploaderFile.json +158 -0
- package/dist/configs/components/graphicCard.json +413 -0
- package/dist/configs/components/image.json +187 -0
- package/dist/configs/components/link.json +79 -0
- package/dist/configs/components/listView.json +370 -0
- package/dist/configs/components/lottery.json +163 -0
- package/dist/configs/components/modal.json +72 -0
- package/dist/configs/components/navLayout.json +368 -0
- package/dist/configs/components/navigationBar.json +62 -0
- package/dist/configs/components/richtextview.json +26 -0
- package/dist/configs/components/scrollVeiw.json +253 -0
- package/dist/configs/components/slot.json +17 -0
- package/dist/configs/components/swiper.json +90 -0
- package/dist/configs/components/tabs.json +121 -0
- package/dist/configs/components/text.json +95 -0
- package/dist/configs/components/wedaVideo.json +89 -0
- package/dist/configs/components/wxOpenApi/phone.json +127 -0
- package/dist/configs/components/wxOpenApi/phoneCode.json +109 -0
- package/dist/configs/components/wxOpenApi/share.json +157 -0
- package/dist/configs/components/wxOpenApi/userInfo.json +156 -0
- package/dist/configs/index.d.ts +97 -0
- package/{src → dist}/configs/index.js +51 -57
- package/dist/docs/common/format.d.ts +13 -0
- package/dist/docs/common/format.js +103 -0
- package/dist/docs/common/tableView.d.ts +30 -0
- package/dist/docs/common/tableView.js +159 -0
- package/dist/index.d.ts +2 -0
- package/{src → dist}/index.js +0 -1
- package/dist/setupTests.d.ts +1 -0
- package/dist/setupTests.js +14 -0
- package/dist/web/actions/index.d.ts +2 -0
- package/{src → dist}/web/actions/index.js +0 -0
- package/dist/web/actions/showModal/index.d.ts +3 -0
- package/dist/web/actions/showModal/index.js +66 -0
- package/dist/web/actions/showToast/index.d.ts +1 -0
- package/dist/web/actions/showToast/index.js +3 -0
- package/dist/web/components/auth/index.d.ts +10 -0
- package/dist/web/components/auth/index.js +37 -0
- package/{src → dist}/web/components/button/index.css +2 -2
- package/dist/web/components/button/index.d.ts +32 -0
- package/dist/web/components/button/index.js +48 -0
- package/{src → dist}/web/components/calendar/index.css +29 -29
- package/dist/web/components/calendar/index.d.ts +19 -0
- package/dist/web/components/calendar/index.js +181 -0
- package/dist/web/components/calendar/util.d.ts +13 -0
- package/dist/web/components/calendar/util.js +74 -0
- package/{src → dist}/web/components/carousel/index.css +11 -11
- package/dist/web/components/carousel/index.d.ts +41 -0
- package/dist/web/components/carousel/index.js +240 -0
- package/dist/web/components/chart/bar/index.d.ts +41 -0
- package/dist/web/components/chart/bar/index.js +56 -0
- package/dist/web/components/chart/common/config/bar.d.ts +48 -0
- package/dist/web/components/chart/common/config/bar.js +49 -0
- package/dist/web/components/chart/common/config/global.d.ts +13 -0
- package/dist/web/components/chart/common/config/global.js +16 -0
- package/dist/web/components/chart/common/config/line.d.ts +46 -0
- package/dist/web/components/chart/common/config/line.js +49 -0
- package/dist/web/components/chart/common/config/pie.d.ts +29 -0
- package/dist/web/components/chart/common/config/pie.js +36 -0
- package/dist/web/components/chart/common/core/eChartBar.d.ts +32 -0
- package/dist/web/components/chart/common/core/eChartBar.js +196 -0
- package/dist/web/components/chart/common/core/eChartBase.d.ts +128 -0
- package/dist/web/components/chart/common/core/eChartBase.js +346 -0
- package/dist/web/components/chart/common/core/eChartLine.d.ts +28 -0
- package/dist/web/components/chart/common/core/eChartLine.js +168 -0
- package/dist/web/components/chart/common/core/eChartPie.d.ts +28 -0
- package/dist/web/components/chart/common/core/eChartPie.js +132 -0
- package/dist/web/components/chart/common/core/type.d.ts +35 -0
- package/dist/web/components/chart/common/core/type.js +9 -0
- package/dist/web/components/chart/common/echarts.d.ts +2 -0
- package/{src/web/components/chart/common/echarts.ts → dist/web/components/chart/common/echarts.js} +12 -19
- package/dist/web/components/chart/common/useChart.d.ts +8 -0
- package/dist/web/components/chart/common/useChart.js +60 -0
- package/dist/web/components/chart/line/index.d.ts +39 -0
- package/dist/web/components/chart/line/index.js +53 -0
- package/dist/web/components/chart/pie/index.d.ts +27 -0
- package/dist/web/components/chart/pie/index.js +40 -0
- package/{src → dist}/web/components/chart/statisticsCard/index.css +12 -12
- package/dist/web/components/chart/statisticsCard/index.d.ts +85 -0
- package/dist/web/components/chart/statisticsCard/index.js +203 -0
- package/dist/web/components/chart/statisticsCard/interface.d.ts +13 -0
- package/dist/web/components/chart/statisticsCard/interface.js +1 -0
- package/dist/web/components/container/index.d.ts +6 -0
- package/dist/web/components/container/index.js +6 -0
- package/dist/web/components/dataView/index.d.ts +6 -0
- package/dist/web/components/dataView/index.js +8 -0
- package/{src/web/components/dataView/interface.ts → dist/web/components/dataView/interface.d.ts} +1 -2
- package/dist/web/components/dataView/interface.js +1 -0
- package/dist/web/components/drawer/index.d.ts +13 -0
- package/dist/web/components/drawer/index.js +12 -0
- package/dist/web/components/form/checkbox/index.d.ts +13 -0
- package/dist/web/components/form/checkbox/index.js +167 -0
- package/dist/web/components/form/enumSelect/MultipleSelect.d.ts +78 -0
- package/dist/web/components/form/enumSelect/MultipleSelect.js +52 -0
- package/dist/web/components/form/enumSelect/NormalSelect.d.ts +83 -0
- package/dist/web/components/form/enumSelect/NormalSelect.js +52 -0
- package/dist/web/components/form/enumSelect/SelectContainer.d.ts +16 -0
- package/dist/web/components/form/enumSelect/SelectContainer.js +30 -0
- package/dist/web/components/form/enumSelect/index.d.ts +82 -0
- package/{src/web/components/form/enumSelect/index.jsx → dist/web/components/form/enumSelect/index.js} +1 -4
- package/dist/web/components/form/enumSelect/props/defaultProps.d.ts +34 -0
- package/dist/web/components/form/enumSelect/props/defaultProps.js +40 -0
- package/dist/web/components/form/enumSelect/props/propsTypes.d.ts +39 -0
- package/dist/web/components/form/enumSelect/props/propsTypes.js +47 -0
- package/{src → dist}/web/components/form/form/index.css +2 -2
- package/dist/web/components/form/form/index.d.ts +13 -0
- package/dist/web/components/form/form/index.js +31 -0
- package/{src → dist}/web/components/form/formcell/index.css +14 -14
- package/dist/web/components/form/formcell/index.d.ts +8 -0
- package/dist/web/components/form/formcell/index.js +40 -0
- package/{src → dist}/web/components/form/input/index.css +3 -3
- package/dist/web/components/form/input/index.d.ts +14 -0
- package/dist/web/components/form/input/index.js +86 -0
- package/dist/web/components/form/location/common/mapChoose.css +477 -0
- package/dist/web/components/form/location/common/mapChoose.d.ts +15 -0
- package/dist/web/components/form/location/common/mapChoose.js +431 -0
- package/dist/web/components/form/location/common/mapView.d.ts +19 -0
- package/dist/web/components/form/location/common/mapView.js +170 -0
- package/dist/web/components/form/location/common/propsConfig.d.ts +62 -0
- package/dist/web/components/form/location/common/propsConfig.js +52 -0
- package/{src → dist}/web/components/form/location/common/selectModal.css +11 -10
- package/dist/web/components/form/location/common/selectModal.d.ts +21 -0
- package/dist/web/components/form/location/common/selectModal.js +44 -0
- package/dist/web/components/form/location/common/useLocationInfo.d.ts +34 -0
- package/dist/web/components/form/location/common/useLocationInfo.js +88 -0
- package/dist/web/components/form/location/components/LocationH5/index.css +100 -0
- package/dist/web/components/form/location/components/LocationH5/location.h5.d.ts +8 -0
- package/dist/web/components/form/location/components/LocationH5/location.h5.js +347 -0
- package/dist/web/components/form/location/components/LocationPC/Header.d.ts +12 -0
- package/dist/web/components/form/location/components/LocationPC/Header.js +43 -0
- package/{src → dist}/web/components/form/location/components/LocationPC/index.css +10 -14
- package/dist/web/components/form/location/components/LocationPC/location.PC.d.ts +8 -0
- package/dist/web/components/form/location/components/LocationPC/location.PC.js +259 -0
- package/dist/web/components/form/location/constants.d.ts +2 -0
- package/{src → dist}/web/components/form/location/constants.js +0 -1
- package/dist/web/components/form/location/index.css +13 -0
- package/dist/web/components/form/location/index.d.ts +1 -0
- package/dist/web/components/form/location/index.js +17 -0
- package/{src → dist}/web/components/form/radio/index.css +0 -0
- package/dist/web/components/form/radio/index.d.ts +11 -0
- package/dist/web/components/form/radio/index.js +115 -0
- package/dist/web/components/form/renderDecorator.d.ts +6 -0
- package/dist/web/components/form/renderDecorator.js +20 -0
- package/dist/web/components/form/select/h5.d.ts +16 -0
- package/dist/web/components/form/select/h5.js +502 -0
- package/{src → dist}/web/components/form/select/index.css +4 -4
- package/dist/web/components/form/select/index.d.ts +65 -0
- package/dist/web/components/form/select/index.js +299 -0
- package/dist/web/components/form/select/region/index.d.ts +6 -0
- package/dist/web/components/form/select/region/index.js +147 -0
- package/dist/web/components/form/select/time.d.ts +9 -0
- package/dist/web/components/form/select/time.js +146 -0
- package/dist/web/components/form/select/year.d.ts +7 -0
- package/dist/web/components/form/select/year.js +72 -0
- package/dist/web/components/form/switch/index.d.ts +6 -0
- package/dist/web/components/form/switch/index.js +57 -0
- package/{src → dist}/web/components/form/textarea/index.css +1 -1
- package/dist/web/components/form/textarea/index.d.ts +12 -0
- package/dist/web/components/form/textarea/index.js +66 -0
- package/{src → dist}/web/components/form/tips/index.css +0 -0
- package/dist/web/components/form/tips/index.d.ts +8 -0
- package/dist/web/components/form/tips/index.js +17 -0
- package/{src → dist}/web/components/form/uploader/index.css +14 -14
- package/dist/web/components/form/uploader/index.d.ts +3 -0
- package/dist/web/components/form/uploader/index.js +42 -0
- package/dist/web/components/form/uploader/uploader.h5.d.ts +19 -0
- package/dist/web/components/form/uploader/uploader.h5.js +201 -0
- package/dist/web/components/form/uploader/uploader.pc.d.ts +29 -0
- package/dist/web/components/form/uploader/uploader.pc.js +182 -0
- package/{src → dist}/web/components/form/uploaderFile/index.css +62 -62
- package/dist/web/components/form/uploaderFile/index.d.ts +4 -0
- package/dist/web/components/form/uploaderFile/index.js +19 -0
- package/dist/web/components/form/uploaderFile/uploadFile.h5.d.ts +23 -0
- package/dist/web/components/form/uploaderFile/uploadFile.h5.js +315 -0
- package/dist/web/components/form/uploaderFile/uploadFile.pc.d.ts +24 -0
- package/dist/web/components/form/uploaderFile/uploadFile.pc.js +290 -0
- package/{src → dist}/web/components/graphicCard/index.css +15 -15
- package/dist/web/components/graphicCard/index.d.ts +31 -0
- package/dist/web/components/graphicCard/index.js +166 -0
- package/dist/web/components/image/image.d.ts +9 -0
- package/dist/web/components/image/image.js +119 -0
- package/{src → dist}/web/components/image/index.css +2 -2
- package/dist/web/components/image/index.d.ts +13 -0
- package/dist/web/components/image/index.js +91 -0
- package/dist/web/components/index.d.ts +47 -0
- package/{src → dist}/web/components/index.js +25 -26
- package/{src → dist}/web/components/link/index.css +0 -0
- package/dist/web/components/link/index.d.ts +24 -0
- package/dist/web/components/link/index.js +71 -0
- package/{src → dist}/web/components/listView/index.css +17 -17
- package/dist/web/components/listView/index.d.ts +7 -0
- package/dist/web/components/listView/index.js +262 -0
- package/dist/web/components/listView/interface.d.ts +122 -0
- package/dist/web/components/listView/interface.js +1 -0
- package/{src → dist}/web/components/lottery/index.css +98 -72
- package/dist/web/components/lottery/index.d.ts +22 -0
- package/dist/web/components/lottery/index.js +390 -0
- package/dist/web/components/lottery/lotteryUtil.d.ts +23 -0
- package/dist/web/components/lottery/lotteryUtil.js +180 -0
- package/dist/web/components/modal/h5.css +53 -0
- package/dist/web/components/modal/index.d.ts +17 -0
- package/dist/web/components/modal/index.js +11 -0
- package/dist/web/components/modal/modal.h5.d.ts +4 -0
- package/dist/web/components/modal/modal.h5.js +46 -0
- package/dist/web/components/modal/modal.pc.d.ts +3 -0
- package/dist/web/components/modal/modal.pc.js +31 -0
- package/{src → dist}/web/components/navLayout/index.css +15 -15
- package/dist/web/components/navLayout/index.d.ts +46 -0
- package/dist/web/components/navLayout/index.js +116 -0
- package/dist/web/components/navigationBar/common.d.ts +15 -0
- package/dist/web/components/navigationBar/common.js +127 -0
- package/dist/web/components/navigationBar/h5Menu.d.ts +14 -0
- package/dist/web/components/navigationBar/h5Menu.js +72 -0
- package/dist/web/components/navigationBar/horizontalMenu.d.ts +12 -0
- package/dist/web/components/navigationBar/horizontalMenu.js +99 -0
- package/{src → dist}/web/components/navigationBar/index.css +66 -66
- package/dist/web/components/navigationBar/index.d.ts +13 -0
- package/dist/web/components/navigationBar/index.js +157 -0
- package/dist/web/components/navigationBar/verticalMenu.d.ts +13 -0
- package/dist/web/components/navigationBar/verticalMenu.js +38 -0
- package/dist/web/components/phone/index.d.ts +18 -0
- package/dist/web/components/phone/index.js +4 -0
- package/dist/web/components/phoneCode/index.d.ts +18 -0
- package/dist/web/components/phoneCode/index.js +4 -0
- package/dist/web/components/picker/datePicker.d.ts +10 -0
- package/dist/web/components/picker/datePicker.js +31 -0
- package/dist/web/components/picker/picker.d.ts +6 -0
- package/dist/web/components/picker/picker.js +45 -0
- package/dist/web/components/picker/timePicker.d.ts +7 -0
- package/dist/web/components/picker/timePicker.js +42 -0
- package/dist/web/components/richText/const.d.ts +1 -0
- package/dist/web/components/richText/const.js +2 -0
- package/{src → dist}/web/components/richText/index.css +3 -3
- package/dist/web/components/richText/index.d.ts +51 -0
- package/dist/web/components/richText/index.js +295 -0
- package/{src → dist}/web/components/richTextView/index.css +8 -8
- package/dist/web/components/richTextView/index.d.ts +7 -0
- package/dist/web/components/richTextView/index.js +44 -0
- package/dist/web/components/scrollView/index.d.ts +27 -0
- package/dist/web/components/scrollView/index.js +95 -0
- package/dist/web/components/share/index.d.ts +34 -0
- package/dist/web/components/share/index.js +4 -0
- package/dist/web/components/slot/index.d.ts +6 -0
- package/dist/web/components/slot/index.js +9 -0
- package/{src → dist}/web/components/swiper/index.css +10 -10
- package/dist/web/components/swiper/index.d.ts +24 -0
- package/dist/web/components/swiper/index.js +149 -0
- package/{src → dist}/web/components/tabs/index.css +6 -6
- package/dist/web/components/tabs/index.d.ts +13 -0
- package/dist/web/components/tabs/index.js +15 -0
- package/dist/web/components/tabs/tabs.h5.d.ts +4 -0
- package/dist/web/components/tabs/tabs.h5.js +42 -0
- package/dist/web/components/tabs/tabs.pc.d.ts +3 -0
- package/dist/web/components/tabs/tabs.pc.js +40 -0
- package/{src → dist}/web/components/text/index.css +6 -6
- package/dist/web/components/text/index.d.ts +14 -0
- package/dist/web/components/text/index.js +17 -0
- package/{src → dist}/web/components/uploaderFileView/index.css +0 -0
- package/dist/web/components/uploaderFileView/index.d.ts +10 -0
- package/dist/web/components/uploaderFileView/index.js +61 -0
- package/{src → dist}/web/components/uploaderView/index.css +5 -5
- package/dist/web/components/uploaderView/index.d.ts +17 -0
- package/dist/web/components/uploaderView/index.js +48 -0
- package/dist/web/components/userInfo/index.d.ts +26 -0
- package/dist/web/components/userInfo/index.js +4 -0
- package/{src → dist}/web/components/wedaVideo/index.css +2 -2
- package/dist/web/components/wedaVideo/index.d.ts +17 -0
- package/dist/web/components/wedaVideo/index.js +159 -0
- package/dist/web/index.d.ts +8 -0
- package/{src → dist}/web/index.js +1 -1
- package/dist/web/utils/classnames.d.ts +2 -0
- package/dist/web/utils/classnames.js +37 -0
- package/dist/web/utils/constant.d.ts +23 -0
- package/dist/web/utils/constant.js +24 -0
- package/dist/web/utils/debounce.d.ts +2 -0
- package/dist/web/utils/debounce.js +92 -0
- package/dist/web/utils/events.d.ts +1 -0
- package/{src → dist}/web/utils/events.js +1 -1
- package/dist/web/utils/getLocalCounter.d.ts +1 -0
- package/{src → dist}/web/utils/getLocalCounter.js +1 -2
- package/dist/web/utils/isObjectEqual.d.ts +2 -0
- package/dist/web/utils/isObjectEqual.js +12 -0
- package/dist/web/utils/loading-fallback.d.ts +2 -0
- package/dist/web/utils/loading-fallback.js +2 -0
- package/dist/web/utils/lodash.d.ts +1 -0
- package/{src/mp → dist/web}/utils/lodash.js +0 -0
- package/dist/web/utils/platform.d.ts +18 -0
- package/dist/web/utils/platform.js +191 -0
- package/dist/web/utils/tcb.d.ts +23 -0
- package/dist/web/utils/tcb.js +82 -0
- package/dist/web/utils/tmap.d.ts +3 -0
- package/dist/web/utils/tmap.js +21 -0
- package/dist/web/utils/useSetState.d.ts +1 -0
- package/dist/web/utils/useSetState.js +8 -0
- package/dist/web/utils/useSyncValue.d.ts +4 -0
- package/dist/web/utils/useSyncValue.js +15 -0
- package/dist/web/utils/weui.d.ts +1 -0
- package/{src → dist}/web/utils/weui.js +0 -1
- package/{src → dist}/web/weda-ui.css +2 -2
- package/package.json +22 -22
- 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/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/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/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.tsx +0 -119
- package/src/web/components/calendar/index.jsx +0 -312
- package/src/web/components/calendar/util.js +0 -90
- 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/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.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/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/props/defaultProps.js +0 -39
- package/src/web/components/form/enumSelect/props/propsTypes.js +0 -50
- package/src/web/components/form/form/index.tsx +0 -51
- package/src/web/components/form/formcell/index.tsx +0 -85
- 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.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/location.PC.jsx +0 -332
- 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.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.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.tsx +0 -127
- 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.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.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.tsx +0 -310
- package/src/web/components/image/image.tsx +0 -187
- package/src/web/components/image/index.tsx +0 -121
- 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.tsx +0 -346
- package/src/web/components/listView/interface.ts +0 -98
- 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.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.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.jsx +0 -473
- 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.tsx +0 -291
- 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.tsx +0 -60
- package/src/web/components/uploaderFileView/index.jsx +0 -84
- 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.tsx +0 -208
- 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/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
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import '@tcwd/style-wedatheme/index.css';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import loadable from '@loadable/component';
|
|
3
|
+
import { fallback } from '../utils/loading-fallback';
|
|
5
4
|
// export const Button = loadable(() => import('./button'), {fallback});
|
|
6
|
-
// export const Text = loadable(() => import('./text'), {fallback});
|
|
7
5
|
// export const Container = loadable(() => import('./container'), {fallback});
|
|
8
|
-
// export const Image = loadable(() => import('./image'), {fallback});
|
|
9
6
|
// export const Slot = loadable(() => import('./slot'), {fallback});
|
|
10
7
|
// export const ScrollView = loadable(() => import('./scrollView'), {fallback});
|
|
11
8
|
// export const Swiper = loadable(() => import('./swiper'), {fallback});
|
|
@@ -26,29 +23,32 @@ import '@tcwd/style-wedatheme/index.css';
|
|
|
26
23
|
// export const Checkbox = loadable(() => import('./form/checkbox'), {fallback});
|
|
27
24
|
// export const Radio = loadable(() => import('./form/radio'), {fallback});
|
|
28
25
|
// export const Switch = loadable(() => import('./form/switch'), {fallback});
|
|
29
|
-
// export const Select = loadable(() => import('./form/select'), {fallback});
|
|
30
26
|
// export const Uploader = loadable(() => import('./form/uploader'), {fallback});
|
|
31
27
|
// export const Tips = loadable(() => import('./form/tips'), {fallback});
|
|
32
28
|
// export const EnumSelect = loadable(() => import('./form/enumSelect'), {fallback});
|
|
33
29
|
// export const Tabs = loadable(() => import('./tabs'), {fallback});
|
|
34
|
-
|
|
35
30
|
export { default as Button } from './button';
|
|
36
|
-
export { default as Text } from './text';
|
|
31
|
+
// export { default as Text } from './text';
|
|
32
|
+
export const Text = loadable(() => import('./text'), { fallback });
|
|
37
33
|
export { default as Container } from './container';
|
|
38
|
-
export { default as Image } from './image';
|
|
34
|
+
// export { default as Image } from './image';
|
|
35
|
+
export const Image = loadable(() => import('./image'), { fallback });
|
|
39
36
|
export { default as Slot } from './slot';
|
|
40
37
|
export { default as ScrollView } from './scrollView';
|
|
41
38
|
export { default as Swiper } from './swiper';
|
|
42
39
|
export { default as Carousel } from './carousel';
|
|
43
40
|
export { default as Modal } from './modal';
|
|
44
|
-
export { default as RichText } from './richText';
|
|
41
|
+
// export { default as RichText } from './richText';
|
|
42
|
+
export const RichText = loadable(() => import('./richText'), { fallback });
|
|
45
43
|
export { default as RichTextView } from './richTextView';
|
|
46
44
|
export { default as Link } from './link';
|
|
47
45
|
export { default as Drawer } from './drawer';
|
|
48
46
|
export { default as UploaderView } from './uploaderView';
|
|
49
47
|
export { default as UploaderFileView } from './uploaderFileView';
|
|
50
|
-
export { default as WedaVideo } from './wedaVideo/index';
|
|
51
|
-
|
|
48
|
+
// export { default as WedaVideo } from './wedaVideo/index';
|
|
49
|
+
export const WedaVideo = loadable(() => import('./wedaVideo/index'), {
|
|
50
|
+
fallback,
|
|
51
|
+
});
|
|
52
52
|
export { default as Picker } from './picker/picker';
|
|
53
53
|
export { default as DatePicker } from './picker/datePicker';
|
|
54
54
|
export { default as TimePicker } from './picker/timePicker';
|
|
@@ -60,36 +60,35 @@ export { default as Checkbox } from './form/checkbox';
|
|
|
60
60
|
export { default as Radio } from './form/radio';
|
|
61
61
|
export { default as Switch } from './form/switch';
|
|
62
62
|
export { default as Select } from './form/select';
|
|
63
|
+
// export const Select = loadable(() => import('./form/select'), { fallback });
|
|
63
64
|
export { default as Uploader } from './form/uploader';
|
|
64
65
|
export { default as UploaderFile } from './form/uploaderFile';
|
|
65
66
|
export { default as Tips } from './form/tips';
|
|
66
67
|
export { default as Tabs } from './tabs';
|
|
67
|
-
|
|
68
68
|
export { default as Location } from './form/location';
|
|
69
|
-
|
|
70
|
-
export
|
|
71
|
-
|
|
69
|
+
// export { default as EnumSelect } from './form/enumSelect';
|
|
70
|
+
export const EnumSelect = loadable(() => import('./form/enumSelect'), {
|
|
71
|
+
fallback,
|
|
72
|
+
});
|
|
73
|
+
// export { default as Calendar } from './calendar';
|
|
74
|
+
export const Calendar = loadable(() => import('./calendar'), { fallback });
|
|
72
75
|
export { default as NavLayout } from './navLayout';
|
|
73
|
-
|
|
74
76
|
// Data Contaier
|
|
75
77
|
export { default as ListView } from './listView';
|
|
76
78
|
export { default as NavigationBar } from './navigationBar';
|
|
77
|
-
export { default as Line } from './chart/line';
|
|
78
|
-
export { default as Bar } from './chart/bar';
|
|
79
|
-
export { default as Pie } from './chart/pie';
|
|
79
|
+
// export { default as Line } from './chart/line';
|
|
80
|
+
// export { default as Bar } from './chart/bar';
|
|
81
|
+
// export { default as Pie } from './chart/pie';
|
|
82
|
+
export const Line = loadable(() => import('./chart/line'), { fallback });
|
|
83
|
+
export const Bar = loadable(() => import('./chart/bar'), { fallback });
|
|
84
|
+
export const Pie = loadable(() => import('./chart/pie'), { fallback });
|
|
80
85
|
export { default as DataView } from './dataView';
|
|
81
|
-
|
|
82
86
|
export { default as StatisticsCard } from './chart/statisticsCard';
|
|
83
87
|
export { default as GraphicCard } from './graphicCard';
|
|
84
|
-
|
|
85
88
|
export { default as UserInfo } from './userInfo';
|
|
86
89
|
export { default as Phone } from './phone';
|
|
87
90
|
export { default as PhoneCode } from './phoneCode';
|
|
88
91
|
export { default as Share } from './share';
|
|
89
|
-
|
|
90
92
|
export { default as Lottery } from './lottery';
|
|
91
|
-
// open
|
|
92
|
-
// import Auth from './auth';
|
|
93
|
-
|
|
94
93
|
import 'weui/dist/style/weui.css';
|
|
95
94
|
import '../weda-ui.css';
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { CommonPropsType } from '../../types';
|
|
3
|
+
import './index.css';
|
|
4
|
+
export interface PropsType extends CommonPropsType {
|
|
5
|
+
/**
|
|
6
|
+
* 内容
|
|
7
|
+
*/
|
|
8
|
+
content?: string;
|
|
9
|
+
/**
|
|
10
|
+
* 链接地址
|
|
11
|
+
*/
|
|
12
|
+
url?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 参数
|
|
15
|
+
*/
|
|
16
|
+
params?: Readonly<{
|
|
17
|
+
key: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}[]>;
|
|
20
|
+
contentSlot?: React.ReactNode;
|
|
21
|
+
isOpenInNewWindow?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export default function Link({ content, url, events, style, className, contentSlot, params, // TODO 格式定义,
|
|
24
|
+
isOpenInNewWindow, }: PropsType): JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import classNames from '../../utils/classnames';
|
|
3
|
+
import { emptyArray, emptyObject } from '../../utils/constant';
|
|
4
|
+
import './index.css';
|
|
5
|
+
// 所有绝对地址直接交由浏览器,新开窗口交由浏览器
|
|
6
|
+
// 当前窗口相对地址交给平台
|
|
7
|
+
export default function Link({ content, url = '', events = emptyObject, style, className, contentSlot, params = emptyArray, // TODO 格式定义,
|
|
8
|
+
isOpenInNewWindow, }) {
|
|
9
|
+
url = url.trim();
|
|
10
|
+
const cls = classNames({
|
|
11
|
+
'weda-link': true,
|
|
12
|
+
'weda-ui': true,
|
|
13
|
+
[className]: className,
|
|
14
|
+
});
|
|
15
|
+
// URL 构造函数不支持 '//xxx.com' 的格式
|
|
16
|
+
if (url.indexOf('//') === 0) {
|
|
17
|
+
url = location.protocol + url;
|
|
18
|
+
}
|
|
19
|
+
// "proto:" 或 "//" 起头的是绝对路径
|
|
20
|
+
let isAbosolutePath = /^(?:[a-z]+:)/i.test(url);
|
|
21
|
+
let base, path, href, paramObj = {}, urlObj;
|
|
22
|
+
if (!isAbosolutePath) {
|
|
23
|
+
// 相对地址使用站位域名,不实际使用
|
|
24
|
+
base =
|
|
25
|
+
location.origin && location.origin !== 'null'
|
|
26
|
+
? location.origin
|
|
27
|
+
: 'https://we.da';
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
urlObj = new URL(url, base);
|
|
31
|
+
params.forEach((x) => {
|
|
32
|
+
urlObj.searchParams.append(x.key, x.value);
|
|
33
|
+
});
|
|
34
|
+
href = urlObj.href;
|
|
35
|
+
path = urlObj.pathname;
|
|
36
|
+
for (const [key, value] of urlObj.searchParams) {
|
|
37
|
+
paramObj[key] = value;
|
|
38
|
+
}
|
|
39
|
+
// 相对地址去掉站位域名
|
|
40
|
+
if (!isAbosolutePath) {
|
|
41
|
+
href = urlObj.pathname + urlObj.search + urlObj.hash;
|
|
42
|
+
href = href.replace(/^\//, '');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
// 非法 url
|
|
47
|
+
isAbosolutePath = true;
|
|
48
|
+
href = url;
|
|
49
|
+
path = '';
|
|
50
|
+
paramObj = params.reduce((p, x) => {
|
|
51
|
+
p[x.key] = x.value;
|
|
52
|
+
return p;
|
|
53
|
+
}, {});
|
|
54
|
+
}
|
|
55
|
+
return (React.createElement("a", { style: { ...style }, className: cls, target: isOpenInNewWindow ? '_blank' : '_self', href: href, onClick: (e) => {
|
|
56
|
+
events.tap && events.tap({}, { originEvent: e });
|
|
57
|
+
if (!e.defaultPrevented) {
|
|
58
|
+
if (!isAbosolutePath) {
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
app.navigateTo({
|
|
61
|
+
pageId: path,
|
|
62
|
+
packageName: '',
|
|
63
|
+
mode: 'weDa',
|
|
64
|
+
params: paramObj,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}, rel: "noopener noreferrer" },
|
|
69
|
+
contentSlot && React.createElement("div", { className: "weda-link-slot" }, contentSlot),
|
|
70
|
+
content));
|
|
71
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
.weda-list-view-card {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-wrap: wrap;
|
|
10
|
-
margin-right:
|
|
10
|
+
margin-right: 0.21429rem;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/* 加载更多 */
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.weda-list-view__containor .weda-list-view__more .weda-list-view__bottom-load {
|
|
19
|
-
padding-top:
|
|
19
|
+
padding-top: 0.07143rem;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.weda-list-view__containor .weda-list-view__more .weda-list-view__more-text {
|
|
23
|
-
padding-top:
|
|
24
|
-
padding-bottom:
|
|
23
|
+
padding-top: 0.71429rem;
|
|
24
|
+
padding-bottom: 1rem;
|
|
25
25
|
font-size: 0.85714em;
|
|
26
26
|
line-height: 0.85714em;
|
|
27
27
|
color: rgba(0, 0, 0, 0.4);
|
|
@@ -35,24 +35,24 @@
|
|
|
35
35
|
display: flex;
|
|
36
36
|
align-items: center;
|
|
37
37
|
justify-content: center;
|
|
38
|
-
padding-top:
|
|
39
|
-
padding-bottom:
|
|
38
|
+
padding-top: 1.42857rem;
|
|
39
|
+
padding-bottom: 1.28571rem;
|
|
40
40
|
box-sizing: border-box;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.weda-list-view__containor .weda-list-view__more .weda-list-view__symbol-item {
|
|
44
|
-
width:
|
|
45
|
-
height:
|
|
44
|
+
width: 0.57143rem;
|
|
45
|
+
height: 0.57143rem;
|
|
46
46
|
background: #c4c4c4;
|
|
47
|
-
margin-left:
|
|
47
|
+
margin-left: 0.42857rem;
|
|
48
48
|
border-radius: 50%;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.weda-list-view__containor
|
|
52
52
|
.weda-list-view__more
|
|
53
53
|
.weda-list-view__symbol-item:first-child {
|
|
54
|
-
width:
|
|
55
|
-
height:
|
|
54
|
+
width: 0.42857rem;
|
|
55
|
+
height: 0.42857rem;
|
|
56
56
|
margin-left: 0;
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
align-items: center;
|
|
72
72
|
justify-content: space-between;
|
|
73
73
|
position: relative;
|
|
74
|
-
padding:
|
|
74
|
+
padding: 0.71429rem 1.28571rem 0.85714rem 1.14286rem;
|
|
75
75
|
box-sizing: border-box;
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
font-size: 0.85714em;
|
|
85
85
|
line-height: 1.71428em;
|
|
86
86
|
color: rgba(0, 0, 0, 0.4);
|
|
87
|
-
padding: 0
|
|
87
|
+
padding: 0 1.71429rem;
|
|
88
88
|
cursor: pointer;
|
|
89
89
|
}
|
|
90
90
|
|
|
@@ -107,9 +107,9 @@
|
|
|
107
107
|
content: '';
|
|
108
108
|
width: 1.71428em;
|
|
109
109
|
height: 1.71428em;
|
|
110
|
-
top:
|
|
110
|
+
top: 0.71429rem;
|
|
111
111
|
opacity: 0.2;
|
|
112
|
-
background-image: url(
|
|
112
|
+
background-image: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjE3MTkgMTIuMDAwMkw4LjIyMTkyIDcuMDUwMjNMOS42MzU5MiA1LjYzNjIzTDE1Ljk5OTkgMTIuMDAwMkw5LjYzNTkyIDE4LjM2NDJMOC4yMjE5MiAxNi45NTAyTDEzLjE3MTkgMTIuMDAwMloiIGZpbGw9IiMwOTEyMUYiLz4KPC9zdmc+Cg==);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
.weda-list-view__containor
|
|
@@ -124,14 +124,14 @@
|
|
|
124
124
|
.weda-list-view__containor
|
|
125
125
|
.weda-list-view__more
|
|
126
126
|
.weda-list-view__pagination-pre::before {
|
|
127
|
-
left:
|
|
127
|
+
left: 1.14286rem;
|
|
128
128
|
transform: rotate(180deg);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.weda-list-view__containor
|
|
132
132
|
.weda-list-view__more
|
|
133
133
|
.weda-list-view__pagination-next::after {
|
|
134
|
-
right:
|
|
134
|
+
right: 1.28571rem;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
.weda-list-view__containor
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef, useMemo, useCallback, } from 'react';
|
|
2
|
+
import { callDataSource } from '../../utils/tcb';
|
|
3
|
+
import { isInIde, getWhereList } from '../../utils/platform';
|
|
4
|
+
import classNames from '../../utils/classnames';
|
|
5
|
+
import isequal from 'lodash.isequal';
|
|
6
|
+
import './index.css';
|
|
7
|
+
import { isNil } from '../../utils/lodash';
|
|
8
|
+
const ORDERTYPE = ['asc', 'desc'];
|
|
9
|
+
const BLOCK_NAME = 'weda-list-view';
|
|
10
|
+
const getIdeMockData = (length = 3) => Array.from({ length }).map(() => Object.create(null));
|
|
11
|
+
/**
|
|
12
|
+
* 数据容器-列表视图
|
|
13
|
+
*/
|
|
14
|
+
export default function ListView(props) {
|
|
15
|
+
var _a, _b, _c, _d;
|
|
16
|
+
const { dataSourceType, bindConnectMetadata, connectorMethod, connectorParams, datasource, orderBy, orderType, where, template, pageSize = 5, pagination, events, className, children, isRecords = true, //是否展示回调recoreds字段
|
|
17
|
+
appCloud = { callDataSource, isInIde }, beforeDataChange = (v) => v, ...rest } = props;
|
|
18
|
+
const isModel = useMemo(() => dataSourceType !== 'custom-connector', [dataSourceType]);
|
|
19
|
+
const methodName = useMemo(() => {
|
|
20
|
+
var _a;
|
|
21
|
+
if (isModel) {
|
|
22
|
+
return ((_a = datasource === null || datasource === void 0 ? void 0 : datasource.extra) === null || _a === void 0 ? void 0 : _a.methodName) || 'wedaGetRecords';
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return (connectorMethod === null || connectorMethod === void 0 ? void 0 : connectorMethod.name) || 'wedaGetRecords';
|
|
26
|
+
}
|
|
27
|
+
}, [(_a = datasource === null || datasource === void 0 ? void 0 : datasource.extra) === null || _a === void 0 ? void 0 : _a.methodName, connectorMethod === null || connectorMethod === void 0 ? void 0 : connectorMethod.name, isModel]); // 默认方法名
|
|
28
|
+
const [pageNo, setPageNo] = useState(1); // 分页状态
|
|
29
|
+
const [loading, setLoading] = useState(false); // 触底刷新加载状态
|
|
30
|
+
const [entry, setEntry] = useState(null); // 触底的observer对象
|
|
31
|
+
const paramRef = useRef({
|
|
32
|
+
dataSourceName: datasource === null || datasource === void 0 ? void 0 : datasource.name,
|
|
33
|
+
bindConnectMetaName: (_b = bindConnectMetadata === null || bindConnectMetadata === void 0 ? void 0 : bindConnectMetadata.datasource) === null || _b === void 0 ? void 0 : _b.name,
|
|
34
|
+
methodName,
|
|
35
|
+
params: { orderBy, orderType, where, pageNo: 1, pageSize, connectorParams },
|
|
36
|
+
pagination,
|
|
37
|
+
}); // 最新请求参数
|
|
38
|
+
const dataRef = useRef({ total: 0, records: [] }); // 最新数据列表
|
|
39
|
+
const observeRef = useRef(null); // 当前监听对象
|
|
40
|
+
const isIdeMockData = (!(datasource === null || datasource === void 0 ? void 0 : datasource.name) || !((_c = bindConnectMetadata === null || bindConnectMetadata === void 0 ? void 0 : bindConnectMetadata.datasource) === null || _c === void 0 ? void 0 : _c.name)) &&
|
|
41
|
+
((_d = appCloud === null || appCloud === void 0 ? void 0 : appCloud.isInIde) === null || _d === void 0 ? void 0 : _d.call(appCloud)); // 在ide环境且未绑定数据源时,存在mock数据逻辑
|
|
42
|
+
const shouldBottomLoad = pagination === 'bottomLoad' && (entry === null || entry === void 0 ? void 0 : entry.isIntersecting) && !loading; // 能否触底加载
|
|
43
|
+
// 组件卸载时触发
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
return () => {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
(_a = observeRef.current) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
48
|
+
(_b = events === null || events === void 0 ? void 0 : events.onDataChange) === null || _b === void 0 ? void 0 : _b.call(events, { data: beforeDataChange([]) });
|
|
49
|
+
};
|
|
50
|
+
}, []);
|
|
51
|
+
// props 基本类型监听,需重新分页;处于 ide 且未绑定数据源时返回mock数据
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
var _a, _b, _c;
|
|
54
|
+
dataRef.current = { total: 0, records: [] };
|
|
55
|
+
if ((isModel && (datasource === null || datasource === void 0 ? void 0 : datasource.name)) || (!isModel && (connectorMethod === null || connectorMethod === void 0 ? void 0 : connectorMethod.name))) {
|
|
56
|
+
fetchData({
|
|
57
|
+
dataSourceName: isModel
|
|
58
|
+
? datasource === null || datasource === void 0 ? void 0 : datasource.name
|
|
59
|
+
: (_a = bindConnectMetadata === null || bindConnectMetadata === void 0 ? void 0 : bindConnectMetadata.datasource) === null || _a === void 0 ? void 0 : _a.name,
|
|
60
|
+
methodName,
|
|
61
|
+
params: {
|
|
62
|
+
...(_b = paramRef.current) === null || _b === void 0 ? void 0 : _b.params,
|
|
63
|
+
orderBy,
|
|
64
|
+
orderType,
|
|
65
|
+
pageNo: 1,
|
|
66
|
+
pageSize,
|
|
67
|
+
},
|
|
68
|
+
pagination,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
if (isIdeMockData) {
|
|
73
|
+
(_c = events === null || events === void 0 ? void 0 : events.onDataChange) === null || _c === void 0 ? void 0 : _c.call(events, {
|
|
74
|
+
data: beforeDataChange(getIdeMockData(pageSize)),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, [methodName, pageSize, pagination, orderBy, orderType, datasource === null || datasource === void 0 ? void 0 : datasource.name]);
|
|
79
|
+
// props 对象类型监听,需重新分页
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
var _a, _b, _c, _d;
|
|
82
|
+
if (isModel) {
|
|
83
|
+
if (!isequal((_b = (_a = paramRef.current) === null || _a === void 0 ? void 0 : _a.params) === null || _b === void 0 ? void 0 : _b.where, where)) {
|
|
84
|
+
dataRef.current = { total: 0, records: [] };
|
|
85
|
+
fetchData({
|
|
86
|
+
params: { pageNo: 1, where },
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
if (!isequal((_d = (_c = paramRef.current) === null || _c === void 0 ? void 0 : _c.params) === null || _d === void 0 ? void 0 : _d.connectorParams, connectorParams)) {
|
|
92
|
+
dataRef.current = { total: 0, records: [] };
|
|
93
|
+
fetchData({
|
|
94
|
+
params: { pageNo: 1, connectorParams },
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
// 监听触底加载事件,这里面的 setLoading 用 setTimeout包裹起来,所以会先执行新的children渲染,再执行 loading
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
var _a, _b;
|
|
102
|
+
if (shouldBottomLoad && hasNextPage()) {
|
|
103
|
+
fetchData({
|
|
104
|
+
params: { pageNo: (((_b = (_a = paramRef.current) === null || _a === void 0 ? void 0 : _a.params) === null || _b === void 0 ? void 0 : _b.pageNo) || 1) + 1 },
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}, [shouldBottomLoad]);
|
|
108
|
+
// 触底监控对象
|
|
109
|
+
const nodeRefCallback = useCallback((node) => {
|
|
110
|
+
var _a;
|
|
111
|
+
if (node) {
|
|
112
|
+
(_a = observeRef.current) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
113
|
+
observeRef.current = new IntersectionObserver((entries) => {
|
|
114
|
+
setEntry(entries === null || entries === void 0 ? void 0 : entries[0]);
|
|
115
|
+
});
|
|
116
|
+
observeRef.current.observe(node);
|
|
117
|
+
}
|
|
118
|
+
}, []);
|
|
119
|
+
// 能否点击下一页
|
|
120
|
+
const hasNextPage = () => {
|
|
121
|
+
var _a;
|
|
122
|
+
const { pageNo = 1, pageSize = 5 } = ((_a = paramRef.current) === null || _a === void 0 ? void 0 : _a.params) || {};
|
|
123
|
+
const { total = 0 } = dataRef.current || {};
|
|
124
|
+
return pageNo * pageSize < total;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* 列表视图拉取数据
|
|
128
|
+
* 方法仅依赖入参和paramRef的参数
|
|
129
|
+
*/
|
|
130
|
+
const fetchData = async (param) => {
|
|
131
|
+
if (loading)
|
|
132
|
+
return;
|
|
133
|
+
setLoading(true);
|
|
134
|
+
// 合并参数
|
|
135
|
+
const fetchParam = {
|
|
136
|
+
...paramRef.current,
|
|
137
|
+
...param,
|
|
138
|
+
params: { ...paramRef.current.params, ...param === null || param === void 0 ? void 0 : param.params },
|
|
139
|
+
};
|
|
140
|
+
const { dataSourceName, methodName, params } = fetchParam;
|
|
141
|
+
const { orderBy, orderType, pageNo, pageSize, where, connectorParams } = params || {};
|
|
142
|
+
let tcbParams = {};
|
|
143
|
+
// tcb分页参数
|
|
144
|
+
if (!isNil(pageNo) && !isNil(pageSize)) {
|
|
145
|
+
tcbParams['pageNo'] = pageNo;
|
|
146
|
+
tcbParams['pageSize'] = pageSize;
|
|
147
|
+
}
|
|
148
|
+
if (isModel) {
|
|
149
|
+
// tcb排序参数
|
|
150
|
+
if (orderBy && ORDERTYPE.includes(orderType)) {
|
|
151
|
+
tcbParams['orderBy'] = orderBy;
|
|
152
|
+
tcbParams['orderType'] = orderType;
|
|
153
|
+
}
|
|
154
|
+
// tcb过滤参数
|
|
155
|
+
const whereEffected = [].concat(getWhereList(where));
|
|
156
|
+
whereEffected.length > 0 && (tcbParams['where'] = whereEffected);
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
tcbParams = Object.assign({}, tcbParams, connectorParams);
|
|
160
|
+
}
|
|
161
|
+
// tcb结果和事件
|
|
162
|
+
let data = [];
|
|
163
|
+
data = await (appCloud === null || appCloud === void 0 ? void 0 : appCloud.callDataSource({
|
|
164
|
+
dataSourceName,
|
|
165
|
+
methodName,
|
|
166
|
+
params: tcbParams,
|
|
167
|
+
}));
|
|
168
|
+
paramRef.current = fetchParam;
|
|
169
|
+
onEnvets(data);
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* 根据fetchData方法返回值,回调给外部事件
|
|
173
|
+
* datasource 是对象类型,所以总能拿到最新的值
|
|
174
|
+
*/
|
|
175
|
+
const onEnvets = (data) => {
|
|
176
|
+
var _a, _b, _c, _d, _e, _f;
|
|
177
|
+
const fetchRecords = [].concat(!isRecords && !isModel ? data : (data === null || data === void 0 ? void 0 : data.records) || []); //当数据详情调用连接器时,获取回调data数据
|
|
178
|
+
const total = (data === null || data === void 0 ? void 0 : data.total) || fetchRecords.length;
|
|
179
|
+
if (['loadMoreButton', 'bottomLoad'].includes(paramRef.current.pagination)) {
|
|
180
|
+
dataRef.current = {
|
|
181
|
+
total,
|
|
182
|
+
records: [...dataRef.current.records, ...fetchRecords],
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
dataRef.current = { total, records: fetchRecords };
|
|
187
|
+
}
|
|
188
|
+
(_a = events === null || events === void 0 ? void 0 : events.onDataChange) === null || _a === void 0 ? void 0 : _a.call(events, {
|
|
189
|
+
data: beforeDataChange(dataRef.current.records || []),
|
|
190
|
+
});
|
|
191
|
+
const eventDatSource = isModel
|
|
192
|
+
? datasource
|
|
193
|
+
: { ...bindConnectMetadata, ...connectorMethod };
|
|
194
|
+
if (JSON.stringify(data) === '{}') {
|
|
195
|
+
(_b = events === null || events === void 0 ? void 0 : events.queryFail) === null || _b === void 0 ? void 0 : _b.call(events, { datasource: eventDatSource });
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
if (total === 0) {
|
|
199
|
+
(_c = events === null || events === void 0 ? void 0 : events.queryEmpty) === null || _c === void 0 ? void 0 : _c.call(events, {
|
|
200
|
+
datasource: eventDatSource,
|
|
201
|
+
data: beforeDataChange([]),
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
(_d = events === null || events === void 0 ? void 0 : events.querySuccess) === null || _d === void 0 ? void 0 : _d.call(events, {
|
|
205
|
+
datasource: eventDatSource,
|
|
206
|
+
data: beforeDataChange(dataRef.current.records),
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
setPageNo(((_f = (_e = paramRef.current) === null || _e === void 0 ? void 0 : _e.params) === null || _f === void 0 ? void 0 : _f.pageNo) || 1);
|
|
210
|
+
window.setTimeout(() => setLoading(false));
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* 分页,加载更多
|
|
214
|
+
*/
|
|
215
|
+
const renderLoadMore = () => {
|
|
216
|
+
let disabled = !hasNextPage();
|
|
217
|
+
if (isIdeMockData) {
|
|
218
|
+
disabled = false;
|
|
219
|
+
}
|
|
220
|
+
return (!disabled &&
|
|
221
|
+
(loading ? (LoadingSymbol) : (React.createElement("div", { className: `${BLOCK_NAME}__more-text`, onClick: () => fetchData({ params: { pageNo: pageNo + 1 } }) }, "\u52A0\u8F7D\u66F4\u591A"))));
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* 分页,底部刷新
|
|
225
|
+
*/
|
|
226
|
+
const renderBottomLoad = () => {
|
|
227
|
+
return (React.createElement("div", { ref: nodeRefCallback, className: `${BLOCK_NAME}__bottom-load` }, loading ? LoadingSymbol : !hasNextPage() && LoadEnd));
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* 分页,分页器,含ideMockData的判断
|
|
231
|
+
*/
|
|
232
|
+
const renderPagination = () => {
|
|
233
|
+
var _a;
|
|
234
|
+
const preDisabeld = pageNo <= 1;
|
|
235
|
+
const nextDisabeld = !hasNextPage();
|
|
236
|
+
const total = ((_a = dataRef.current) === null || _a === void 0 ? void 0 : _a.total) || 0;
|
|
237
|
+
return (React.createElement("div", { className: `${BLOCK_NAME}__more-pagination` },
|
|
238
|
+
React.createElement("div", { className: classNames(`${BLOCK_NAME}__pagination-pre`, preDisabeld ? '' : 'active'), onClick: () => !preDisabeld && fetchData({ params: { pageNo: pageNo - 1 } }) }, "\u4E0A\u4E00\u9875"),
|
|
239
|
+
React.createElement("div", { className: classNames(`${BLOCK_NAME}__pagination-text`) },
|
|
240
|
+
React.createElement("span", { className: "active" }, isIdeMockData ? 1 : total ? pageNo : 0),
|
|
241
|
+
"/",
|
|
242
|
+
isIdeMockData ? 1 : Math.ceil(total / pageSize)),
|
|
243
|
+
React.createElement("div", { className: classNames(`${BLOCK_NAME}__pagination-next`, nextDisabeld ? '' : 'active'), onClick: () => !nextDisabeld && fetchData({ params: { pageNo: pageNo + 1 } }) }, "\u4E0B\u4E00\u9875")));
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* 加载中状态组件
|
|
247
|
+
*/
|
|
248
|
+
const LoadingSymbol = (React.createElement("div", { className: `${BLOCK_NAME}__more-symbol` },
|
|
249
|
+
React.createElement("div", { className: `${BLOCK_NAME}__symbol-item` }),
|
|
250
|
+
React.createElement("div", { className: `${BLOCK_NAME}__symbol-item` }),
|
|
251
|
+
React.createElement("div", { className: `${BLOCK_NAME}__symbol-item` })));
|
|
252
|
+
/**
|
|
253
|
+
* 加载到底状态组件
|
|
254
|
+
*/
|
|
255
|
+
const LoadEnd = React.createElement("div", null);
|
|
256
|
+
return (React.createElement("div", { ...rest, className: classNames('weda-ui', `${BLOCK_NAME}__containor`, className) },
|
|
257
|
+
children && (React.createElement("div", { className: template === 'cardList' ? `${BLOCK_NAME}-card` : '' }, children)),
|
|
258
|
+
React.createElement("div", { className: classNames(`${BLOCK_NAME}__more`, `${BLOCK_NAME}__more-${pagination}`) },
|
|
259
|
+
pagination === 'bottomLoad' && renderBottomLoad(),
|
|
260
|
+
pagination === 'loadMoreButton' && renderLoadMore(),
|
|
261
|
+
pagination === 'pagination' && renderPagination())));
|
|
262
|
+
}
|