@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
|
@@ -31,16 +31,13 @@ import Tabs from './components/tabs.json';
|
|
|
31
31
|
import Calendar from './components/calendar.json';
|
|
32
32
|
import NavLayout from './components/navLayout.json';
|
|
33
33
|
import WedaVideo from './components/wedaVideo.json';
|
|
34
|
-
|
|
35
34
|
import showToast from './actions/showToast.json';
|
|
36
35
|
import showModal from './actions/showModal.json';
|
|
37
|
-
|
|
38
36
|
import ListView from './components/listView.json';
|
|
39
37
|
import NavigationBar from './components/navigationBar.json';
|
|
40
38
|
import Line from './components/chart/line.json';
|
|
41
39
|
import Bar from './components/chart/bar.json';
|
|
42
40
|
import Pie from './components/chart/pie.json';
|
|
43
|
-
|
|
44
41
|
import DataView from './components/dataView.json';
|
|
45
42
|
import StatisticsCard from './components/chart/statisticsCard.json';
|
|
46
43
|
import GraphicCard from './components/graphicCard.json';
|
|
@@ -48,64 +45,61 @@ import Phone from './components/wxOpenApi/phone.json';
|
|
|
48
45
|
import PhoneCode from './components/wxOpenApi/phoneCode.json';
|
|
49
46
|
import Share from './components/wxOpenApi/share.json';
|
|
50
47
|
import UserInfo from './components/wxOpenApi/userInfo.json';
|
|
51
|
-
|
|
52
48
|
import Lottery from './components/lottery.json';
|
|
53
49
|
export const components = {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
50
|
+
Button,
|
|
51
|
+
Text,
|
|
52
|
+
Container,
|
|
53
|
+
Image,
|
|
54
|
+
// Picker,
|
|
55
|
+
// DatePicker,
|
|
56
|
+
// TimePicker,
|
|
57
|
+
Input,
|
|
58
|
+
Radio,
|
|
59
|
+
Checkbox,
|
|
60
|
+
Switch,
|
|
61
|
+
Form,
|
|
62
|
+
Textarea,
|
|
63
|
+
Location,
|
|
64
|
+
WedaVideo,
|
|
65
|
+
// Cells,
|
|
66
|
+
Select,
|
|
67
|
+
Auth,
|
|
68
|
+
Slot,
|
|
69
|
+
Uploader,
|
|
70
|
+
UploaderFile,
|
|
71
|
+
ScrollView,
|
|
72
|
+
Swiper,
|
|
73
|
+
Carousel,
|
|
74
|
+
// Label,
|
|
75
|
+
Tips,
|
|
76
|
+
Modal,
|
|
77
|
+
RichText,
|
|
78
|
+
RichTextView,
|
|
79
|
+
Link,
|
|
80
|
+
Drawer,
|
|
81
|
+
Tabs,
|
|
82
|
+
Calendar,
|
|
83
|
+
ListView,
|
|
84
|
+
DataView,
|
|
85
|
+
NavLayout,
|
|
86
|
+
NavigationBar,
|
|
87
|
+
Line,
|
|
88
|
+
Bar,
|
|
89
|
+
Pie,
|
|
90
|
+
StatisticsCard,
|
|
91
|
+
GraphicCard,
|
|
92
|
+
Phone,
|
|
93
|
+
PhoneCode,
|
|
94
|
+
Share,
|
|
95
|
+
UserInfo,
|
|
96
|
+
Lottery,
|
|
101
97
|
};
|
|
102
|
-
|
|
103
98
|
export const actions = {
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
showToast,
|
|
100
|
+
showModal,
|
|
106
101
|
};
|
|
107
|
-
|
|
108
102
|
export default {
|
|
109
|
-
|
|
110
|
-
|
|
103
|
+
components,
|
|
104
|
+
actions,
|
|
111
105
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ICompsConfig {
|
|
2
|
+
type: string;
|
|
3
|
+
name: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
'x-platforms': string[];
|
|
7
|
+
default: string;
|
|
8
|
+
platforms: string;
|
|
9
|
+
'x-index': number;
|
|
10
|
+
}
|
|
11
|
+
export declare type TCompsConfig = ICompsConfig;
|
|
12
|
+
export declare const sortBy: (props: any) => (a: any, b: any) => number;
|
|
13
|
+
export declare const objFormat: (args: any, type: any, origin: any) => any;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export const sortBy = (props) => {
|
|
2
|
+
return function (a, b) {
|
|
3
|
+
return a[props] - b[props];
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
export const objFormat = (args, type, origin) => {
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
8
|
+
//判断属性title值是否为拓展写法
|
|
9
|
+
const uuidReg = /(?<=text)\('(.*)(?=',)/;
|
|
10
|
+
let transformData = [];
|
|
11
|
+
for (const i in args) {
|
|
12
|
+
if (type && type == 'event') {
|
|
13
|
+
transformData.push({
|
|
14
|
+
name: origin == 'lowCode' ? (_a = args[i]) === null || _a === void 0 ? void 0 : _a.name : (_b = args[i]) === null || _b === void 0 ? void 0 : _b.title,
|
|
15
|
+
title: origin == 'lowCode' ? (_c = args[i]) === null || _c === void 0 ? void 0 : _c.eventName : (_d = args[i]) === null || _d === void 0 ? void 0 : _d.name,
|
|
16
|
+
description: ((_e = args[i]) === null || _e === void 0 ? void 0 : _e.remarks) || '-',
|
|
17
|
+
platforms: args[i]['x-platforms']
|
|
18
|
+
? args[i]['x-platforms'].indexOf('MP') > -1
|
|
19
|
+
? '小程序端'
|
|
20
|
+
: args[i]['x-platforms'].indexOf('WEB') > -1
|
|
21
|
+
? 'web端'
|
|
22
|
+
: '兼容三端'
|
|
23
|
+
: '兼容三端',
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
else if (type && type == 'attribute' && args[i].type != 'slot') {
|
|
27
|
+
if (((_f = args[i]) === null || _f === void 0 ? void 0 : _f.display) == false ||
|
|
28
|
+
((_g = args[i]) === null || _g === void 0 ? void 0 : _g.isReactNode) == true ||
|
|
29
|
+
args[i]['x-component'] == 'sub-category-title' ||
|
|
30
|
+
args[i]['x-component'] == 'Divider') {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
transformData.push({
|
|
34
|
+
code: i,
|
|
35
|
+
title: args[i].title.indexOf('{{') != -1
|
|
36
|
+
? (_h = args[i]) === null || _h === void 0 ? void 0 : _h.title.match(uuidReg)[1]
|
|
37
|
+
: (_j = args[i]) === null || _j === void 0 ? void 0 : _j.title,
|
|
38
|
+
description: ((_k = args[i]) === null || _k === void 0 ? void 0 : _k.remarks) || '-',
|
|
39
|
+
type: ((_l = args[i]) === null || _l === void 0 ? void 0 : _l.type) || '-',
|
|
40
|
+
default: JSON.stringify((_m = args[i]) === null || _m === void 0 ? void 0 : _m.default) || '-',
|
|
41
|
+
'x-index': args[i]['x-index'] ? args[i]['x-index'] : 999999,
|
|
42
|
+
'x-category': args[i]['x-category']
|
|
43
|
+
? args[i]['x-category']
|
|
44
|
+
: '基础属性',
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
else if (type && type == 'slot' && args[i].type == 'slot') {
|
|
48
|
+
transformData.push({
|
|
49
|
+
code: i,
|
|
50
|
+
title: (_o = args[i]) === null || _o === void 0 ? void 0 : _o.title,
|
|
51
|
+
description: ((_p = args[i]) === null || _p === void 0 ? void 0 : _p.description) || '-',
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (type && type == 'attribute')
|
|
56
|
+
transformData.sort(sortBy('x-index'));
|
|
57
|
+
if (type && type == 'attribute') {
|
|
58
|
+
transformData = groupByType(transformData, 'x-category');
|
|
59
|
+
}
|
|
60
|
+
return transformData;
|
|
61
|
+
};
|
|
62
|
+
function groupByType(arr, param) {
|
|
63
|
+
var _a, _b, _c;
|
|
64
|
+
const map = {};
|
|
65
|
+
const dest = [];
|
|
66
|
+
let structureMap = [];
|
|
67
|
+
let storgeType = [];
|
|
68
|
+
for (let i = 0; i < arr.length; i++) {
|
|
69
|
+
const ai = arr[i];
|
|
70
|
+
if (ai[param] && !map[ai[param]]) {
|
|
71
|
+
dest.push({
|
|
72
|
+
name: ai[param],
|
|
73
|
+
data: [ai],
|
|
74
|
+
});
|
|
75
|
+
map[ai[param]] = ai;
|
|
76
|
+
}
|
|
77
|
+
else if (!ai[param]) {
|
|
78
|
+
dest.push({
|
|
79
|
+
name: '基础属性',
|
|
80
|
+
data: [ai],
|
|
81
|
+
});
|
|
82
|
+
map[ai[param]] = ai;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
for (let j = 0; j < dest.length; j++) {
|
|
86
|
+
const dj = dest[j];
|
|
87
|
+
if (dj.name == ai[param]) {
|
|
88
|
+
dj.data.push(ai);
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
for (let k = 0; k < dest.length; k++) {
|
|
95
|
+
if (k == 0 && ((_a = dest[k]) === null || _a === void 0 ? void 0 : _a.name) != '基础属性') {
|
|
96
|
+
storgeType = storgeType.concat((_b = dest[k]) === null || _b === void 0 ? void 0 : _b.data);
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
structureMap = structureMap.concat((_c = dest[k]) === null || _c === void 0 ? void 0 : _c.data);
|
|
100
|
+
}
|
|
101
|
+
storgeType.length != 0 ? structureMap.push(...storgeType) : null;
|
|
102
|
+
return structureMap;
|
|
103
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './tableView.css';
|
|
3
|
+
export interface ComponentDocument {
|
|
4
|
+
exampleMap?: {
|
|
5
|
+
[key: string]: {
|
|
6
|
+
component: React.ComponentType;
|
|
7
|
+
code: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
codeMap?: {
|
|
11
|
+
[key: string]: {
|
|
12
|
+
code: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
data?: {
|
|
16
|
+
[key: string]: {
|
|
17
|
+
code: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface TableLayoutViewProps {
|
|
22
|
+
componentKey?: string;
|
|
23
|
+
document: ComponentDocument;
|
|
24
|
+
variables?: object;
|
|
25
|
+
}
|
|
26
|
+
export default function TableLayoutView({ componentKey, type, origin }: {
|
|
27
|
+
componentKey: any;
|
|
28
|
+
type: any;
|
|
29
|
+
origin: any;
|
|
30
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { components } from '../../configs/index';
|
|
3
|
+
import { objFormat } from './format';
|
|
4
|
+
import './tableView.css';
|
|
5
|
+
function createFragment(nodes) {
|
|
6
|
+
return React.createElement(React.Fragment, {}, ...nodes);
|
|
7
|
+
}
|
|
8
|
+
function getCompsMeta(key, type, origin) {
|
|
9
|
+
let compsMeta;
|
|
10
|
+
try {
|
|
11
|
+
let metaLowcode;
|
|
12
|
+
switch (origin) {
|
|
13
|
+
case 'lowCode':
|
|
14
|
+
metaLowcode = require('/docs/lowcode/components/wedaUI/lowcode-comps/weda_standard/comps/' +
|
|
15
|
+
key +
|
|
16
|
+
'.comp.json');
|
|
17
|
+
if (type && type == 'event') {
|
|
18
|
+
compsMeta = metaLowcode['emitEvents'];
|
|
19
|
+
}
|
|
20
|
+
else if (type && (type == 'attribute' || type == 'slot')) {
|
|
21
|
+
compsMeta = metaLowcode['dataForm'];
|
|
22
|
+
}
|
|
23
|
+
else if (type && type == 'description') {
|
|
24
|
+
compsMeta = metaLowcode['meta'];
|
|
25
|
+
}
|
|
26
|
+
return compsMeta;
|
|
27
|
+
case 'sourceCode':
|
|
28
|
+
if (type && type == 'event') {
|
|
29
|
+
compsMeta = components[key]['events'] || {};
|
|
30
|
+
}
|
|
31
|
+
else if (type && (type == 'attribute' || type == 'slot')) {
|
|
32
|
+
compsMeta = components[key]['data']['properties'] || {};
|
|
33
|
+
}
|
|
34
|
+
else if (type && type == 'description') {
|
|
35
|
+
compsMeta = components[key]['meta'] || {};
|
|
36
|
+
}
|
|
37
|
+
return compsMeta;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export default function TableLayoutView({ componentKey, type, origin }) {
|
|
45
|
+
var _a, _b, _c;
|
|
46
|
+
const compsMeta = getCompsMeta(componentKey, type, origin);
|
|
47
|
+
let tableView = [];
|
|
48
|
+
if (compsMeta && type != 'description') {
|
|
49
|
+
tableView = objFormat(compsMeta, type, origin);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
tableView.push(compsMeta);
|
|
53
|
+
}
|
|
54
|
+
return (React.createElement(React.Fragment, null,
|
|
55
|
+
type == 'attribute' && tableView.length > 0 && (React.createElement(React.Fragment, null,
|
|
56
|
+
React.createElement("div", { className: "tea-table__header" },
|
|
57
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
58
|
+
React.createElement("colgroup", null,
|
|
59
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
60
|
+
React.createElement("col", { style: { width: '10%' } }),
|
|
61
|
+
React.createElement("col", { style: { width: '15%' } }),
|
|
62
|
+
React.createElement("col", { style: { width: '25%' } }),
|
|
63
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
64
|
+
React.createElement("thead", null,
|
|
65
|
+
React.createElement("tr", null,
|
|
66
|
+
React.createElement("th", { className: "" },
|
|
67
|
+
React.createElement("div", null,
|
|
68
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u540D" }, "\u5C5E\u6027\u540D"))),
|
|
69
|
+
React.createElement("th", { className: "" },
|
|
70
|
+
React.createElement("div", null,
|
|
71
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u7C7B\u578B" }, "\u7C7B\u578B"))),
|
|
72
|
+
React.createElement("th", { className: "" },
|
|
73
|
+
React.createElement("div", null,
|
|
74
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u5206\u7EC4" }, "\u5C5E\u6027\u5206\u7EC4"))),
|
|
75
|
+
React.createElement("th", { className: "" },
|
|
76
|
+
React.createElement("div", null,
|
|
77
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u9ED8\u8BA4\u503C" }, "\u9ED8\u8BA4\u503C"))),
|
|
78
|
+
React.createElement("th", { className: "" },
|
|
79
|
+
React.createElement("div", null,
|
|
80
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u8BF4\u660E" }, "\u8BF4\u660E"))))))),
|
|
81
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
82
|
+
React.createElement("colgroup", null,
|
|
83
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
84
|
+
React.createElement("col", { style: { width: '10%' } }),
|
|
85
|
+
React.createElement("col", { style: { width: '15%' } }),
|
|
86
|
+
React.createElement("col", { style: { width: '25%' } }),
|
|
87
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
88
|
+
React.createElement("tbody", null, tableView.map((row, index) => (React.createElement("tr", { key: index },
|
|
89
|
+
React.createElement("td", null, row.title),
|
|
90
|
+
React.createElement("td", null,
|
|
91
|
+
React.createElement("code", null, row.type)),
|
|
92
|
+
React.createElement("td", null, row['x-category']),
|
|
93
|
+
React.createElement("td", null, row.default),
|
|
94
|
+
React.createElement("td", null, row.description)))))))),
|
|
95
|
+
type == 'slot' && tableView.length > 0 && (React.createElement(React.Fragment, null,
|
|
96
|
+
React.createElement("div", { className: "tea-table__header" },
|
|
97
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
98
|
+
React.createElement("colgroup", null,
|
|
99
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
100
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
101
|
+
React.createElement("thead", null,
|
|
102
|
+
React.createElement("tr", null,
|
|
103
|
+
React.createElement("th", { className: "" },
|
|
104
|
+
React.createElement("div", null,
|
|
105
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u540D" }, "\u540D\u79F0"))),
|
|
106
|
+
React.createElement("th", { className: "" },
|
|
107
|
+
React.createElement("div", null,
|
|
108
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u7C7B\u578B" }, "\u8BF4\u660E"))))))),
|
|
109
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
110
|
+
React.createElement("colgroup", null,
|
|
111
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
112
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
113
|
+
React.createElement("tbody", null, tableView.map((row, index) => (React.createElement("tr", { key: index },
|
|
114
|
+
React.createElement("td", null, row.code),
|
|
115
|
+
React.createElement("td", null, row.description)))))))),
|
|
116
|
+
type == 'event' && tableView.length > 0 && (React.createElement(React.Fragment, null,
|
|
117
|
+
React.createElement("div", { className: "tea-table__header" },
|
|
118
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
119
|
+
React.createElement("colgroup", null,
|
|
120
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
121
|
+
React.createElement("col", { style: { width: '25%' } }),
|
|
122
|
+
React.createElement("col", { style: { width: '16%' } }),
|
|
123
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
124
|
+
React.createElement("thead", null,
|
|
125
|
+
React.createElement("tr", null,
|
|
126
|
+
React.createElement("th", { className: "" },
|
|
127
|
+
React.createElement("div", null,
|
|
128
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u4E8B\u4EF6\u540D" }, "\u4E8B\u4EF6\u540D"))),
|
|
129
|
+
React.createElement("th", { className: "" },
|
|
130
|
+
React.createElement("div", null,
|
|
131
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u4E8B\u4EF6code" }, "\u4E8B\u4EF6code"))),
|
|
132
|
+
React.createElement("th", { className: "" },
|
|
133
|
+
React.createElement("div", null,
|
|
134
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u9002\u7528\u60C5\u51B5" }, "\u9002\u7528\u60C5\u51B5"))),
|
|
135
|
+
React.createElement("th", { className: "" },
|
|
136
|
+
React.createElement("div", null,
|
|
137
|
+
React.createElement("span", { className: "tea-text-overflow", title: "\u8BF4\u660E" }, "\u8BF4\u660E"))))))),
|
|
138
|
+
React.createElement("table", { className: "tea-table__box" },
|
|
139
|
+
React.createElement("colgroup", null,
|
|
140
|
+
React.createElement("col", { style: { width: '18%' } }),
|
|
141
|
+
React.createElement("col", { style: { width: '25%' } }),
|
|
142
|
+
React.createElement("col", { style: { width: '16%' } }),
|
|
143
|
+
React.createElement("col", { style: { width: 'auto' } })),
|
|
144
|
+
React.createElement("tbody", null, tableView.map((row, index) => (React.createElement("tr", { key: index },
|
|
145
|
+
React.createElement("td", null, row.name),
|
|
146
|
+
React.createElement("td", null,
|
|
147
|
+
React.createElement("code", null, row.title)),
|
|
148
|
+
React.createElement("td", null, row.platforms),
|
|
149
|
+
React.createElement("td", null, row.description)))))))),
|
|
150
|
+
type == 'description' && tableView.length > 0 && (React.createElement(React.Fragment, null,
|
|
151
|
+
React.createElement("h2", null,
|
|
152
|
+
React.createElement("a", { "aria-hidden": "true", className: "anchor enhancedAnchor_node_modules-@docusaurus-theme-classic-lib-next-theme-Heading-styles-module", id: "\u9002\u7528\u573A\u666F" }),
|
|
153
|
+
"\u9002\u7528\u573A\u666F",
|
|
154
|
+
React.createElement("a", { className: "hash-link", href: "#\u9002\u7528\u573A\u666F", title: "\u6807\u9898\u7684\u76F4\u63A5\u94FE\u63A5" }, "#")),
|
|
155
|
+
React.createElement("p", null, ((_a = tableView[0]) === null || _a === void 0 ? void 0 : _a.description)
|
|
156
|
+
? (_b = tableView[0]) === null || _b === void 0 ? void 0 : _b.description
|
|
157
|
+
: (_c = tableView[0]) === null || _c === void 0 ? void 0 : _c.desc))),
|
|
158
|
+
tableView.length == 0 && React.createElement("p", null, "\u65E0")));
|
|
159
|
+
}
|
package/dist/index.d.ts
ADDED
package/{src → dist}/index.js
RENAMED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require('regenerator-runtime');
|
|
2
|
+
Object.defineProperty(window, 'matchMedia', {
|
|
3
|
+
writable: true,
|
|
4
|
+
value: jest.fn().mockImplementation((query) => ({
|
|
5
|
+
matches: false,
|
|
6
|
+
media: query,
|
|
7
|
+
onchange: null,
|
|
8
|
+
addListener: jest.fn(),
|
|
9
|
+
removeListener: jest.fn(),
|
|
10
|
+
addEventListener: jest.fn(),
|
|
11
|
+
removeEventListener: jest.fn(),
|
|
12
|
+
dispatchEvent: jest.fn(),
|
|
13
|
+
})),
|
|
14
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as ReactDOM from 'react-dom';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { forwardRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
4
|
+
import { Modal, Button, Text, ConfigProvider } from 'tea-component';
|
|
5
|
+
import { noop } from '../../utils/constant';
|
|
6
|
+
const ModalShow = forwardRef(function ModalShow(props, ref) {
|
|
7
|
+
const [visible, setVisible] = useState(false);
|
|
8
|
+
// 渲染之后,马上显示
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
setVisible(true);
|
|
11
|
+
}, []);
|
|
12
|
+
// 实例 ref 到外部
|
|
13
|
+
useImperativeHandle(ref, () => ({ setVisible }));
|
|
14
|
+
return React.createElement(Modal, { ...props, visible: visible });
|
|
15
|
+
});
|
|
16
|
+
function show(options) {
|
|
17
|
+
const el = document.createElement('div');
|
|
18
|
+
const instanceRef = React.createRef();
|
|
19
|
+
ReactDOM.render(React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
|
|
20
|
+
React.createElement(ModalShow, { ...options, ref: instanceRef, onExited: () => ReactDOM.unmountComponentAtNode(el) })), el);
|
|
21
|
+
return {
|
|
22
|
+
destroy: () => {
|
|
23
|
+
if (instanceRef.current) {
|
|
24
|
+
instanceRef.current.setVisible(false);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export default async function showModal({ data }) {
|
|
30
|
+
const { title, content, showCancel, cancelText = '取消', cancelColor, confirmText = '确定', confirmColor, success = noop, fail = noop, complete = noop, } = data;
|
|
31
|
+
return new Promise((resolve) => {
|
|
32
|
+
const base = { cancel: false, confirm: false, content: null };
|
|
33
|
+
const modal = show({
|
|
34
|
+
caption: title,
|
|
35
|
+
children: (React.createElement(React.Fragment, null,
|
|
36
|
+
React.createElement(Modal.Body, null, content),
|
|
37
|
+
React.createElement(Modal.Footer, null,
|
|
38
|
+
React.createElement(Button
|
|
39
|
+
// type="primary"
|
|
40
|
+
, {
|
|
41
|
+
// type="primary"
|
|
42
|
+
onClick: () => {
|
|
43
|
+
resolve({ ...base, confirm: true });
|
|
44
|
+
modal.destroy();
|
|
45
|
+
} },
|
|
46
|
+
React.createElement(Text, { style: { color: confirmColor } }, confirmText)),
|
|
47
|
+
showCancel && (React.createElement(Button, { onClick: () => {
|
|
48
|
+
resolve({ ...base, cancel: true });
|
|
49
|
+
modal.destroy();
|
|
50
|
+
} },
|
|
51
|
+
React.createElement(Text, { style: { color: cancelColor } }, cancelText)))))),
|
|
52
|
+
onClose: () => {
|
|
53
|
+
resolve({ ...base, cancel: true });
|
|
54
|
+
modal.destroy();
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
}).then((res) => {
|
|
58
|
+
success && success(res);
|
|
59
|
+
return res;
|
|
60
|
+
}, (e) => {
|
|
61
|
+
// console.log(e);
|
|
62
|
+
fail && fail();
|
|
63
|
+
complete && complete();
|
|
64
|
+
throw e;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function showToast(): void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PropTypes from 'prop-types';
|
|
3
|
+
import classNames from '../../utils/classnames';
|
|
4
|
+
import { getCloudInstance } from '../../utils/tcb';
|
|
5
|
+
import { CloudbaseAuthenticator, onAuthUIStateChange, AUTHSTATE, LOGINTYPE, CloudbaseSignOut, } from '@cloudbase/ui-react';
|
|
6
|
+
export default function Auth({ className }) {
|
|
7
|
+
const cls = classNames({
|
|
8
|
+
[className]: className,
|
|
9
|
+
});
|
|
10
|
+
const [authState, setAuthState] = React.useState(AUTHSTATE.SIGNIN);
|
|
11
|
+
const [user, setUser] = React.useState({});
|
|
12
|
+
const [tcb, setTcb] = React.useState(undefined);
|
|
13
|
+
React.useEffect(() => {
|
|
14
|
+
async function createTcb() {
|
|
15
|
+
// 创建Tcb实例
|
|
16
|
+
const app = await getCloudInstance();
|
|
17
|
+
setTcb(app);
|
|
18
|
+
// console.log('<<<<<weda', app);
|
|
19
|
+
onAuthUIStateChange(app, (nextAuthState, authData) => {
|
|
20
|
+
// console.log('call');
|
|
21
|
+
// console.log('<<<<<nextAuthState', nextAuthState);
|
|
22
|
+
// console.log('<<<<<authData', authData);
|
|
23
|
+
setAuthState(nextAuthState);
|
|
24
|
+
setUser(authData);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
createTcb();
|
|
28
|
+
}, []);
|
|
29
|
+
// console.log('<<<<<<<wedaaaa', tcb);
|
|
30
|
+
return tcb ? (authState === AUTHSTATE.SIGNEDIN && user ? (React.createElement("div", { className: cls },
|
|
31
|
+
React.createElement("header", { className: "tcb-header" },
|
|
32
|
+
React.createElement(CloudbaseSignOut, { app: tcb })))) : (React.createElement("div", { className: cls },
|
|
33
|
+
React.createElement(CloudbaseAuthenticator, { userLoginType: LOGINTYPE.PHONE, isUsePassword: false, app: tcb })))) : null;
|
|
34
|
+
}
|
|
35
|
+
Auth.propTypes = {
|
|
36
|
+
className: PropTypes.string,
|
|
37
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CommonPropsType } from '../../types';
|
|
3
|
+
import './index.css';
|
|
4
|
+
declare const Button: ({ text, size, type, contentSlot, formType, loading, disabled, events, className, style, id, }: PropsType) => JSX.Element;
|
|
5
|
+
export interface PropsType extends CommonPropsType {
|
|
6
|
+
/**
|
|
7
|
+
* 内容
|
|
8
|
+
*/
|
|
9
|
+
text?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 样式类型
|
|
12
|
+
*/
|
|
13
|
+
type?: 'primary' | 'warn' | 'wechat' | 'default';
|
|
14
|
+
/**
|
|
15
|
+
* 大小
|
|
16
|
+
*/
|
|
17
|
+
size?: 'default' | 'mini' | 'large';
|
|
18
|
+
/**
|
|
19
|
+
* 是否禁用
|
|
20
|
+
*/
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 加载中
|
|
24
|
+
*/
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 用于 form 类型
|
|
28
|
+
*/
|
|
29
|
+
formType?: 'button' | 'submit' | 'reset';
|
|
30
|
+
contentSlot?: string;
|
|
31
|
+
}
|
|
32
|
+
export default Button;
|