@trionesdev/antd-mobile-react 0.0.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/ActionSheet/demo/base.d.ts +3 -0
- package/dist/ActionSheet/demo/base.js +39 -0
- package/dist/ActionSheet/index.d.ts +3 -0
- package/dist/ActionSheet/index.js +2 -0
- package/dist/Alert/demo/base.d.ts +3 -0
- package/dist/Alert/demo/base.js +56 -0
- package/dist/Alert/index.d.ts +3 -0
- package/dist/Alert/index.js +2 -0
- package/dist/Avatar/demo/base.d.ts +7 -0
- package/dist/Avatar/demo/base.js +109 -0
- package/dist/Avatar/demo/style.scss +6 -0
- package/dist/Avatar/index.d.ts +3 -0
- package/dist/Avatar/index.js +2 -0
- package/dist/Badge/demo/base.d.ts +7 -0
- package/dist/Badge/demo/base.js +167 -0
- package/dist/Badge/demo/base.scss +6 -0
- package/dist/Badge/index.d.ts +3 -0
- package/dist/Badge/index.js +2 -0
- package/dist/Button/button.d.ts +53 -0
- package/dist/Button/button.js +66 -0
- package/dist/Button/demo/base.d.ts +3 -0
- package/dist/Button/demo/base.js +163 -0
- package/dist/Button/index.d.ts +3 -0
- package/dist/Button/index.js +2 -0
- package/dist/Button/style.scss +231 -0
- package/dist/Calendar/calendar-grid.d.ts +27 -0
- package/dist/Calendar/calendar-grid.js +164 -0
- package/dist/Calendar/calendar-header.d.ts +7 -0
- package/dist/Calendar/calendar-header.js +42 -0
- package/dist/Calendar/calendar-range.d.ts +10 -0
- package/dist/Calendar/calendar-range.js +57 -0
- package/dist/Calendar/calendar.d.ts +10 -0
- package/dist/Calendar/calendar.js +49 -0
- package/dist/Calendar/demo/calendar.d.ts +3 -0
- package/dist/Calendar/demo/calendar.js +10 -0
- package/dist/Calendar/demo/grid.d.ts +3 -0
- package/dist/Calendar/demo/grid.js +12 -0
- package/dist/Calendar/demo/touch-grid.d.ts +3 -0
- package/dist/Calendar/demo/touch-grid.js +8 -0
- package/dist/Calendar/index.d.ts +11 -0
- package/dist/Calendar/index.js +8 -0
- package/dist/Calendar/style.scss +85 -0
- package/dist/Calendar/touchable-calendar-grid.d.ts +14 -0
- package/dist/Calendar/touchable-calendar-grid.js +395 -0
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +10 -0
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.js +156 -0
- package/dist/CalendarDatetimePicker/DateTimeSwitch.d.ts +14 -0
- package/dist/CalendarDatetimePicker/DateTimeSwitch.js +39 -0
- package/dist/CalendarDatetimePicker/demo/base.d.ts +3 -0
- package/dist/CalendarDatetimePicker/demo/base.js +41 -0
- package/dist/CalendarDatetimePicker/index.d.ts +3 -0
- package/dist/CalendarDatetimePicker/index.js +2 -0
- package/dist/CalendarDatetimePicker/style.scss +54 -0
- package/dist/CalendarDatetimePicker/types.d.ts +5 -0
- package/dist/CalendarDatetimePicker/types.js +6 -0
- package/dist/CalendarPicker/calendar-picker.d.ts +4 -0
- package/dist/CalendarPicker/calendar-picker.js +87 -0
- package/dist/CalendarPicker/calendar-range-picker.d.ts +4 -0
- package/dist/CalendarPicker/calendar-range-picker.js +87 -0
- package/dist/CalendarPicker/demo/base.d.ts +3 -0
- package/dist/CalendarPicker/demo/base.js +66 -0
- package/dist/CalendarPicker/index.d.ts +9 -0
- package/dist/CalendarPicker/index.js +5 -0
- package/dist/CalendarPicker/style.scss +31 -0
- package/dist/CalendarPicker/types.d.ts +21 -0
- package/dist/CalendarPicker/types.js +1 -0
- package/dist/Card/demo/base.d.ts +4 -0
- package/dist/Card/demo/base.js +65 -0
- package/dist/Card/demo/base.scss +18 -0
- package/dist/Card/index.d.ts +3 -0
- package/dist/Card/index.js +2 -0
- package/dist/CascaderPicker/demo/base.d.ts +3 -0
- package/dist/CascaderPicker/demo/base.js +85 -0
- package/dist/CascaderPicker/index.d.ts +3 -0
- package/dist/CascaderPicker/index.js +2 -0
- package/dist/CascaderView/demo/async.d.ts +3 -0
- package/dist/CascaderView/demo/async.js +41 -0
- package/dist/CascaderView/demo/base.d.ts +3 -0
- package/dist/CascaderView/demo/base.js +62 -0
- package/dist/CascaderView/demo/value.d.ts +3 -0
- package/dist/CascaderView/demo/value.js +63 -0
- package/dist/CascaderView/index.d.ts +3 -0
- package/dist/CascaderView/index.js +2 -0
- package/dist/Cell/demo/base.d.ts +3 -0
- package/dist/Cell/demo/base.js +13 -0
- package/dist/Cell/index.d.ts +3 -0
- package/dist/Cell/index.js +2 -0
- package/dist/Checkbox/demo/base.d.ts +6 -0
- package/dist/Checkbox/demo/base.js +43 -0
- package/dist/Checkbox/demo/disabled.d.ts +3 -0
- package/dist/Checkbox/demo/disabled.js +19 -0
- package/dist/Checkbox/index.d.ts +3 -0
- package/dist/Checkbox/index.js +2 -0
- package/dist/ConfigProvider/demo/base.d.ts +6 -0
- package/dist/ConfigProvider/demo/base.js +24 -0
- package/dist/ConfigProvider/index.d.ts +3 -0
- package/dist/ConfigProvider/index.js +2 -0
- package/dist/DemoBlock/index.d.ts +10 -0
- package/dist/DemoBlock/index.js +15 -0
- package/dist/DemoBlock/index.scss +20 -0
- package/dist/DemoDescription/index.d.ts +6 -0
- package/dist/DemoDescription/index.js +7 -0
- package/dist/DemoDescription/index.scss +3 -0
- package/dist/Descriptions/demo/base.d.ts +3 -0
- package/dist/Descriptions/demo/base.js +102 -0
- package/dist/Descriptions/demo/vertical.d.ts +3 -0
- package/dist/Descriptions/demo/vertical.js +70 -0
- package/dist/Descriptions/index.d.ts +3 -0
- package/dist/Descriptions/index.js +2 -0
- package/dist/Divider/demo/base.d.ts +3 -0
- package/dist/Divider/demo/base.js +35 -0
- package/dist/Divider/index.d.ts +3 -0
- package/dist/Divider/index.js +2 -0
- package/dist/Ellipsis/demo/base.d.ts +3 -0
- package/dist/Ellipsis/demo/base.js +81 -0
- package/dist/Ellipsis/index.d.ts +3 -0
- package/dist/Ellipsis/index.js +2 -0
- package/dist/Empty/demo/base.d.ts +3 -0
- package/dist/Empty/demo/base.js +38 -0
- package/dist/Empty/index.d.ts +3 -0
- package/dist/Empty/index.js +2 -0
- package/dist/ErrorBlock/demo/base.d.ts +3 -0
- package/dist/ErrorBlock/demo/base.js +23 -0
- package/dist/ErrorBlock/index.d.ts +4 -0
- package/dist/ErrorBlock/index.js +3 -0
- package/dist/Footer/demo/base.d.ts +6 -0
- package/dist/Footer/demo/base.js +81 -0
- package/dist/Footer/index.d.ts +3 -0
- package/dist/Footer/index.js +2 -0
- package/dist/Form/demo/base.d.ts +3 -0
- package/dist/Form/demo/base.js +99 -0
- package/dist/Form/demo/input.d.ts +3 -0
- package/dist/Form/demo/input.js +39 -0
- package/dist/Form/index.d.ts +3 -0
- package/dist/Form/index.js +2 -0
- package/dist/Grid/demo/base.d.ts +7 -0
- package/dist/Grid/demo/base.js +46 -0
- package/dist/Grid/demo/base.scss +7 -0
- package/dist/Grid/index.d.ts +3 -0
- package/dist/Grid/index.js +2 -0
- package/dist/Icon/check-icon.d.ts +3 -0
- package/dist/Icon/check-icon.js +10 -0
- package/dist/Icon/demo/base.d.ts +6 -0
- package/dist/Icon/demo/base.js +41 -0
- package/dist/Image/broken-image-icon.d.ts +2 -0
- package/dist/Image/broken-image-icon.js +11 -0
- package/dist/Image/demo/base.d.ts +4 -0
- package/dist/Image/demo/base.js +101 -0
- package/dist/Image/demo/base.scss +4 -0
- package/dist/Image/image-icon.d.ts +2 -0
- package/dist/Image/image-icon.js +11 -0
- package/dist/Image/image.d.ts +19 -0
- package/dist/Image/image.js +113 -0
- package/dist/Image/index.d.ts +4 -0
- package/dist/Image/index.js +3 -0
- package/dist/Image/lazy-detector.d.ts +6 -0
- package/dist/Image/lazy-detector.js +22 -0
- package/dist/Image/style.scss +30 -0
- package/dist/ImagesPreview/ImagesPreview.d.ts +12 -0
- package/dist/ImagesPreview/ImagesPreview.js +83 -0
- package/dist/ImagesPreview/demo/base.d.ts +3 -0
- package/dist/ImagesPreview/demo/base.js +30 -0
- package/dist/ImagesPreview/index.d.ts +3 -0
- package/dist/ImagesPreview/index.js +2 -0
- package/dist/ImagesPreview/style.scss +34 -0
- package/dist/ImagesWall/CameraModal.d.ts +6 -0
- package/dist/ImagesWall/CameraModal.js +23 -0
- package/dist/ImagesWall/ImagesWall.d.ts +29 -0
- package/dist/ImagesWall/ImagesWall.js +225 -0
- package/dist/ImagesWall/demo/base.d.ts +3 -0
- package/dist/ImagesWall/demo/base.js +29 -0
- package/dist/ImagesWall/index.d.ts +3 -0
- package/dist/ImagesWall/index.js +2 -0
- package/dist/ImagesWall/style.scss +70 -0
- package/dist/Input/demo/base.d.ts +3 -0
- package/dist/Input/demo/base.js +29 -0
- package/dist/Input/index.d.ts +3 -0
- package/dist/Input/index.js +2 -0
- package/dist/InputNumber/demo/base.d.ts +3 -0
- package/dist/InputNumber/demo/base.js +13 -0
- package/dist/InputNumber/index.d.ts +3 -0
- package/dist/InputNumber/index.js +2 -0
- package/dist/Mask/demo/base.d.ts +3 -0
- package/dist/Mask/demo/base.js +29 -0
- package/dist/Mask/index.d.ts +3 -0
- package/dist/Mask/index.js +2 -0
- package/dist/NavBar/demo/base.d.ts +4 -0
- package/dist/NavBar/demo/base.js +70 -0
- package/dist/NavBar/demo/base.scss +5 -0
- package/dist/NavBar/index.d.ts +3 -0
- package/dist/NavBar/index.js +2 -0
- package/dist/NoticeBar/demo/base.d.ts +3 -0
- package/dist/NoticeBar/demo/base.js +90 -0
- package/dist/NoticeBar/index.d.ts +3 -0
- package/dist/NoticeBar/index.js +2 -0
- package/dist/PageIndicator/demo/base.d.ts +3 -0
- package/dist/PageIndicator/demo/base.js +41 -0
- package/dist/PageIndicator/index.d.ts +3 -0
- package/dist/PageIndicator/index.js +2 -0
- package/dist/Picker/demo/base.d.ts +3 -0
- package/dist/Picker/demo/base.js +56 -0
- package/dist/Picker/index.d.ts +3 -0
- package/dist/Picker/index.js +2 -0
- package/dist/PickerView/demo/base.d.ts +3 -0
- package/dist/PickerView/demo/base.js +36 -0
- package/dist/PickerView/index.d.ts +3 -0
- package/dist/PickerView/index.js +2 -0
- package/dist/Popup/demo/base.d.ts +3 -0
- package/dist/Popup/demo/base.js +99 -0
- package/dist/Popup/index.d.ts +3 -0
- package/dist/Popup/index.js +2 -0
- package/dist/Progress/Progress.d.ts +37 -0
- package/dist/Progress/Progress.js +52 -0
- package/dist/Progress/ProgressCircle.d.ts +17 -0
- package/dist/Progress/ProgressCircle.js +148 -0
- package/dist/Progress/ProgressLine.d.ts +15 -0
- package/dist/Progress/ProgressLine.js +87 -0
- package/dist/Progress/demo/base.d.ts +3 -0
- package/dist/Progress/demo/base.js +73 -0
- package/dist/Progress/index.d.ts +3 -0
- package/dist/Progress/index.js +2 -0
- package/dist/Progress/style.scss +33 -0
- package/dist/Progress/types.d.ts +4 -0
- package/dist/Progress/types.js +2 -0
- package/dist/Radio/demo/base.d.ts +4 -0
- package/dist/Radio/demo/base.js +85 -0
- package/dist/Radio/demo/base.scss +4 -0
- package/dist/Radio/index.d.ts +3 -0
- package/dist/Radio/index.js +2 -0
- package/dist/Rate/demo/base.d.ts +3 -0
- package/dist/Rate/demo/base.js +59 -0
- package/dist/Rate/index.d.ts +3 -0
- package/dist/Rate/index.js +2 -0
- package/dist/Result/demo/base.d.ts +3 -0
- package/dist/Result/demo/base.js +57 -0
- package/dist/Result/index.d.ts +3 -0
- package/dist/Result/index.js +2 -0
- package/dist/SafeArea/demo/base.d.ts +3 -0
- package/dist/SafeArea/demo/base.js +17 -0
- package/dist/SafeArea/demo/base.scss +18 -0
- package/dist/SafeArea/index.d.ts +3 -0
- package/dist/SafeArea/index.js +2 -0
- package/dist/Scaffold/demo/base.d.ts +3 -0
- package/dist/Scaffold/demo/base.js +30 -0
- package/dist/Scaffold/index.d.ts +3 -0
- package/dist/Scaffold/index.js +2 -0
- package/dist/ScrollView/demo/base.d.ts +3 -0
- package/dist/ScrollView/demo/base.js +43 -0
- package/dist/ScrollView/index.d.ts +3 -0
- package/dist/ScrollView/index.js +2 -0
- package/dist/SideBar/SideBarContext.d.ts +18 -0
- package/dist/SideBar/SideBarContext.js +2 -0
- package/dist/SideBar/demo/base.d.ts +3 -0
- package/dist/SideBar/demo/base.js +54 -0
- package/dist/SideBar/demo/default-active.d.ts +3 -0
- package/dist/SideBar/demo/default-active.js +34 -0
- package/dist/SideBar/demo/scroll-mode.d.ts +3 -0
- package/dist/SideBar/demo/scroll-mode.js +55 -0
- package/dist/SideBar/index.d.ts +3 -0
- package/dist/SideBar/index.js +2 -0
- package/dist/SideBar/side-bar.d.ts +25 -0
- package/dist/SideBar/side-bar.js +351 -0
- package/dist/SideBar/style.scss +85 -0
- package/dist/SideBar/types.d.ts +7 -0
- package/dist/SideBar/types.js +1 -0
- package/dist/Space/demo/base.d.ts +3 -0
- package/dist/Space/demo/base.js +120 -0
- package/dist/Space/index.d.ts +3 -0
- package/dist/Space/index.js +2 -0
- package/dist/SpinLoading/demo/base.d.ts +3 -0
- package/dist/SpinLoading/demo/base.js +21 -0
- package/dist/SpinLoading/index.d.ts +3 -0
- package/dist/SpinLoading/index.js +2 -0
- package/dist/Steps/demo/base.d.ts +3 -0
- package/dist/Steps/demo/base.js +71 -0
- package/dist/Steps/index.d.ts +3 -0
- package/dist/Steps/index.js +2 -0
- package/dist/Swiper/Swiper.d.ts +10 -0
- package/dist/Swiper/Swiper.js +22 -0
- package/dist/Swiper/SwiperCore.d.ts +23 -0
- package/dist/Swiper/SwiperCore.js +272 -0
- package/dist/Swiper/demo/base.d.ts +3 -0
- package/dist/Swiper/demo/base.js +122 -0
- package/dist/Swiper/index.d.ts +8 -0
- package/dist/Swiper/index.js +5 -0
- package/dist/Swiper/style.scss +54 -0
- package/dist/Switch/demo/base.d.ts +3 -0
- package/dist/Switch/demo/base.js +108 -0
- package/dist/Switch/index.d.ts +3 -0
- package/dist/Switch/index.js +2 -0
- package/dist/TabBar/demo/base.d.ts +6 -0
- package/dist/TabBar/demo/base.js +26 -0
- package/dist/TabBar/index.d.ts +3 -0
- package/dist/TabBar/index.js +2 -0
- package/dist/Tabs/demo/base.d.ts +3 -0
- package/dist/Tabs/demo/base.js +59 -0
- package/dist/Tabs/index.d.ts +3 -0
- package/dist/Tabs/index.js +2 -0
- package/dist/Tag/demo/base.d.ts +7 -0
- package/dist/Tag/demo/base.js +67 -0
- package/dist/Tag/demo/style.scss +8 -0
- package/dist/Tag/index.d.ts +3 -0
- package/dist/Tag/index.js +2 -0
- package/dist/Toast/demo/base.d.ts +3 -0
- package/dist/Toast/demo/base.js +121 -0
- package/dist/Toast/demo/component-mode.d.ts +3 -0
- package/dist/Toast/demo/component-mode.js +32 -0
- package/dist/Toast/index.d.ts +8 -0
- package/dist/Toast/index.js +4 -0
- package/dist/Toast/style.scss +63 -0
- package/dist/Toast/toast-modal.d.ts +18 -0
- package/dist/Toast/toast-modal.js +112 -0
- package/dist/Toast/toast.d.ts +20 -0
- package/dist/Toast/toast.js +112 -0
- package/dist/VerificationCodeInput/demo/base.d.ts +3 -0
- package/dist/VerificationCodeInput/demo/base.js +11 -0
- package/dist/VerificationCodeInput/index.d.ts +3 -0
- package/dist/VerificationCodeInput/index.js +2 -0
- package/dist/WaterMark/demo/demo1.d.ts +7 -0
- package/dist/WaterMark/demo/demo1.js +47 -0
- package/dist/WaterMark/demo/demo1.scss +6 -0
- package/dist/WaterMark/demo/demo2.d.ts +3 -0
- package/dist/WaterMark/demo/demo2.js +31 -0
- package/dist/WaterMark/index.d.ts +3 -0
- package/dist/WaterMark/index.js +2 -0
- package/dist/index.d.ts +106 -0
- package/dist/index.js +53 -0
- package/dist/locales/base.d.ts +139 -0
- package/dist/locales/base.js +139 -0
- package/dist/locales/en-US.d.ts +139 -0
- package/dist/locales/en-US.js +4 -0
- package/dist/locales/zh-CN.d.ts +3 -0
- package/dist/locales/zh-CN.js +140 -0
- package/dist/types.d.ts +8 -0
- package/dist/types.js +1 -0
- package/dist/utils/attach-properties-to-component.d.ts +1 -0
- package/dist/utils/attach-properties-to-component.js +9 -0
- package/dist/utils/bound.d.ts +1 -0
- package/dist/utils/bound.js +10 -0
- package/dist/utils/can-use-dom.d.ts +1 -0
- package/dist/utils/can-use-dom.js +1 -0
- package/dist/utils/convert-px.d.ts +1 -0
- package/dist/utils/convert-px.js +27 -0
- package/dist/utils/datetime-utils.d.ts +3 -0
- package/dist/utils/datetime-utils.js +18 -0
- package/dist/utils/dev-log.d.ts +3 -0
- package/dist/utils/dev-log.js +36 -0
- package/dist/utils/get-container.d.ts +2 -0
- package/dist/utils/get-container.js +4 -0
- package/dist/utils/get-scroll-parent.d.ts +3 -0
- package/dist/utils/get-scroll-parent.js +23 -0
- package/dist/utils/is-dev.d.ts +1 -0
- package/dist/utils/is-dev.js +1 -0
- package/dist/utils/lang.d.ts +1 -0
- package/dist/utils/lang.js +1 -0
- package/dist/utils/matrix.d.ts +10 -0
- package/dist/utils/matrix.js +37 -0
- package/dist/utils/merge-locale.d.ts +1 -0
- package/dist/utils/merge-locale.js +16 -0
- package/dist/utils/native-props.d.ts +10 -0
- package/dist/utils/native-props.js +39 -0
- package/dist/utils/random-utils.d.ts +3 -0
- package/dist/utils/random-utils.js +13 -0
- package/dist/utils/reactNode.d.ts +7 -0
- package/dist/utils/reactNode.js +13 -0
- package/dist/utils/render-imperatively.d.ts +14 -0
- package/dist/utils/render-imperatively.js +105 -0
- package/dist/utils/render-to-body.d.ts +2 -0
- package/dist/utils/render-to-body.js +13 -0
- package/dist/utils/render-to-container.d.ts +3 -0
- package/dist/utils/render-to-container.js +10 -0
- package/dist/utils/render.d.ts +9 -0
- package/dist/utils/render.js +87 -0
- package/dist/utils/rubberband.d.ts +2 -0
- package/dist/utils/rubberband.js +11 -0
- package/dist/utils/should-render.d.ts +10 -0
- package/dist/utils/should-render.js +12 -0
- package/dist/utils/supports-passive.d.ts +1 -0
- package/dist/utils/supports-passive.js +13 -0
- package/dist/utils/to-css-length.d.ts +1 -0
- package/dist/utils/to-css-length.js +3 -0
- package/dist/utils/type.d.ts +65 -0
- package/dist/utils/type.js +48 -0
- package/dist/utils/use-initialized.d.ts +1 -0
- package/dist/utils/use-initialized.js +8 -0
- package/dist/utils/use-isomorphic-update-layout-effect.d.ts +2 -0
- package/dist/utils/use-isomorphic-update-layout-effect.js +2 -0
- package/dist/utils/use-lock-scroll.d.ts +2 -0
- package/dist/utils/use-lock-scroll.js +81 -0
- package/dist/utils/use-mutation-effect.d.ts +3 -0
- package/dist/utils/use-mutation-effect.js +26 -0
- package/dist/utils/use-props-value.d.ts +8 -0
- package/dist/utils/use-props-value.js +22 -0
- package/dist/utils/use-resize-effect.d.ts +2 -0
- package/dist/utils/use-resize-effect.js +23 -0
- package/dist/utils/use-touch.d.ts +17 -0
- package/dist/utils/use-touch.js +63 -0
- package/dist/utils/validate.d.ts +1 -0
- package/dist/utils/validate.js +4 -0
- package/dist/utils/with-default-props.d.ts +9 -0
- package/dist/utils/with-default-props.js +33 -0
- package/dist/utils/with-stop-propagation.d.ts +4 -0
- package/dist/utils/with-stop-propagation.js +38 -0
- package/dist/utils/zIndex.d.ts +1 -0
- package/dist/utils/zIndex.js +4 -0
- package/dist/utils/zindexContext.d.ts +3 -0
- package/dist/utils/zindexContext.js +6 -0
- package/package.json +104 -0
- package/readme.md +43 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
3
|
+
import Swiper from "../index";
|
|
4
|
+
import Image from "../../Image";
|
|
5
|
+
export default (function () {
|
|
6
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
7
|
+
title: "\u57FA\u672C\u4F7F\u7528"
|
|
8
|
+
}, /*#__PURE__*/React.createElement(Swiper, {
|
|
9
|
+
height: 150,
|
|
10
|
+
items: [{
|
|
11
|
+
children: /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
style: {
|
|
13
|
+
height: '100%',
|
|
14
|
+
width: '100%',
|
|
15
|
+
background: 'red',
|
|
16
|
+
display: 'flex',
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
alignItems: 'center'
|
|
19
|
+
}
|
|
20
|
+
}, "1")
|
|
21
|
+
}, {
|
|
22
|
+
children: /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
style: {
|
|
24
|
+
height: '100%',
|
|
25
|
+
width: '100%',
|
|
26
|
+
background: 'green',
|
|
27
|
+
display: 'flex',
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
alignItems: 'center'
|
|
30
|
+
}
|
|
31
|
+
}, "2")
|
|
32
|
+
}, {
|
|
33
|
+
children: /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
style: {
|
|
35
|
+
height: '100%',
|
|
36
|
+
width: '100%',
|
|
37
|
+
background: 'yellow',
|
|
38
|
+
display: 'flex',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
alignItems: 'center'
|
|
41
|
+
}
|
|
42
|
+
}, "3")
|
|
43
|
+
}, {
|
|
44
|
+
children: /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
style: {
|
|
46
|
+
height: '100%',
|
|
47
|
+
width: '100%',
|
|
48
|
+
background: 'blue',
|
|
49
|
+
display: 'flex',
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
alignItems: 'center'
|
|
52
|
+
}
|
|
53
|
+
}, "4")
|
|
54
|
+
}]
|
|
55
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
56
|
+
title: "\u57FA\u672C\u4F7F\u7528\u7EB5\u5411"
|
|
57
|
+
}, /*#__PURE__*/React.createElement(Swiper, {
|
|
58
|
+
height: 150,
|
|
59
|
+
direction: 'vertical',
|
|
60
|
+
items: [{
|
|
61
|
+
children: /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
style: {
|
|
63
|
+
height: '100%',
|
|
64
|
+
width: '100%',
|
|
65
|
+
background: 'red',
|
|
66
|
+
display: 'flex',
|
|
67
|
+
justifyContent: 'center',
|
|
68
|
+
alignItems: 'center'
|
|
69
|
+
}
|
|
70
|
+
}, "1")
|
|
71
|
+
}, {
|
|
72
|
+
children: /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
style: {
|
|
74
|
+
height: '100%',
|
|
75
|
+
width: '100%',
|
|
76
|
+
background: 'green',
|
|
77
|
+
display: 'flex',
|
|
78
|
+
justifyContent: 'center',
|
|
79
|
+
alignItems: 'center'
|
|
80
|
+
}
|
|
81
|
+
}, "2")
|
|
82
|
+
}, {
|
|
83
|
+
children: /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
style: {
|
|
85
|
+
height: '100%',
|
|
86
|
+
width: '100%',
|
|
87
|
+
background: 'yellow',
|
|
88
|
+
display: 'flex',
|
|
89
|
+
justifyContent: 'center',
|
|
90
|
+
alignItems: 'center'
|
|
91
|
+
}
|
|
92
|
+
}, "3")
|
|
93
|
+
}, {
|
|
94
|
+
children: /*#__PURE__*/React.createElement("div", {
|
|
95
|
+
style: {
|
|
96
|
+
height: '100%',
|
|
97
|
+
width: '100%',
|
|
98
|
+
background: 'blue',
|
|
99
|
+
display: 'flex',
|
|
100
|
+
justifyContent: 'center',
|
|
101
|
+
alignItems: 'center'
|
|
102
|
+
}
|
|
103
|
+
}, "4")
|
|
104
|
+
}]
|
|
105
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
106
|
+
title: "\u57FA\u672C\u4F7F\u7528\u7EB5\u5411"
|
|
107
|
+
}, /*#__PURE__*/React.createElement(Swiper, {
|
|
108
|
+
height: 150
|
|
109
|
+
}, /*#__PURE__*/React.createElement(Swiper.Item, null, /*#__PURE__*/React.createElement(Image, {
|
|
110
|
+
width: '100%',
|
|
111
|
+
height: "100%",
|
|
112
|
+
src: "https://storage.360buyimg.com/jdc-article/fristfabu.jpg"
|
|
113
|
+
})), /*#__PURE__*/React.createElement(Swiper.Item, null, /*#__PURE__*/React.createElement(Image, {
|
|
114
|
+
width: '100%',
|
|
115
|
+
height: "100%",
|
|
116
|
+
src: "https://storage.360buyimg.com/jdc-article/welcomenutui.jpg"
|
|
117
|
+
})), /*#__PURE__*/React.createElement(Swiper.Item, null, /*#__PURE__*/React.createElement(Image, {
|
|
118
|
+
width: '100%',
|
|
119
|
+
height: "100%",
|
|
120
|
+
src: "https://storage.360buyimg.com/jdc-article/NutUItaro2.jpg"
|
|
121
|
+
})))));
|
|
122
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Swiper as InternalSwiper, SwiperProps } from "./Swiper";
|
|
2
|
+
import { SwiperCoreItem } from "./SwiperCore";
|
|
3
|
+
type CompoundedComponent = typeof InternalSwiper & {
|
|
4
|
+
Item: typeof SwiperCoreItem;
|
|
5
|
+
};
|
|
6
|
+
declare const Swiper: CompoundedComponent;
|
|
7
|
+
export type { SwiperProps };
|
|
8
|
+
export default Swiper;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@import "@trionesdev/antd-mobile-base-react/dist/style/variable";
|
|
2
|
+
$swiperCls: 'triones-antm-swiper';
|
|
3
|
+
|
|
4
|
+
.#{$swiperCls} {
|
|
5
|
+
max-height: 100%;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-items: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
.#{$swiperCls}-core {
|
|
11
|
+
position: relative;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
&-box{
|
|
17
|
+
position: relative;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
21
|
+
&-wrapper{
|
|
22
|
+
position: relative;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
display: flex;
|
|
26
|
+
transition-property: transform;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
&-horizontal{
|
|
30
|
+
flex-direction: row;
|
|
31
|
+
touch-action: pan-x;
|
|
32
|
+
}
|
|
33
|
+
&-vertical{
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
touch-action: pan-y;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
&-item {
|
|
39
|
+
position: relative;
|
|
40
|
+
flex-shrink: 0;
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
align-items: center;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.#{$swiperCls}-taro {
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
&-item{
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
/**
|
|
12
|
+
* compact: true
|
|
13
|
+
*/
|
|
14
|
+
import { CheckOutline, CloseOutline } from '@trionesdev/antd-mobile-icons-react';
|
|
15
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
16
|
+
import React, { useState } from 'react';
|
|
17
|
+
import Switch from "../index";
|
|
18
|
+
import Space from "../../Space";
|
|
19
|
+
export default (function () {
|
|
20
|
+
var _useState = useState(false),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
checked = _useState2[0],
|
|
23
|
+
setChecked = _useState2[1];
|
|
24
|
+
var mockRequest = function mockRequest() {
|
|
25
|
+
return new Promise(function (resolve) {
|
|
26
|
+
setTimeout(function () {
|
|
27
|
+
resolve();
|
|
28
|
+
}, 1000);
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
32
|
+
title: "\u57FA\u7840\u7528\u6CD5"
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Switch, null)), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
34
|
+
title: "\u6709\u9ED8\u8BA4\u503C"
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
36
|
+
defaultChecked: true
|
|
37
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
38
|
+
title: "\u6587\u5B57\u548C\u56FE\u6807"
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
40
|
+
wrap: true
|
|
41
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
42
|
+
uncheckedText: "\u5173",
|
|
43
|
+
checkedText: "\u5F00"
|
|
44
|
+
}), /*#__PURE__*/React.createElement(Switch, {
|
|
45
|
+
checkedText: /*#__PURE__*/React.createElement(CheckOutline, {
|
|
46
|
+
style: {
|
|
47
|
+
fontSize: 12
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
uncheckedText: /*#__PURE__*/React.createElement(CloseOutline, {
|
|
51
|
+
style: {
|
|
52
|
+
fontSize: 12
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
}), /*#__PURE__*/React.createElement(Switch, {
|
|
56
|
+
uncheckedText: "0",
|
|
57
|
+
checkedText: "1"
|
|
58
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
59
|
+
title: "\u81EA\u5B9A\u4E49\u6837\u5F0F"
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
61
|
+
defaultChecked: true
|
|
62
|
+
// style={{
|
|
63
|
+
// '--checked-color': '#00b578',
|
|
64
|
+
// '--height': '36px',
|
|
65
|
+
// '--width': '60px',
|
|
66
|
+
// }}
|
|
67
|
+
,
|
|
68
|
+
checkedColor: "#00b578",
|
|
69
|
+
height: 36,
|
|
70
|
+
width: 60
|
|
71
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
72
|
+
title: "\u7981\u7528\u72B6\u6001"
|
|
73
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Switch, {
|
|
74
|
+
disabled: true
|
|
75
|
+
}), /*#__PURE__*/React.createElement(Switch, {
|
|
76
|
+
disabled: true,
|
|
77
|
+
defaultChecked: true
|
|
78
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
79
|
+
title: "\u52A0\u8F7D\u72B6\u6001"
|
|
80
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
81
|
+
loading: true
|
|
82
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
83
|
+
title: "\u5F02\u6B65"
|
|
84
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
85
|
+
wrap: true
|
|
86
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
87
|
+
checked: checked,
|
|
88
|
+
onChange: ( /*#__PURE__*/function () {
|
|
89
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(val) {
|
|
90
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
91
|
+
while (1) switch (_context.prev = _context.next) {
|
|
92
|
+
case 0:
|
|
93
|
+
_context.next = 2;
|
|
94
|
+
return mockRequest();
|
|
95
|
+
case 2:
|
|
96
|
+
setChecked(val);
|
|
97
|
+
case 3:
|
|
98
|
+
case "end":
|
|
99
|
+
return _context.stop();
|
|
100
|
+
}
|
|
101
|
+
}, _callee);
|
|
102
|
+
}));
|
|
103
|
+
return function (_x) {
|
|
104
|
+
return _ref.apply(this, arguments);
|
|
105
|
+
};
|
|
106
|
+
}())
|
|
107
|
+
}))));
|
|
108
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* compact: true
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { FaceRecognitionOutline, AppstoreOutline, UserOutline } from "../../../../antd-mobile-icons-react";
|
|
6
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
7
|
+
import TabBar from "../index";
|
|
8
|
+
export default (function () {
|
|
9
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
10
|
+
title: "\u57FA\u7840\u7528\u6CD5"
|
|
11
|
+
}, /*#__PURE__*/React.createElement(TabBar, {
|
|
12
|
+
items: [{
|
|
13
|
+
key: 'home',
|
|
14
|
+
label: '首页',
|
|
15
|
+
icon: /*#__PURE__*/React.createElement(FaceRecognitionOutline, null)
|
|
16
|
+
}, {
|
|
17
|
+
key: 'services',
|
|
18
|
+
label: '全部服务',
|
|
19
|
+
icon: /*#__PURE__*/React.createElement(AppstoreOutline, null)
|
|
20
|
+
}, {
|
|
21
|
+
key: 'user-center',
|
|
22
|
+
label: '我的',
|
|
23
|
+
icon: /*#__PURE__*/React.createElement(UserOutline, null)
|
|
24
|
+
}]
|
|
25
|
+
})));
|
|
26
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
3
|
+
import Tabs from "../index";
|
|
4
|
+
export default (function () {
|
|
5
|
+
var items = [{
|
|
6
|
+
key: '1',
|
|
7
|
+
label: 'Tab1',
|
|
8
|
+
children: /*#__PURE__*/React.createElement(React.Fragment, null, "1")
|
|
9
|
+
}, {
|
|
10
|
+
key: '2',
|
|
11
|
+
label: 'Tab2',
|
|
12
|
+
children: /*#__PURE__*/React.createElement(React.Fragment, null, "2")
|
|
13
|
+
}];
|
|
14
|
+
var items2 = [{
|
|
15
|
+
key: '1',
|
|
16
|
+
label: 'Tab1-测试',
|
|
17
|
+
children: /*#__PURE__*/React.createElement(React.Fragment, null, "1")
|
|
18
|
+
}, {
|
|
19
|
+
key: '2',
|
|
20
|
+
label: 'Tab2-测试',
|
|
21
|
+
children: /*#__PURE__*/React.createElement(React.Fragment, null, "2")
|
|
22
|
+
}, {
|
|
23
|
+
key: '3',
|
|
24
|
+
label: 'Tab3-测试',
|
|
25
|
+
children: /*#__PURE__*/React.createElement(React.Fragment, null, "3")
|
|
26
|
+
}, {
|
|
27
|
+
key: '4',
|
|
28
|
+
label: 'Tab4-测试',
|
|
29
|
+
children: /*#__PURE__*/React.createElement(React.Fragment, null, "4")
|
|
30
|
+
}, {
|
|
31
|
+
key: '5',
|
|
32
|
+
label: 'Tab5-测试',
|
|
33
|
+
children: /*#__PURE__*/React.createElement(React.Fragment, null, "5")
|
|
34
|
+
}, {
|
|
35
|
+
key: '6',
|
|
36
|
+
label: 'Tab6-测试',
|
|
37
|
+
children: /*#__PURE__*/React.createElement(React.Fragment, null, "6")
|
|
38
|
+
}];
|
|
39
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
40
|
+
title: "\u57FA\u672C\u4F7F\u7528"
|
|
41
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
42
|
+
items: items
|
|
43
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
44
|
+
title: "\u6EDA\u52A8"
|
|
45
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
46
|
+
items: items2,
|
|
47
|
+
stretch: false
|
|
48
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
49
|
+
title: "Tab"
|
|
50
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
51
|
+
stretch: false
|
|
52
|
+
}, /*#__PURE__*/React.createElement(Tabs.Tab, {
|
|
53
|
+
key: "1",
|
|
54
|
+
label: "Tab1"
|
|
55
|
+
}, /*#__PURE__*/React.createElement("div", null, "1")), /*#__PURE__*/React.createElement(Tabs.Tab, {
|
|
56
|
+
key: "2",
|
|
57
|
+
label: "Tab2"
|
|
58
|
+
}, /*#__PURE__*/React.createElement("div", null, "2")))));
|
|
59
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* compact: true
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import "./style.scss";
|
|
6
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
7
|
+
import Tag from "../index";
|
|
8
|
+
export default (function () {
|
|
9
|
+
var clsPrefix = 'tag-demo-style';
|
|
10
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
11
|
+
title: "\u57FA\u7840\u7528\u6CD5"
|
|
12
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "".concat(clsPrefix, "-content")
|
|
14
|
+
}, /*#__PURE__*/React.createElement(Tag, null, "Default"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
15
|
+
title: "\u7EBF\u6846\u6807\u7B7E"
|
|
16
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "".concat(clsPrefix, "-content")
|
|
18
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
19
|
+
fill: "outline",
|
|
20
|
+
color: "default"
|
|
21
|
+
}, "Default"), /*#__PURE__*/React.createElement(Tag, {
|
|
22
|
+
fill: "outline",
|
|
23
|
+
color: "primary"
|
|
24
|
+
}, "Primary"), /*#__PURE__*/React.createElement(Tag, {
|
|
25
|
+
fill: "outline",
|
|
26
|
+
color: "success"
|
|
27
|
+
}, "Success"), /*#__PURE__*/React.createElement(Tag, {
|
|
28
|
+
fill: "outline",
|
|
29
|
+
color: "warning"
|
|
30
|
+
}, "Warning"), /*#__PURE__*/React.createElement(Tag, {
|
|
31
|
+
fill: "outline",
|
|
32
|
+
color: "danger"
|
|
33
|
+
}, "Danger"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
34
|
+
title: "\u8BED\u4E49\u6807\u7B7E"
|
|
35
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "".concat(clsPrefix, "-content")
|
|
37
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
38
|
+
color: "default"
|
|
39
|
+
}, "Default"), /*#__PURE__*/React.createElement(Tag, {
|
|
40
|
+
color: "primary"
|
|
41
|
+
}, "Primary"), /*#__PURE__*/React.createElement(Tag, {
|
|
42
|
+
color: "success"
|
|
43
|
+
}, "Success"), /*#__PURE__*/React.createElement(Tag, {
|
|
44
|
+
color: "warning"
|
|
45
|
+
}, "Warning"), /*#__PURE__*/React.createElement(Tag, {
|
|
46
|
+
color: "danger"
|
|
47
|
+
}, "Danger"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
48
|
+
title: "\u5706\u89D2\u6807\u7B7E"
|
|
49
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: "".concat(clsPrefix, "-content")
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
52
|
+
color: "default",
|
|
53
|
+
round: true
|
|
54
|
+
}, "Default"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
55
|
+
title: "\u81EA\u5B9A\u4E49\u989C\u8272"
|
|
56
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
57
|
+
className: "".concat(clsPrefix, "-content")
|
|
58
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
59
|
+
color: "#f50"
|
|
60
|
+
}, "#f50"), /*#__PURE__*/React.createElement(Tag, {
|
|
61
|
+
color: "#2db7f5"
|
|
62
|
+
}, "#2db7f5"), /*#__PURE__*/React.createElement(Tag, {
|
|
63
|
+
color: "#87d068"
|
|
64
|
+
}, "#87d068"), /*#__PURE__*/React.createElement(Tag, {
|
|
65
|
+
color: "#108ee9"
|
|
66
|
+
}, "#108ee9"))));
|
|
67
|
+
});
|