@tuya-miniapp/smart-ui 2.7.2-beta-11 → 2.7.2-beta-13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-sheet/index.css +1 -0
- package/dist/action-sheet/index.d.ts +1 -0
- package/dist/action-sheet/index.js +115 -0
- package/dist/action-sheet/index.json +8 -0
- package/dist/action-sheet/index.wxml +87 -0
- package/dist/action-sheet/index.wxss +1 -0
- package/dist/area/index.css +1 -0
- package/dist/area/index.d.ts +1 -0
- package/dist/area/index.js +219 -0
- package/dist/area/index.json +6 -0
- package/dist/area/index.wxml +20 -0
- package/dist/area/index.wxs +8 -0
- package/dist/area/index.wxss +1 -0
- package/dist/battery/index.d.ts +1 -0
- package/dist/battery/index.js +110 -0
- package/dist/battery/index.json +4 -0
- package/dist/battery/index.wxml +1 -0
- package/dist/bottom-sheet/index.css +1 -0
- package/dist/bottom-sheet/index.d.ts +1 -0
- package/dist/bottom-sheet/index.js +151 -0
- package/dist/bottom-sheet/index.json +8 -0
- package/dist/bottom-sheet/index.wxml +71 -0
- package/dist/bottom-sheet/index.wxs +159 -0
- package/dist/bottom-sheet/index.wxss +1 -0
- package/dist/button/index.css +1 -0
- package/dist/button/index.d.ts +1 -0
- package/dist/button/index.js +61 -0
- package/dist/button/index.json +7 -0
- package/dist/button/index.wxml +64 -0
- package/dist/button/index.wxs +39 -0
- package/dist/button/index.wxss +1 -0
- package/dist/calendar/calendar.wxml +84 -0
- package/dist/calendar/index.css +1 -0
- package/dist/calendar/index.d.ts +1 -0
- package/dist/calendar/index.js +448 -0
- package/dist/calendar/index.json +12 -0
- package/dist/calendar/index.wxml +25 -0
- package/dist/calendar/index.wxs +59 -0
- package/dist/calendar/index.wxss +1 -0
- package/dist/calendar-header/index.css +1 -0
- package/dist/calendar-header/index.d.ts +1 -0
- package/dist/calendar-header/index.js +64 -0
- package/dist/calendar-header/index.json +6 -0
- package/dist/calendar-header/index.wxml +27 -0
- package/dist/calendar-header/index.wxss +1 -0
- package/dist/calendar-month/index.css +1 -0
- package/dist/calendar-month/index.d.ts +1 -0
- package/dist/calendar-month/index.js +177 -0
- package/dist/calendar-month/index.json +3 -0
- package/dist/calendar-month/index.wxml +22 -0
- package/dist/calendar-month/index.wxs +73 -0
- package/dist/calendar-month/index.wxss +1 -0
- package/dist/calendar-month-list/index.css +1 -0
- package/dist/calendar-month-list/index.d.ts +1 -0
- package/dist/calendar-month-list/index.js +103 -0
- package/dist/calendar-month-list/index.json +7 -0
- package/dist/calendar-month-list/index.wxml +15 -0
- package/dist/calendar-month-list/index.wxss +1 -0
- package/dist/calendar-utils/types.d.ts +7 -0
- package/dist/calendar-utils/types.js +1 -0
- package/dist/calendar-utils/utils.d.ts +21 -0
- package/dist/calendar-utils/utils.js +156 -0
- package/dist/calendar-utils/utils.wxs +25 -0
- package/dist/calendar-year-list/index.css +1 -0
- package/dist/calendar-year-list/index.d.ts +1 -0
- package/dist/calendar-year-list/index.js +113 -0
- package/dist/calendar-year-list/index.json +7 -0
- package/dist/calendar-year-list/index.wxml +15 -0
- package/dist/calendar-year-list/index.wxss +1 -0
- package/dist/cascader/index.css +1 -0
- package/dist/cascader/index.d.ts +1 -0
- package/dist/cascader/index.js +191 -0
- package/dist/cascader/index.json +8 -0
- package/dist/cascader/index.wxml +56 -0
- package/dist/cascader/index.wxs +21 -0
- package/dist/cascader/index.wxss +1 -0
- package/dist/cell/index.css +1 -0
- package/dist/cell/index.d.ts +1 -0
- package/dist/cell/index.js +43 -0
- package/dist/cell/index.json +6 -0
- package/dist/cell/index.wxml +47 -0
- package/dist/cell/index.wxs +17 -0
- package/dist/cell/index.wxss +1 -0
- package/dist/cell-group/index.css +1 -0
- package/dist/cell-group/index.d.ts +1 -0
- package/dist/cell-group/index.js +12 -0
- package/dist/cell-group/index.json +3 -0
- package/dist/cell-group/index.wxml +15 -0
- package/dist/cell-group/index.wxs +14 -0
- package/dist/cell-group/index.wxss +1 -0
- package/dist/checkbox/index.css +1 -0
- package/dist/checkbox/index.d.ts +1 -0
- package/dist/checkbox/index.js +79 -0
- package/dist/checkbox/index.json +6 -0
- package/dist/checkbox/index.wxml +32 -0
- package/dist/checkbox/index.wxs +20 -0
- package/dist/checkbox/index.wxss +1 -0
- package/dist/checkbox-group/index.css +1 -0
- package/dist/checkbox-group/index.d.ts +1 -0
- package/dist/checkbox-group/index.js +36 -0
- package/dist/checkbox-group/index.json +3 -0
- package/dist/checkbox-group/index.wxml +5 -0
- package/dist/checkbox-group/index.wxss +1 -0
- package/dist/circle/index.css +1 -0
- package/dist/circle/index.d.ts +1 -0
- package/dist/circle/index.js +127 -0
- package/dist/circle/index.json +3 -0
- package/dist/circle/index.rjs +232 -0
- package/dist/circle/index.wxml +8 -0
- package/dist/circle/index.wxss +1 -0
- package/dist/col/index.css +1 -0
- package/dist/col/index.d.ts +1 -0
- package/dist/col/index.js +9 -0
- package/dist/col/index.json +3 -0
- package/dist/col/index.wxml +9 -0
- package/dist/col/index.wxs +18 -0
- package/dist/col/index.wxss +1 -0
- package/dist/collapse/index.css +1 -0
- package/dist/collapse/index.d.ts +1 -0
- package/dist/collapse/index.js +46 -0
- package/dist/collapse/index.json +3 -0
- package/dist/collapse/index.wxml +3 -0
- package/dist/collapse/index.wxss +1 -0
- package/dist/collapse-item/animate.d.ts +2 -0
- package/dist/collapse-item/animate.js +39 -0
- package/dist/collapse-item/index.css +1 -0
- package/dist/collapse-item/index.d.ts +1 -0
- package/dist/collapse-item/index.js +62 -0
- package/dist/collapse-item/index.json +6 -0
- package/dist/collapse-item/index.wxml +45 -0
- package/dist/collapse-item/index.wxss +1 -0
- package/dist/common/appLog.d.ts +10 -0
- package/dist/common/appLog.js +105 -0
- package/dist/common/color.d.ts +7 -0
- package/dist/common/color.js +7 -0
- package/dist/common/component.d.ts +4 -0
- package/dist/common/component.js +46 -0
- package/dist/common/index.css +1 -0
- package/dist/common/index.wxss +1 -0
- package/dist/common/relation.d.ts +15 -0
- package/dist/common/relation.js +56 -0
- package/dist/common/style/clearfix.css +1 -0
- package/dist/common/style/clearfix.wxss +1 -0
- package/dist/common/style/ellipsis.css +1 -0
- package/dist/common/style/ellipsis.wxss +1 -0
- package/dist/common/style/hairline.css +1 -0
- package/dist/common/style/hairline.wxss +1 -0
- package/dist/common/style/mixins/clearfix.css +0 -0
- package/dist/common/style/mixins/clearfix.wxss +0 -0
- package/dist/common/style/mixins/ellipsis.css +0 -0
- package/dist/common/style/mixins/ellipsis.wxss +0 -0
- package/dist/common/style/mixins/hairline.css +1 -0
- package/dist/common/style/mixins/hairline.wxss +1 -0
- package/dist/common/style/var.css +1 -0
- package/dist/common/style/var.wxss +1 -0
- package/dist/common/ty.d.ts +7 -0
- package/dist/common/ty.js +33 -0
- package/dist/common/utils.d.ts +24 -0
- package/dist/common/utils.js +113 -0
- package/dist/common/validator.d.ts +9 -0
- package/dist/common/validator.js +31 -0
- package/dist/common/version.d.ts +15 -0
- package/dist/common/version.js +59 -0
- package/dist/config-provider/index.d.ts +1 -0
- package/dist/config-provider/index.js +9 -0
- package/dist/config-provider/index.json +3 -0
- package/dist/config-provider/index.wxml +5 -0
- package/dist/config-provider/index.wxs +29 -0
- package/dist/count-down/index.css +1 -0
- package/dist/count-down/index.d.ts +1 -0
- package/dist/count-down/index.js +100 -0
- package/dist/count-down/index.json +3 -0
- package/dist/count-down/index.wxml +4 -0
- package/dist/count-down/index.wxss +1 -0
- package/dist/count-down/utils.d.ts +10 -0
- package/dist/count-down/utils.js +57 -0
- package/dist/custom-keyboard/index.css +1 -0
- package/dist/custom-keyboard/index.d.ts +1 -0
- package/dist/custom-keyboard/index.js +162 -0
- package/dist/custom-keyboard/index.json +9 -0
- package/dist/custom-keyboard/index.wxml +44 -0
- package/dist/custom-keyboard/index.wxss +1 -0
- package/dist/datetime-picker/index.css +1 -0
- package/dist/datetime-picker/index.d.ts +1 -0
- package/dist/datetime-picker/index.js +479 -0
- package/dist/datetime-picker/index.json +6 -0
- package/dist/datetime-picker/index.wxml +22 -0
- package/dist/datetime-picker/index.wxss +1 -0
- package/dist/definitions/index.d.ts +29 -0
- package/dist/definitions/index.js +1 -0
- package/dist/dialog/dialog.d.ts +75 -0
- package/dist/dialog/dialog.js +116 -0
- package/dist/dialog/index.css +1 -0
- package/dist/dialog/index.d.ts +1 -0
- package/dist/dialog/index.js +215 -0
- package/dist/dialog/index.json +10 -0
- package/dist/dialog/index.wxml +146 -0
- package/dist/dialog/index.wxss +1 -0
- package/dist/divider/index.css +1 -0
- package/dist/divider/index.d.ts +1 -0
- package/dist/divider/index.js +12 -0
- package/dist/divider/index.json +4 -0
- package/dist/divider/index.wxml +9 -0
- package/dist/divider/index.wxs +18 -0
- package/dist/divider/index.wxss +1 -0
- package/dist/dropdown-item/index.css +1 -0
- package/dist/dropdown-item/index.d.ts +1 -0
- package/dist/dropdown-item/index.js +141 -0
- package/dist/dropdown-item/index.json +8 -0
- package/dist/dropdown-item/index.wxml +52 -0
- package/dist/dropdown-item/index.wxss +1 -0
- package/dist/dropdown-item/shared.d.ts +5 -0
- package/dist/dropdown-item/shared.js +1 -0
- package/dist/dropdown-menu/index.css +1 -0
- package/dist/dropdown-menu/index.d.ts +1 -0
- package/dist/dropdown-menu/index.js +130 -0
- package/dist/dropdown-menu/index.json +6 -0
- package/dist/dropdown-menu/index.wxml +24 -0
- package/dist/dropdown-menu/index.wxs +16 -0
- package/dist/dropdown-menu/index.wxss +1 -0
- package/dist/empty/index.css +1 -0
- package/dist/empty/index.d.ts +1 -0
- package/dist/empty/index.js +29 -0
- package/dist/empty/index.json +4 -0
- package/dist/empty/index.wxml +22 -0
- package/dist/empty/index.wxs +13 -0
- package/dist/empty/index.wxss +1 -0
- package/dist/field/cell-input.wxml +59 -0
- package/dist/field/cell-textarea.wxml +28 -0
- package/dist/field/index.css +1 -0
- package/dist/field/index.d.ts +1 -0
- package/dist/field/index.js +142 -0
- package/dist/field/index.json +7 -0
- package/dist/field/index.wxml +4 -0
- package/dist/field/index.wxs +19 -0
- package/dist/field/index.wxss +1 -0
- package/dist/field/input.wxml +30 -0
- package/dist/field/props.d.ts +4 -0
- package/dist/field/props.js +56 -0
- package/dist/field/textarea.wxml +32 -0
- package/dist/field/types.d.ts +8 -0
- package/dist/field/types.js +1 -0
- package/dist/goods-action/index.css +1 -0
- package/dist/goods-action/index.d.ts +1 -0
- package/dist/goods-action/index.js +15 -0
- package/dist/goods-action/index.json +3 -0
- package/dist/goods-action/index.wxml +5 -0
- package/dist/goods-action/index.wxss +1 -0
- package/dist/goods-action-button/index.css +1 -0
- package/dist/goods-action-button/index.d.ts +1 -0
- package/dist/goods-action-button/index.js +49 -0
- package/dist/goods-action-button/index.json +6 -0
- package/dist/goods-action-button/index.wxml +35 -0
- package/dist/goods-action-button/index.wxss +1 -0
- package/dist/goods-action-icon/index.css +1 -0
- package/dist/goods-action-icon/index.d.ts +1 -0
- package/dist/goods-action-icon/index.js +27 -0
- package/dist/goods-action-icon/index.json +7 -0
- package/dist/goods-action-icon/index.wxml +41 -0
- package/dist/goods-action-icon/index.wxss +1 -0
- package/dist/grid/index.css +1 -0
- package/dist/grid/index.d.ts +1 -0
- package/dist/grid/index.js +55 -0
- package/dist/grid/index.json +3 -0
- package/dist/grid/index.wxml +8 -0
- package/dist/grid/index.wxs +13 -0
- package/dist/grid/index.wxss +1 -0
- package/dist/grid-item/index.css +1 -0
- package/dist/grid-item/index.d.ts +1 -0
- package/dist/grid-item/index.js +52 -0
- package/dist/grid-item/index.json +6 -0
- package/dist/grid-item/index.wxml +27 -0
- package/dist/grid-item/index.wxs +32 -0
- package/dist/grid-item/index.wxss +1 -0
- package/dist/icon/index.css +1 -0
- package/dist/icon/index.d.ts +1 -0
- package/dist/icon/index.js +21 -0
- package/dist/icon/index.json +6 -0
- package/dist/icon/index.wxml +30 -0
- package/dist/icon/index.wxs +94 -0
- package/dist/icon/index.wxss +1 -0
- package/dist/image/index.css +1 -0
- package/dist/image/index.d.ts +1 -0
- package/dist/image/index.js +70 -0
- package/dist/image/index.json +7 -0
- package/dist/image/index.wxml +40 -0
- package/dist/image/index.wxs +42 -0
- package/dist/image/index.wxss +1 -0
- package/dist/index-anchor/index.css +1 -0
- package/dist/index-anchor/index.d.ts +1 -0
- package/dist/index-anchor/index.js +25 -0
- package/dist/index-anchor/index.json +3 -0
- package/dist/index-anchor/index.wxml +14 -0
- package/dist/index-anchor/index.wxss +1 -0
- package/dist/index-bar/index.css +1 -0
- package/dist/index-bar/index.d.ts +1 -0
- package/dist/index-bar/index.js +247 -0
- package/dist/index-bar/index.json +3 -0
- package/dist/index-bar/index.wxml +22 -0
- package/dist/index-bar/index.wxss +1 -0
- package/dist/info/index.css +1 -0
- package/dist/info/index.d.ts +1 -0
- package/dist/info/index.js +8 -0
- package/dist/info/index.json +3 -0
- package/dist/info/index.wxml +7 -0
- package/dist/info/index.wxss +1 -0
- package/dist/loading/index.css +1 -0
- package/dist/loading/index.d.ts +1 -0
- package/dist/loading/index.js +40 -0
- package/dist/loading/index.json +3 -0
- package/dist/loading/index.wxml +17 -0
- package/dist/loading/index.wxs +39 -0
- package/dist/loading/index.wxss +1 -0
- package/dist/mixins/basic.d.ts +1 -0
- package/dist/mixins/basic.js +26 -0
- package/dist/mixins/button.d.ts +1 -0
- package/dist/mixins/button.js +51 -0
- package/dist/mixins/link.d.ts +1 -0
- package/dist/mixins/link.js +22 -0
- package/dist/mixins/page-scroll.d.ts +6 -0
- package/dist/mixins/page-scroll.js +42 -0
- package/dist/mixins/touch.d.ts +1 -0
- package/dist/mixins/touch.js +36 -0
- package/dist/mixins/transition.d.ts +1 -0
- package/dist/mixins/transition.js +163 -0
- package/dist/nav-bar/index.css +1 -0
- package/dist/nav-bar/index.d.ts +1 -0
- package/dist/nav-bar/index.js +110 -0
- package/dist/nav-bar/index.json +6 -0
- package/dist/nav-bar/index.wxml +70 -0
- package/dist/nav-bar/index.wxs +14 -0
- package/dist/nav-bar/index.wxss +1 -0
- package/dist/normal-slider/index.css +1 -0
- package/dist/normal-slider/index.d.ts +1 -0
- package/dist/normal-slider/index.js +158 -0
- package/dist/normal-slider/index.json +6 -0
- package/dist/normal-slider/index.wxml +35 -0
- package/dist/normal-slider/index.wxss +1 -0
- package/dist/notice-bar/index.css +1 -0
- package/dist/notice-bar/index.d.ts +1 -0
- package/dist/notice-bar/index.js +170 -0
- package/dist/notice-bar/index.json +6 -0
- package/dist/notice-bar/index.wxml +52 -0
- package/dist/notice-bar/index.wxs +11 -0
- package/dist/notice-bar/index.wxss +1 -0
- package/dist/notify/index.css +1 -0
- package/dist/notify/index.d.ts +1 -0
- package/dist/notify/index.js +77 -0
- package/dist/notify/index.json +6 -0
- package/dist/notify/index.wxml +22 -0
- package/dist/notify/index.wxs +22 -0
- package/dist/notify/index.wxss +1 -0
- package/dist/notify/notify.d.ts +29 -0
- package/dist/notify/notify.js +57 -0
- package/dist/overlay/index.css +1 -0
- package/dist/overlay/index.d.ts +1 -0
- package/dist/overlay/index.js +30 -0
- package/dist/overlay/index.json +6 -0
- package/dist/overlay/index.wxml +7 -0
- package/dist/overlay/index.wxss +1 -0
- package/dist/overlay/overlay.wxml +10 -0
- package/dist/picker/index.css +1 -0
- package/dist/picker/index.d.ts +1 -0
- package/dist/picker/index.js +168 -0
- package/dist/picker/index.json +7 -0
- package/dist/picker/index.wxml +48 -0
- package/dist/picker/index.wxs +44 -0
- package/dist/picker/index.wxss +1 -0
- package/dist/picker/shared.d.ts +44 -0
- package/dist/picker/shared.js +44 -0
- package/dist/picker/toolbar.wxml +23 -0
- package/dist/picker-column/index.css +1 -0
- package/dist/picker-column/index.d.ts +1 -0
- package/dist/picker-column/index.js +331 -0
- package/dist/picker-column/index.json +3 -0
- package/dist/picker-column/index.wxml +60 -0
- package/dist/picker-column/index.wxs +628 -0
- package/dist/picker-column/index.wxss +1 -0
- package/dist/popover/index.css +1 -0
- package/dist/popover/index.d.ts +1 -0
- package/dist/popover/index.js +209 -0
- package/dist/popover/index.json +7 -0
- package/dist/popover/index.wxml +31 -0
- package/dist/popover/index.wxss +1 -0
- package/dist/popup/index.css +1 -0
- package/dist/popup/index.d.ts +1 -0
- package/dist/popup/index.js +117 -0
- package/dist/popup/index.json +7 -0
- package/dist/popup/index.wxml +21 -0
- package/dist/popup/index.wxs +23 -0
- package/dist/popup/index.wxss +1 -0
- package/dist/popup/popup.wxml +16 -0
- package/dist/progress/index.css +1 -0
- package/dist/progress/index.d.ts +1 -0
- package/dist/progress/index.js +48 -0
- package/dist/progress/index.json +3 -0
- package/dist/progress/index.wxml +20 -0
- package/dist/progress/index.wxs +36 -0
- package/dist/progress/index.wxss +1 -0
- package/dist/radio/index.css +1 -0
- package/dist/radio/index.d.ts +1 -0
- package/dist/radio/index.js +70 -0
- package/dist/radio/index.json +6 -0
- package/dist/radio/index.wxml +32 -0
- package/dist/radio/index.wxs +33 -0
- package/dist/radio/index.wxss +1 -0
- package/dist/radio-group/index.css +1 -0
- package/dist/radio-group/index.d.ts +1 -0
- package/dist/radio-group/index.js +27 -0
- package/dist/radio-group/index.json +3 -0
- package/dist/radio-group/index.wxml +5 -0
- package/dist/radio-group/index.wxss +1 -0
- package/dist/rate/index.css +1 -0
- package/dist/rate/index.d.ts +1 -0
- package/dist/rate/index.js +89 -0
- package/dist/rate/index.json +6 -0
- package/dist/rate/index.wxml +35 -0
- package/dist/rate/index.wxss +1 -0
- package/dist/row/index.css +1 -0
- package/dist/row/index.d.ts +1 -0
- package/dist/row/index.js +23 -0
- package/dist/row/index.json +3 -0
- package/dist/row/index.wxml +5 -0
- package/dist/row/index.wxs +18 -0
- package/dist/row/index.wxss +1 -0
- package/dist/search/index.css +1 -0
- package/dist/search/index.d.ts +1 -0
- package/dist/search/index.js +100 -0
- package/dist/search/index.json +7 -0
- package/dist/search/index.wxml +57 -0
- package/dist/search/index.wxss +1 -0
- package/dist/sidebar/index.css +1 -0
- package/dist/sidebar/index.d.ts +1 -0
- package/dist/sidebar/index.js +34 -0
- package/dist/sidebar/index.json +3 -0
- package/dist/sidebar/index.wxml +3 -0
- package/dist/sidebar/index.wxss +1 -0
- package/dist/sidebar-item/index.css +1 -0
- package/dist/sidebar-item/index.d.ts +1 -0
- package/dist/sidebar-item/index.js +29 -0
- package/dist/sidebar-item/index.json +6 -0
- package/dist/sidebar-item/index.wxml +18 -0
- package/dist/sidebar-item/index.wxss +1 -0
- package/dist/skeleton/index.css +1 -0
- package/dist/skeleton/index.d.ts +1 -0
- package/dist/skeleton/index.js +46 -0
- package/dist/skeleton/index.json +4 -0
- package/dist/skeleton/index.wxml +29 -0
- package/dist/skeleton/index.wxss +1 -0
- package/dist/slider/index.css +1 -0
- package/dist/slider/index.d.ts +1 -0
- package/dist/slider/index.js +209 -0
- package/dist/slider/index.json +3 -0
- package/dist/slider/index.wxml +68 -0
- package/dist/slider/index.wxs +14 -0
- package/dist/slider/index.wxss +1 -0
- package/dist/stepper/index.css +1 -0
- package/dist/stepper/index.d.ts +1 -0
- package/dist/stepper/index.js +206 -0
- package/dist/stepper/index.json +6 -0
- package/dist/stepper/index.wxml +45 -0
- package/dist/stepper/index.wxs +32 -0
- package/dist/stepper/index.wxss +1 -0
- package/dist/steps/index.css +1 -0
- package/dist/steps/index.d.ts +1 -0
- package/dist/steps/index.js +34 -0
- package/dist/steps/index.json +6 -0
- package/dist/steps/index.wxml +54 -0
- package/dist/steps/index.wxss +1 -0
- package/dist/sticky/index.css +1 -0
- package/dist/sticky/index.d.ts +1 -0
- package/dist/sticky/index.js +120 -0
- package/dist/sticky/index.json +3 -0
- package/dist/sticky/index.wxml +8 -0
- package/dist/sticky/index.wxs +25 -0
- package/dist/sticky/index.wxss +1 -0
- package/dist/swipe-cell/index.css +1 -0
- package/dist/swipe-cell/index.d.ts +1 -0
- package/dist/swipe-cell/index.js +140 -0
- package/dist/swipe-cell/index.json +3 -0
- package/dist/swipe-cell/index.wxml +21 -0
- package/dist/swipe-cell/index.wxss +1 -0
- package/dist/switch/index.css +1 -0
- package/dist/switch/index.d.ts +1 -0
- package/dist/switch/index.js +42 -0
- package/dist/switch/index.json +6 -0
- package/dist/switch/index.wxml +51 -0
- package/dist/switch/index.wxs +26 -0
- package/dist/switch/index.wxss +1 -0
- package/dist/tab/index.css +1 -0
- package/dist/tab/index.d.ts +1 -0
- package/dist/tab/index.js +64 -0
- package/dist/tab/index.json +3 -0
- package/dist/tab/index.wxml +8 -0
- package/dist/tab/index.wxss +1 -0
- package/dist/tabbar/index.css +1 -0
- package/dist/tabbar/index.d.ts +1 -0
- package/dist/tabbar/index.js +70 -0
- package/dist/tabbar/index.json +3 -0
- package/dist/tabbar/index.wxml +12 -0
- package/dist/tabbar/index.wxss +1 -0
- package/dist/tabbar-item/index.css +1 -0
- package/dist/tabbar-item/index.d.ts +1 -0
- package/dist/tabbar-item/index.js +77 -0
- package/dist/tabbar-item/index.json +7 -0
- package/dist/tabbar-item/index.wxml +32 -0
- package/dist/tabbar-item/index.wxss +1 -0
- package/dist/tabs/index.css +1 -0
- package/dist/tabs/index.d.ts +1 -0
- package/dist/tabs/index.js +304 -0
- package/dist/tabs/index.json +7 -0
- package/dist/tabs/index.wxml +67 -0
- package/dist/tabs/index.wxs +99 -0
- package/dist/tabs/index.wxss +1 -0
- package/dist/tag/index.css +1 -0
- package/dist/tag/index.d.ts +1 -0
- package/dist/tag/index.js +29 -0
- package/dist/tag/index.json +6 -0
- package/dist/tag/index.wxml +17 -0
- package/dist/tag/index.wxs +13 -0
- package/dist/tag/index.wxss +1 -0
- package/dist/toast/icons.d.ts +3 -0
- package/dist/toast/icons.js +6 -0
- package/dist/toast/index.css +1 -0
- package/dist/toast/index.d.ts +1 -0
- package/dist/toast/index.js +58 -0
- package/dist/toast/index.json +9 -0
- package/dist/toast/index.wxml +33 -0
- package/dist/toast/index.wxss +1 -0
- package/dist/toast/toast.d.ts +35 -0
- package/dist/toast/toast.js +97 -0
- package/dist/transition/index.css +1 -0
- package/dist/transition/index.d.ts +1 -0
- package/dist/transition/index.js +13 -0
- package/dist/transition/index.json +3 -0
- package/dist/transition/index.wxml +9 -0
- package/dist/transition/index.wxs +17 -0
- package/dist/transition/index.wxss +1 -0
- package/dist/tree-select/index.css +1 -0
- package/dist/tree-select/index.d.ts +1 -0
- package/dist/tree-select/index.js +69 -0
- package/dist/tree-select/index.json +8 -0
- package/dist/tree-select/index.wxml +41 -0
- package/dist/tree-select/index.wxs +12 -0
- package/dist/tree-select/index.wxss +1 -0
- package/dist/wxs/add-unit.wxs +12 -0
- package/dist/wxs/array.wxs +5 -0
- package/dist/wxs/bem.wxs +39 -0
- package/dist/wxs/memoize.wxs +55 -0
- package/dist/wxs/object.wxs +13 -0
- package/dist/wxs/style.wxs +46 -0
- package/dist/wxs/utils.wxs +85 -0
- package/lib/action-sheet/index.css +1 -0
- package/lib/action-sheet/index.d.ts +1 -0
- package/lib/action-sheet/index.js +121 -0
- package/lib/action-sheet/index.json +8 -0
- package/lib/action-sheet/index.wxml +87 -0
- package/lib/action-sheet/index.wxss +1 -0
- package/lib/area/index.css +1 -0
- package/lib/area/index.d.ts +1 -0
- package/lib/area/index.js +234 -0
- package/lib/area/index.json +6 -0
- package/lib/area/index.wxml +20 -0
- package/lib/area/index.wxs +8 -0
- package/lib/area/index.wxss +1 -0
- package/lib/battery/index.d.ts +1 -0
- package/lib/battery/index.js +105 -0
- package/lib/battery/index.json +4 -0
- package/lib/battery/index.wxml +1 -0
- package/lib/bottom-sheet/index.css +1 -0
- package/lib/bottom-sheet/index.d.ts +1 -0
- package/lib/bottom-sheet/index.js +156 -0
- package/lib/bottom-sheet/index.json +8 -0
- package/lib/bottom-sheet/index.wxml +71 -0
- package/lib/bottom-sheet/index.wxs +159 -0
- package/lib/bottom-sheet/index.wxss +1 -0
- package/lib/button/index.css +1 -0
- package/lib/button/index.d.ts +1 -0
- package/lib/button/index.js +64 -0
- package/lib/button/index.json +7 -0
- package/lib/button/index.wxml +64 -0
- package/lib/button/index.wxs +39 -0
- package/lib/button/index.wxss +1 -0
- package/lib/calendar/calendar.wxml +84 -0
- package/lib/calendar/index.css +1 -0
- package/lib/calendar/index.d.ts +1 -0
- package/lib/calendar/index.js +465 -0
- package/lib/calendar/index.json +12 -0
- package/lib/calendar/index.wxml +25 -0
- package/lib/calendar/index.wxs +59 -0
- package/lib/calendar/index.wxss +1 -0
- package/lib/calendar-header/index.css +1 -0
- package/lib/calendar-header/index.d.ts +1 -0
- package/lib/calendar-header/index.js +75 -0
- package/lib/calendar-header/index.json +6 -0
- package/lib/calendar-header/index.wxml +27 -0
- package/lib/calendar-header/index.wxss +1 -0
- package/lib/calendar-month/index.css +1 -0
- package/lib/calendar-month/index.d.ts +1 -0
- package/lib/calendar-month/index.js +179 -0
- package/lib/calendar-month/index.json +3 -0
- package/lib/calendar-month/index.wxml +22 -0
- package/lib/calendar-month/index.wxs +73 -0
- package/lib/calendar-month/index.wxss +1 -0
- package/lib/calendar-month-list/index.css +1 -0
- package/lib/calendar-month-list/index.d.ts +1 -0
- package/lib/calendar-month-list/index.js +105 -0
- package/lib/calendar-month-list/index.json +7 -0
- package/lib/calendar-month-list/index.wxml +15 -0
- package/lib/calendar-month-list/index.wxss +1 -0
- package/lib/calendar-utils/types.d.ts +7 -0
- package/lib/calendar-utils/types.js +2 -0
- package/lib/calendar-utils/utils.d.ts +21 -0
- package/lib/calendar-utils/utils.js +175 -0
- package/lib/calendar-utils/utils.wxs +25 -0
- package/lib/calendar-year-list/index.css +1 -0
- package/lib/calendar-year-list/index.d.ts +1 -0
- package/lib/calendar-year-list/index.js +115 -0
- package/lib/calendar-year-list/index.json +7 -0
- package/lib/calendar-year-list/index.wxml +15 -0
- package/lib/calendar-year-list/index.wxss +1 -0
- package/lib/cascader/index.css +1 -0
- package/lib/cascader/index.d.ts +1 -0
- package/lib/cascader/index.js +207 -0
- package/lib/cascader/index.json +8 -0
- package/lib/cascader/index.wxml +56 -0
- package/lib/cascader/index.wxs +21 -0
- package/lib/cascader/index.wxss +1 -0
- package/lib/cell/index.css +1 -0
- package/lib/cell/index.d.ts +1 -0
- package/lib/cell/index.js +48 -0
- package/lib/cell/index.json +6 -0
- package/lib/cell/index.wxml +47 -0
- package/lib/cell/index.wxs +17 -0
- package/lib/cell/index.wxss +1 -0
- package/lib/cell-group/index.css +1 -0
- package/lib/cell-group/index.d.ts +1 -0
- package/lib/cell-group/index.js +14 -0
- package/lib/cell-group/index.json +3 -0
- package/lib/cell-group/index.wxml +15 -0
- package/lib/cell-group/index.wxs +14 -0
- package/lib/cell-group/index.wxss +1 -0
- package/lib/checkbox/index.css +1 -0
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/checkbox/index.js +84 -0
- package/lib/checkbox/index.json +6 -0
- package/lib/checkbox/index.wxml +32 -0
- package/lib/checkbox/index.wxs +20 -0
- package/lib/checkbox/index.wxss +1 -0
- package/lib/checkbox-group/index.css +1 -0
- package/lib/checkbox-group/index.d.ts +1 -0
- package/lib/checkbox-group/index.js +39 -0
- package/lib/checkbox-group/index.json +3 -0
- package/lib/checkbox-group/index.wxml +5 -0
- package/lib/checkbox-group/index.wxss +1 -0
- package/lib/circle/index.css +1 -0
- package/lib/circle/index.d.ts +1 -0
- package/lib/circle/index.js +134 -0
- package/lib/circle/index.json +3 -0
- package/lib/circle/index.rjs +232 -0
- package/lib/circle/index.wxml +8 -0
- package/lib/circle/index.wxss +1 -0
- package/lib/col/index.css +1 -0
- package/lib/col/index.d.ts +1 -0
- package/lib/col/index.js +11 -0
- package/lib/col/index.json +3 -0
- package/lib/col/index.wxml +9 -0
- package/lib/col/index.wxs +18 -0
- package/lib/col/index.wxss +1 -0
- package/lib/collapse/index.css +1 -0
- package/lib/collapse/index.d.ts +1 -0
- package/lib/collapse/index.js +48 -0
- package/lib/collapse/index.json +3 -0
- package/lib/collapse/index.wxml +3 -0
- package/lib/collapse/index.wxss +1 -0
- package/lib/collapse-item/animate.d.ts +2 -0
- package/lib/collapse-item/animate.js +43 -0
- package/lib/collapse-item/index.css +1 -0
- package/lib/collapse-item/index.d.ts +1 -0
- package/lib/collapse-item/index.js +64 -0
- package/lib/collapse-item/index.json +6 -0
- package/lib/collapse-item/index.wxml +45 -0
- package/lib/collapse-item/index.wxss +1 -0
- package/lib/common/appLog.d.ts +10 -0
- package/lib/common/appLog.js +112 -0
- package/lib/common/color.d.ts +7 -0
- package/lib/common/color.js +10 -0
- package/lib/common/component.d.ts +4 -0
- package/lib/common/component.js +49 -0
- package/lib/common/index.css +1 -0
- package/lib/common/index.wxss +1 -0
- package/lib/common/relation.d.ts +15 -0
- package/lib/common/relation.js +65 -0
- package/lib/common/style/clearfix.css +1 -0
- package/lib/common/style/clearfix.wxss +1 -0
- package/lib/common/style/ellipsis.css +1 -0
- package/lib/common/style/ellipsis.wxss +1 -0
- package/lib/common/style/hairline.css +1 -0
- package/lib/common/style/hairline.wxss +1 -0
- package/lib/common/style/mixins/clearfix.css +0 -0
- package/lib/common/style/mixins/clearfix.wxss +0 -0
- package/lib/common/style/mixins/ellipsis.css +0 -0
- package/lib/common/style/mixins/ellipsis.wxss +0 -0
- package/lib/common/style/mixins/hairline.css +1 -0
- package/lib/common/style/mixins/hairline.wxss +1 -0
- package/lib/common/style/var.css +1 -0
- package/lib/common/style/var.wxss +1 -0
- package/lib/common/ty.d.ts +7 -0
- package/lib/common/ty.js +35 -0
- package/lib/common/utils.d.ts +24 -0
- package/lib/common/utils.js +140 -0
- package/lib/common/validator.d.ts +9 -0
- package/lib/common/validator.js +43 -0
- package/lib/common/version.d.ts +15 -0
- package/lib/common/version.js +70 -0
- package/lib/config-provider/index.d.ts +1 -0
- package/lib/config-provider/index.js +11 -0
- package/lib/config-provider/index.json +3 -0
- package/lib/config-provider/index.wxml +5 -0
- package/lib/config-provider/index.wxs +29 -0
- package/lib/count-down/index.css +1 -0
- package/lib/count-down/index.d.ts +1 -0
- package/lib/count-down/index.js +104 -0
- package/lib/count-down/index.json +3 -0
- package/lib/count-down/index.wxml +4 -0
- package/lib/count-down/index.wxss +1 -0
- package/lib/count-down/utils.d.ts +10 -0
- package/lib/count-down/utils.js +64 -0
- package/lib/custom-keyboard/index.css +1 -0
- package/lib/custom-keyboard/index.d.ts +1 -0
- package/lib/custom-keyboard/index.js +156 -0
- package/lib/custom-keyboard/index.json +9 -0
- package/lib/custom-keyboard/index.wxml +44 -0
- package/lib/custom-keyboard/index.wxss +1 -0
- package/lib/datetime-picker/index.css +1 -0
- package/lib/datetime-picker/index.d.ts +1 -0
- package/lib/datetime-picker/index.js +512 -0
- package/lib/datetime-picker/index.json +6 -0
- package/lib/datetime-picker/index.wxml +22 -0
- package/lib/datetime-picker/index.wxss +1 -0
- package/lib/definitions/index.d.ts +29 -0
- package/lib/definitions/index.js +2 -0
- package/lib/dialog/dialog.d.ts +75 -0
- package/lib/dialog/dialog.js +137 -0
- package/lib/dialog/index.css +1 -0
- package/lib/dialog/index.d.ts +1 -0
- package/lib/dialog/index.js +223 -0
- package/lib/dialog/index.json +10 -0
- package/lib/dialog/index.wxml +146 -0
- package/lib/dialog/index.wxss +1 -0
- package/lib/divider/index.css +1 -0
- package/lib/divider/index.d.ts +1 -0
- package/lib/divider/index.js +14 -0
- package/lib/divider/index.json +4 -0
- package/lib/divider/index.wxml +9 -0
- package/lib/divider/index.wxs +18 -0
- package/lib/divider/index.wxss +1 -0
- package/lib/dropdown-item/index.css +1 -0
- package/lib/dropdown-item/index.d.ts +1 -0
- package/lib/dropdown-item/index.js +150 -0
- package/lib/dropdown-item/index.json +8 -0
- package/lib/dropdown-item/index.wxml +52 -0
- package/lib/dropdown-item/index.wxss +1 -0
- package/lib/dropdown-item/shared.d.ts +5 -0
- package/lib/dropdown-item/shared.js +2 -0
- package/lib/dropdown-menu/index.css +1 -0
- package/lib/dropdown-menu/index.d.ts +1 -0
- package/lib/dropdown-menu/index.js +137 -0
- package/lib/dropdown-menu/index.json +6 -0
- package/lib/dropdown-menu/index.wxml +24 -0
- package/lib/dropdown-menu/index.wxs +16 -0
- package/lib/dropdown-menu/index.wxss +1 -0
- package/lib/empty/index.css +1 -0
- package/lib/empty/index.d.ts +1 -0
- package/lib/empty/index.js +31 -0
- package/lib/empty/index.json +4 -0
- package/lib/empty/index.wxml +22 -0
- package/lib/empty/index.wxs +13 -0
- package/lib/empty/index.wxss +1 -0
- package/lib/field/cell-input.wxml +59 -0
- package/lib/field/cell-textarea.wxml +28 -0
- package/lib/field/index.css +1 -0
- package/lib/field/index.d.ts +1 -0
- package/lib/field/index.js +160 -0
- package/lib/field/index.json +7 -0
- package/lib/field/index.wxml +4 -0
- package/lib/field/index.wxs +19 -0
- package/lib/field/index.wxss +1 -0
- package/lib/field/input.wxml +30 -0
- package/lib/field/props.d.ts +4 -0
- package/lib/field/props.js +59 -0
- package/lib/field/textarea.wxml +32 -0
- package/lib/field/types.d.ts +8 -0
- package/lib/field/types.js +2 -0
- package/lib/goods-action/index.css +1 -0
- package/lib/goods-action/index.d.ts +1 -0
- package/lib/goods-action/index.js +17 -0
- package/lib/goods-action/index.json +3 -0
- package/lib/goods-action/index.wxml +5 -0
- package/lib/goods-action/index.wxss +1 -0
- package/lib/goods-action-button/index.css +1 -0
- package/lib/goods-action-button/index.d.ts +1 -0
- package/lib/goods-action-button/index.js +51 -0
- package/lib/goods-action-button/index.json +6 -0
- package/lib/goods-action-button/index.wxml +35 -0
- package/lib/goods-action-button/index.wxss +1 -0
- package/lib/goods-action-icon/index.css +1 -0
- package/lib/goods-action-icon/index.d.ts +1 -0
- package/lib/goods-action-icon/index.js +29 -0
- package/lib/goods-action-icon/index.json +7 -0
- package/lib/goods-action-icon/index.wxml +41 -0
- package/lib/goods-action-icon/index.wxss +1 -0
- package/lib/grid/index.css +1 -0
- package/lib/grid/index.d.ts +1 -0
- package/lib/grid/index.js +57 -0
- package/lib/grid/index.json +3 -0
- package/lib/grid/index.wxml +8 -0
- package/lib/grid/index.wxs +13 -0
- package/lib/grid/index.wxss +1 -0
- package/lib/grid-item/index.css +1 -0
- package/lib/grid-item/index.d.ts +1 -0
- package/lib/grid-item/index.js +54 -0
- package/lib/grid-item/index.json +6 -0
- package/lib/grid-item/index.wxml +27 -0
- package/lib/grid-item/index.wxs +32 -0
- package/lib/grid-item/index.wxss +1 -0
- package/lib/icon/index.css +1 -0
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +23 -0
- package/lib/icon/index.json +6 -0
- package/lib/icon/index.wxml +30 -0
- package/lib/icon/index.wxs +94 -0
- package/lib/icon/index.wxss +1 -0
- package/lib/image/index.css +1 -0
- package/lib/image/index.d.ts +1 -0
- package/lib/image/index.js +75 -0
- package/lib/image/index.json +7 -0
- package/lib/image/index.wxml +40 -0
- package/lib/image/index.wxs +42 -0
- package/lib/image/index.wxss +1 -0
- package/lib/index-anchor/index.css +1 -0
- package/lib/index-anchor/index.d.ts +1 -0
- package/lib/index-anchor/index.js +28 -0
- package/lib/index-anchor/index.json +3 -0
- package/lib/index-anchor/index.wxml +14 -0
- package/lib/index-anchor/index.wxss +1 -0
- package/lib/index-bar/index.css +1 -0
- package/lib/index-bar/index.d.ts +1 -0
- package/lib/index-bar/index.js +244 -0
- package/lib/index-bar/index.json +3 -0
- package/lib/index-bar/index.wxml +22 -0
- package/lib/index-bar/index.wxss +1 -0
- package/lib/info/index.css +1 -0
- package/lib/info/index.d.ts +1 -0
- package/lib/info/index.js +10 -0
- package/lib/info/index.json +3 -0
- package/lib/info/index.wxml +7 -0
- package/lib/info/index.wxss +1 -0
- package/lib/loading/index.css +1 -0
- package/lib/loading/index.d.ts +1 -0
- package/lib/loading/index.js +44 -0
- package/lib/loading/index.json +3 -0
- package/lib/loading/index.wxml +17 -0
- package/lib/loading/index.wxs +39 -0
- package/lib/loading/index.wxss +1 -0
- package/lib/mixins/basic.d.ts +1 -0
- package/lib/mixins/basic.js +30 -0
- package/lib/mixins/button.d.ts +1 -0
- package/lib/mixins/button.js +54 -0
- package/lib/mixins/link.d.ts +1 -0
- package/lib/mixins/link.js +26 -0
- package/lib/mixins/page-scroll.d.ts +6 -0
- package/lib/mixins/page-scroll.js +47 -0
- package/lib/mixins/touch.d.ts +1 -0
- package/lib/mixins/touch.js +39 -0
- package/lib/mixins/transition.d.ts +1 -0
- package/lib/mixins/transition.js +235 -0
- package/lib/nav-bar/index.css +1 -0
- package/lib/nav-bar/index.d.ts +1 -0
- package/lib/nav-bar/index.js +116 -0
- package/lib/nav-bar/index.json +6 -0
- package/lib/nav-bar/index.wxml +70 -0
- package/lib/nav-bar/index.wxs +14 -0
- package/lib/nav-bar/index.wxss +1 -0
- package/lib/normal-slider/index.css +1 -0
- package/lib/normal-slider/index.d.ts +1 -0
- package/lib/normal-slider/index.js +160 -0
- package/lib/normal-slider/index.json +6 -0
- package/lib/normal-slider/index.wxml +35 -0
- package/lib/normal-slider/index.wxss +1 -0
- package/lib/notice-bar/index.css +1 -0
- package/lib/notice-bar/index.d.ts +1 -0
- package/lib/notice-bar/index.js +178 -0
- package/lib/notice-bar/index.json +6 -0
- package/lib/notice-bar/index.wxml +52 -0
- package/lib/notice-bar/index.wxs +11 -0
- package/lib/notice-bar/index.wxss +1 -0
- package/lib/notify/index.css +1 -0
- package/lib/notify/index.d.ts +1 -0
- package/lib/notify/index.js +80 -0
- package/lib/notify/index.json +6 -0
- package/lib/notify/index.wxml +22 -0
- package/lib/notify/index.wxs +22 -0
- package/lib/notify/index.wxss +1 -0
- package/lib/notify/notify.d.ts +29 -0
- package/lib/notify/notify.js +72 -0
- package/lib/overlay/index.css +1 -0
- package/lib/overlay/index.d.ts +1 -0
- package/lib/overlay/index.js +32 -0
- package/lib/overlay/index.json +6 -0
- package/lib/overlay/index.wxml +7 -0
- package/lib/overlay/index.wxss +1 -0
- package/lib/overlay/overlay.wxml +10 -0
- package/lib/picker/index.css +1 -0
- package/lib/picker/index.d.ts +1 -0
- package/lib/picker/index.js +191 -0
- package/lib/picker/index.json +7 -0
- package/lib/picker/index.wxml +48 -0
- package/lib/picker/index.wxs +44 -0
- package/lib/picker/index.wxss +1 -0
- package/lib/picker/shared.d.ts +44 -0
- package/lib/picker/shared.js +47 -0
- package/lib/picker/toolbar.wxml +23 -0
- package/lib/picker-column/index.css +1 -0
- package/lib/picker-column/index.d.ts +1 -0
- package/lib/picker-column/index.js +337 -0
- package/lib/picker-column/index.json +3 -0
- package/lib/picker-column/index.wxml +60 -0
- package/lib/picker-column/index.wxs +628 -0
- package/lib/picker-column/index.wxss +1 -0
- package/lib/popover/index.css +1 -0
- package/lib/popover/index.d.ts +1 -0
- package/lib/popover/index.js +224 -0
- package/lib/popover/index.json +7 -0
- package/lib/popover/index.wxml +31 -0
- package/lib/popover/index.wxss +1 -0
- package/lib/popup/index.css +1 -0
- package/lib/popup/index.d.ts +1 -0
- package/lib/popup/index.js +122 -0
- package/lib/popup/index.json +7 -0
- package/lib/popup/index.wxml +21 -0
- package/lib/popup/index.wxs +23 -0
- package/lib/popup/index.wxss +1 -0
- package/lib/popup/popup.wxml +16 -0
- package/lib/progress/index.css +1 -0
- package/lib/progress/index.d.ts +1 -0
- package/lib/progress/index.js +52 -0
- package/lib/progress/index.json +3 -0
- package/lib/progress/index.wxml +20 -0
- package/lib/progress/index.wxs +36 -0
- package/lib/progress/index.wxss +1 -0
- package/lib/radio/index.css +1 -0
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/index.js +75 -0
- package/lib/radio/index.json +6 -0
- package/lib/radio/index.wxml +32 -0
- package/lib/radio/index.wxs +33 -0
- package/lib/radio/index.wxss +1 -0
- package/lib/radio-group/index.css +1 -0
- package/lib/radio-group/index.d.ts +1 -0
- package/lib/radio-group/index.js +29 -0
- package/lib/radio-group/index.json +3 -0
- package/lib/radio-group/index.wxml +5 -0
- package/lib/radio-group/index.wxss +1 -0
- package/lib/rate/index.css +1 -0
- package/lib/rate/index.d.ts +1 -0
- package/lib/rate/index.js +107 -0
- package/lib/rate/index.json +6 -0
- package/lib/rate/index.wxml +35 -0
- package/lib/rate/index.wxss +1 -0
- package/lib/row/index.css +1 -0
- package/lib/row/index.d.ts +1 -0
- package/lib/row/index.js +26 -0
- package/lib/row/index.json +3 -0
- package/lib/row/index.wxml +5 -0
- package/lib/row/index.wxs +18 -0
- package/lib/row/index.wxss +1 -0
- package/lib/search/index.css +1 -0
- package/lib/search/index.d.ts +1 -0
- package/lib/search/index.js +106 -0
- package/lib/search/index.json +7 -0
- package/lib/search/index.wxml +57 -0
- package/lib/search/index.wxss +1 -0
- package/lib/sidebar/index.css +1 -0
- package/lib/sidebar/index.d.ts +1 -0
- package/lib/sidebar/index.js +36 -0
- package/lib/sidebar/index.json +3 -0
- package/lib/sidebar/index.wxml +3 -0
- package/lib/sidebar/index.wxss +1 -0
- package/lib/sidebar-item/index.css +1 -0
- package/lib/sidebar-item/index.d.ts +1 -0
- package/lib/sidebar-item/index.js +32 -0
- package/lib/sidebar-item/index.json +6 -0
- package/lib/sidebar-item/index.wxml +18 -0
- package/lib/sidebar-item/index.wxss +1 -0
- package/lib/skeleton/index.css +1 -0
- package/lib/skeleton/index.d.ts +1 -0
- package/lib/skeleton/index.js +48 -0
- package/lib/skeleton/index.json +4 -0
- package/lib/skeleton/index.wxml +29 -0
- package/lib/skeleton/index.wxss +1 -0
- package/lib/slider/index.css +1 -0
- package/lib/slider/index.d.ts +1 -0
- package/lib/slider/index.js +208 -0
- package/lib/slider/index.json +3 -0
- package/lib/slider/index.wxml +68 -0
- package/lib/slider/index.wxs +14 -0
- package/lib/slider/index.wxss +1 -0
- package/lib/stepper/index.css +1 -0
- package/lib/stepper/index.d.ts +1 -0
- package/lib/stepper/index.js +225 -0
- package/lib/stepper/index.json +6 -0
- package/lib/stepper/index.wxml +45 -0
- package/lib/stepper/index.wxs +32 -0
- package/lib/stepper/index.wxss +1 -0
- package/lib/steps/index.css +1 -0
- package/lib/steps/index.d.ts +1 -0
- package/lib/steps/index.js +39 -0
- package/lib/steps/index.json +6 -0
- package/lib/steps/index.wxml +54 -0
- package/lib/steps/index.wxss +1 -0
- package/lib/sticky/index.css +1 -0
- package/lib/sticky/index.d.ts +1 -0
- package/lib/sticky/index.js +128 -0
- package/lib/sticky/index.json +3 -0
- package/lib/sticky/index.wxml +8 -0
- package/lib/sticky/index.wxs +25 -0
- package/lib/sticky/index.wxss +1 -0
- package/lib/swipe-cell/index.css +1 -0
- package/lib/swipe-cell/index.d.ts +1 -0
- package/lib/swipe-cell/index.js +142 -0
- package/lib/swipe-cell/index.json +3 -0
- package/lib/swipe-cell/index.wxml +21 -0
- package/lib/swipe-cell/index.wxss +1 -0
- package/lib/switch/index.css +1 -0
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/index.js +44 -0
- package/lib/switch/index.json +6 -0
- package/lib/switch/index.wxml +51 -0
- package/lib/switch/index.wxs +26 -0
- package/lib/switch/index.wxss +1 -0
- package/lib/tab/index.css +1 -0
- package/lib/tab/index.d.ts +1 -0
- package/lib/tab/index.js +66 -0
- package/lib/tab/index.json +3 -0
- package/lib/tab/index.wxml +8 -0
- package/lib/tab/index.wxss +1 -0
- package/lib/tabbar/index.css +1 -0
- package/lib/tabbar/index.d.ts +1 -0
- package/lib/tabbar/index.js +73 -0
- package/lib/tabbar/index.json +3 -0
- package/lib/tabbar/index.wxml +12 -0
- package/lib/tabbar/index.wxss +1 -0
- package/lib/tabbar-item/index.css +1 -0
- package/lib/tabbar-item/index.d.ts +1 -0
- package/lib/tabbar-item/index.js +79 -0
- package/lib/tabbar-item/index.json +7 -0
- package/lib/tabbar-item/index.wxml +32 -0
- package/lib/tabbar-item/index.wxss +1 -0
- package/lib/tabs/index.css +1 -0
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/index.js +329 -0
- package/lib/tabs/index.json +7 -0
- package/lib/tabs/index.wxml +67 -0
- package/lib/tabs/index.wxs +99 -0
- package/lib/tabs/index.wxss +1 -0
- package/lib/tag/index.css +1 -0
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/index.js +34 -0
- package/lib/tag/index.json +6 -0
- package/lib/tag/index.wxml +17 -0
- package/lib/tag/index.wxs +13 -0
- package/lib/tag/index.wxss +1 -0
- package/lib/toast/icons.d.ts +3 -0
- package/lib/toast/icons.js +12 -0
- package/lib/toast/index.css +1 -0
- package/lib/toast/index.d.ts +1 -0
- package/lib/toast/index.js +63 -0
- package/lib/toast/index.json +9 -0
- package/lib/toast/index.wxml +33 -0
- package/lib/toast/index.wxss +1 -0
- package/lib/toast/toast.d.ts +35 -0
- package/lib/toast/toast.js +116 -0
- package/lib/transition/index.css +1 -0
- package/lib/transition/index.d.ts +1 -0
- package/lib/transition/index.js +15 -0
- package/lib/transition/index.json +3 -0
- package/lib/transition/index.wxml +9 -0
- package/lib/transition/index.wxs +17 -0
- package/lib/transition/index.wxss +1 -0
- package/lib/tree-select/index.css +1 -0
- package/lib/tree-select/index.d.ts +1 -0
- package/lib/tree-select/index.js +74 -0
- package/lib/tree-select/index.json +8 -0
- package/lib/tree-select/index.wxml +41 -0
- package/lib/tree-select/index.wxs +12 -0
- package/lib/tree-select/index.wxss +1 -0
- package/lib/wxs/add-unit.wxs +12 -0
- package/lib/wxs/array.wxs +5 -0
- package/lib/wxs/bem.wxs +39 -0
- package/lib/wxs/memoize.wxs +55 -0
- package/lib/wxs/object.wxs +13 -0
- package/lib/wxs/style.wxs +46 -0
- package/lib/wxs/utils.wxs +85 -0
- package/package.json +2 -2
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { SmartComponent } from '../common/component';
|
|
13
|
+
import { isDef } from '../common/validator';
|
|
14
|
+
import { pickerProps } from '../picker/shared';
|
|
15
|
+
import { range, replacePlaceholders } from '../common/utils';
|
|
16
|
+
const currentYear = new Date().getFullYear();
|
|
17
|
+
function isValidDate(date) {
|
|
18
|
+
return isDef(date) && !isNaN(new Date(date).getTime());
|
|
19
|
+
}
|
|
20
|
+
function padZero(val) {
|
|
21
|
+
return `00${val}`.slice(-2);
|
|
22
|
+
}
|
|
23
|
+
function times(n, iteratee) {
|
|
24
|
+
let index = -1;
|
|
25
|
+
const result = Array(n < 0 ? 0 : n);
|
|
26
|
+
while (++index < n) {
|
|
27
|
+
result[index] = iteratee(index);
|
|
28
|
+
}
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
function getTrueValue(formattedValue) {
|
|
32
|
+
if (formattedValue === undefined) {
|
|
33
|
+
formattedValue = '1';
|
|
34
|
+
}
|
|
35
|
+
while (isNaN(parseInt(formattedValue, 10))) {
|
|
36
|
+
formattedValue = formattedValue.slice(1);
|
|
37
|
+
}
|
|
38
|
+
return parseInt(formattedValue, 10);
|
|
39
|
+
}
|
|
40
|
+
function getMonthEndDay(year, month) {
|
|
41
|
+
return 32 - new Date(year, month - 1, 32).getDate();
|
|
42
|
+
}
|
|
43
|
+
function findIntersection(range1, range2) {
|
|
44
|
+
const [start1, end1] = range1;
|
|
45
|
+
const [start2, end2] = range2;
|
|
46
|
+
// 确定交集的开始和结束
|
|
47
|
+
const intersectionStart = Math.max(start1, start2);
|
|
48
|
+
const intersectionEnd = Math.min(end1, end2);
|
|
49
|
+
// 检查是否有交集
|
|
50
|
+
if (intersectionStart <= intersectionEnd) {
|
|
51
|
+
return [intersectionStart, intersectionEnd];
|
|
52
|
+
}
|
|
53
|
+
return []; // 没有交集
|
|
54
|
+
}
|
|
55
|
+
const defaultFormatter = (type, value) => value;
|
|
56
|
+
SmartComponent({
|
|
57
|
+
classes: ['active-class', 'toolbar-class', 'column-class'],
|
|
58
|
+
props: Object.assign(Object.assign({}, pickerProps), { value: {
|
|
59
|
+
type: null,
|
|
60
|
+
observer: 'updateValue',
|
|
61
|
+
}, filter: null, type: {
|
|
62
|
+
type: String,
|
|
63
|
+
value: 'datetime',
|
|
64
|
+
observer: 'updateValue',
|
|
65
|
+
}, showToolbar: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
value: true,
|
|
68
|
+
}, locale: {
|
|
69
|
+
type: Object,
|
|
70
|
+
}, formatter: {
|
|
71
|
+
type: null,
|
|
72
|
+
value: defaultFormatter,
|
|
73
|
+
}, amText: {
|
|
74
|
+
type: String,
|
|
75
|
+
value: 'AM',
|
|
76
|
+
}, pmText: {
|
|
77
|
+
type: String,
|
|
78
|
+
value: 'PM',
|
|
79
|
+
}, columnsOrder: {
|
|
80
|
+
type: Array,
|
|
81
|
+
value: [],
|
|
82
|
+
}, is12HourClock: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
value: false,
|
|
85
|
+
}, minDate: {
|
|
86
|
+
type: Number,
|
|
87
|
+
value: new Date(currentYear - 10, 0, 1).getTime(),
|
|
88
|
+
observer: 'updateValue',
|
|
89
|
+
}, maxDate: {
|
|
90
|
+
type: Number,
|
|
91
|
+
value: new Date(currentYear + 10, 11, 31).getTime(),
|
|
92
|
+
observer: 'updateValue',
|
|
93
|
+
}, minHour: {
|
|
94
|
+
type: Number,
|
|
95
|
+
value: 0,
|
|
96
|
+
observer: 'updateValue',
|
|
97
|
+
}, maxHour: {
|
|
98
|
+
type: Number,
|
|
99
|
+
value: 23,
|
|
100
|
+
observer: 'updateValue',
|
|
101
|
+
}, minMinute: {
|
|
102
|
+
type: Number,
|
|
103
|
+
value: 0,
|
|
104
|
+
observer: 'updateValue',
|
|
105
|
+
}, maxMinute: {
|
|
106
|
+
type: Number,
|
|
107
|
+
value: 59,
|
|
108
|
+
observer: 'updateValue',
|
|
109
|
+
}, formatterMap: {
|
|
110
|
+
type: Object,
|
|
111
|
+
value: undefined,
|
|
112
|
+
}, columnStyles: {
|
|
113
|
+
type: Object,
|
|
114
|
+
value: undefined,
|
|
115
|
+
}, fontStyles: {
|
|
116
|
+
type: Object,
|
|
117
|
+
value: undefined,
|
|
118
|
+
} }),
|
|
119
|
+
data: {
|
|
120
|
+
part: 'am',
|
|
121
|
+
innerValue: Date.now(),
|
|
122
|
+
isCreated: false,
|
|
123
|
+
columns: [],
|
|
124
|
+
},
|
|
125
|
+
created() {
|
|
126
|
+
const innerValue = this.correctValue(this.data.value);
|
|
127
|
+
this.updateColumnValue(innerValue);
|
|
128
|
+
if (innerValue !== this.data.value) {
|
|
129
|
+
this.$emit('input', innerValue);
|
|
130
|
+
}
|
|
131
|
+
this.setData({
|
|
132
|
+
isCreated: true,
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
methods: {
|
|
136
|
+
updateValue() {
|
|
137
|
+
const { value, innerValue, isCreated } = this.data;
|
|
138
|
+
if (!isCreated)
|
|
139
|
+
return;
|
|
140
|
+
const val = this.correctValue(value);
|
|
141
|
+
const isEqual = val === innerValue;
|
|
142
|
+
this.updateColumnValue(val);
|
|
143
|
+
if (!isEqual) {
|
|
144
|
+
this.$emit('input', val);
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
getPicker() {
|
|
148
|
+
if (this.picker == null) {
|
|
149
|
+
this.picker = this.selectComponent('.smart-datetime-picker');
|
|
150
|
+
const { picker } = this;
|
|
151
|
+
const { setColumnValues } = picker;
|
|
152
|
+
picker.setColumnValues = (...args) => setColumnValues.apply(picker, [...args, false]);
|
|
153
|
+
}
|
|
154
|
+
return this.picker;
|
|
155
|
+
},
|
|
156
|
+
getTimeBoundary() {
|
|
157
|
+
const { type, is12HourClock, minHour, maxHour, minMinute, maxMinute } = this.data;
|
|
158
|
+
if (type === 'time' && is12HourClock) {
|
|
159
|
+
if (minHour === 1 && maxHour === 24) {
|
|
160
|
+
return {
|
|
161
|
+
minHour: 0,
|
|
162
|
+
maxHour: 23,
|
|
163
|
+
minMinute,
|
|
164
|
+
maxMinute,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
minHour,
|
|
170
|
+
maxHour,
|
|
171
|
+
minMinute,
|
|
172
|
+
maxMinute,
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
formatterFunc(type, value, data) {
|
|
176
|
+
var _a, _b;
|
|
177
|
+
if (type === 'part') {
|
|
178
|
+
return value === 'am' ? data.amText : data.pmText;
|
|
179
|
+
}
|
|
180
|
+
const { formatterMap, formatter = defaultFormatter } = (_a = this === null || this === void 0 ? void 0 : this.data) !== null && _a !== void 0 ? _a : data;
|
|
181
|
+
const mapDetail = formatterMap === null || formatterMap === void 0 ? void 0 : formatterMap[type];
|
|
182
|
+
if (typeof mapDetail === 'string') {
|
|
183
|
+
return replacePlaceholders(mapDetail, { [type]: value });
|
|
184
|
+
}
|
|
185
|
+
if (typeof mapDetail === 'object') {
|
|
186
|
+
return (_b = mapDetail[value]) !== null && _b !== void 0 ? _b : formatter(type, value);
|
|
187
|
+
}
|
|
188
|
+
return formatter(type, value);
|
|
189
|
+
},
|
|
190
|
+
updateColumns(values) {
|
|
191
|
+
const { locale, columnStyles, fontStyles } = this.data;
|
|
192
|
+
const results = this.getOriginColumns().map((column, index) => {
|
|
193
|
+
const value = values[index];
|
|
194
|
+
const list = column.values.map(value => this.formatterFunc(column.type, value, this.data));
|
|
195
|
+
const activeIndex = list.findIndex(item => item === value);
|
|
196
|
+
return {
|
|
197
|
+
values: list,
|
|
198
|
+
order: column.order,
|
|
199
|
+
unit: locale === null || locale === void 0 ? void 0 : locale[column.type],
|
|
200
|
+
style: columnStyles === null || columnStyles === void 0 ? void 0 : columnStyles[column.type],
|
|
201
|
+
fontStyle: fontStyles === null || fontStyles === void 0 ? void 0 : fontStyles[column.type],
|
|
202
|
+
activeIndex: activeIndex === -1 ? 0 : activeIndex,
|
|
203
|
+
loop: !['12HourClock', 'year'].includes(column.type),
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
return this.setData({ columns: results });
|
|
207
|
+
},
|
|
208
|
+
getOriginColumns() {
|
|
209
|
+
const { part, filter, is12HourClock, type, amText, pmText, columnsOrder } = this.data;
|
|
210
|
+
const { minHour, maxHour } = this.getTimeBoundary();
|
|
211
|
+
const results = this.getRanges().map(({ type: timeType, range }, index) => {
|
|
212
|
+
const order = columnsOrder[index];
|
|
213
|
+
let values = times(range[1] - range[0] + 1, index => {
|
|
214
|
+
const value = range[0] + index;
|
|
215
|
+
if (is12HourClock && type === 'time' && timeType === 'hour') {
|
|
216
|
+
if (part === 'pm') {
|
|
217
|
+
if (value === 12)
|
|
218
|
+
return '12';
|
|
219
|
+
return padZero(value - 12);
|
|
220
|
+
}
|
|
221
|
+
if (value === 0)
|
|
222
|
+
return '12';
|
|
223
|
+
return padZero(value);
|
|
224
|
+
}
|
|
225
|
+
return timeType === 'year' ? `${value}` : padZero(value);
|
|
226
|
+
});
|
|
227
|
+
if (filter) {
|
|
228
|
+
values = filter(timeType, values);
|
|
229
|
+
}
|
|
230
|
+
return { type: timeType, values, order };
|
|
231
|
+
});
|
|
232
|
+
if (is12HourClock && type === 'time') {
|
|
233
|
+
return [
|
|
234
|
+
{
|
|
235
|
+
type: '12HourClock',
|
|
236
|
+
values: minHour > 11 ? [pmText] : maxHour < 12 ? [amText] : [amText, pmText],
|
|
237
|
+
order: columnsOrder[0],
|
|
238
|
+
},
|
|
239
|
+
...results.map((item, index) => (Object.assign(Object.assign({}, item), { order: columnsOrder[index + 1] }))),
|
|
240
|
+
].filter(Boolean);
|
|
241
|
+
}
|
|
242
|
+
return results;
|
|
243
|
+
},
|
|
244
|
+
getRanges() {
|
|
245
|
+
const { data } = this;
|
|
246
|
+
if (data.type === 'time' && data.is12HourClock) {
|
|
247
|
+
const { minHour, maxHour, minMinute, maxMinute } = this.getTimeBoundary();
|
|
248
|
+
const { part } = data;
|
|
249
|
+
const time12Range = part === 'pm' ? [12, 23] : [0, 11];
|
|
250
|
+
return [
|
|
251
|
+
{
|
|
252
|
+
type: 'hour',
|
|
253
|
+
range: findIntersection(time12Range, [minHour, maxHour]),
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
type: 'minute',
|
|
257
|
+
range: [minMinute, maxMinute],
|
|
258
|
+
},
|
|
259
|
+
];
|
|
260
|
+
}
|
|
261
|
+
if (data.type === 'time') {
|
|
262
|
+
const { minHour, maxHour, minMinute, maxMinute } = this.getTimeBoundary();
|
|
263
|
+
return [
|
|
264
|
+
{
|
|
265
|
+
type: 'hour',
|
|
266
|
+
range: [minHour, maxHour],
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
type: 'minute',
|
|
270
|
+
range: [minMinute, maxMinute],
|
|
271
|
+
},
|
|
272
|
+
];
|
|
273
|
+
}
|
|
274
|
+
const { maxYear, maxDate, maxMonth, maxHour, maxMinute } = this.getBoundary('max', data.innerValue);
|
|
275
|
+
const { minYear, minDate, minMonth, minHour, minMinute } = this.getBoundary('min', data.innerValue);
|
|
276
|
+
const result = [
|
|
277
|
+
{
|
|
278
|
+
type: 'year',
|
|
279
|
+
range: [minYear, maxYear],
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
type: 'month',
|
|
283
|
+
range: [minMonth, maxMonth],
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
type: 'day',
|
|
287
|
+
range: [minDate, maxDate],
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
type: 'hour',
|
|
291
|
+
range: [minHour, maxHour],
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
type: 'minute',
|
|
295
|
+
range: [minMinute, maxMinute],
|
|
296
|
+
},
|
|
297
|
+
];
|
|
298
|
+
if (data.type === 'date')
|
|
299
|
+
result.splice(3, 2);
|
|
300
|
+
if (data.type === 'year-month')
|
|
301
|
+
result.splice(2, 3);
|
|
302
|
+
return result;
|
|
303
|
+
},
|
|
304
|
+
correctValue(value) {
|
|
305
|
+
const { data } = this;
|
|
306
|
+
// validate value
|
|
307
|
+
const isDateType = data.type !== 'time';
|
|
308
|
+
if (isDateType && !isValidDate(value)) {
|
|
309
|
+
value = data.minDate;
|
|
310
|
+
}
|
|
311
|
+
else if (!isDateType && !value) {
|
|
312
|
+
const { minHour } = data;
|
|
313
|
+
value = `${padZero(minHour)}:00`;
|
|
314
|
+
}
|
|
315
|
+
// time type
|
|
316
|
+
if (!isDateType) {
|
|
317
|
+
const { minHour, maxHour, minMinute, maxMinute } = this.getTimeBoundary();
|
|
318
|
+
let [hour, minute] = value.split(':');
|
|
319
|
+
if (Number(hour) === 24) {
|
|
320
|
+
hour = 0;
|
|
321
|
+
}
|
|
322
|
+
hour = padZero(range(hour, minHour, maxHour));
|
|
323
|
+
minute = padZero(range(minute, minMinute, maxMinute));
|
|
324
|
+
return `${hour}:${minute}`;
|
|
325
|
+
}
|
|
326
|
+
// date type
|
|
327
|
+
value = Math.max(value, data.minDate);
|
|
328
|
+
value = Math.min(value, data.maxDate);
|
|
329
|
+
return value;
|
|
330
|
+
},
|
|
331
|
+
getBoundary(type, innerValue) {
|
|
332
|
+
const value = new Date(innerValue);
|
|
333
|
+
const boundary = new Date(this.data[`${type}Date`]);
|
|
334
|
+
const year = boundary.getFullYear();
|
|
335
|
+
let month = 1;
|
|
336
|
+
let date = 1;
|
|
337
|
+
let hour = 0;
|
|
338
|
+
let minute = 0;
|
|
339
|
+
if (type === 'max') {
|
|
340
|
+
month = 12;
|
|
341
|
+
date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
|
|
342
|
+
hour = 23;
|
|
343
|
+
minute = 59;
|
|
344
|
+
}
|
|
345
|
+
if (value.getFullYear() === year) {
|
|
346
|
+
month = boundary.getMonth() + 1;
|
|
347
|
+
if (value.getMonth() + 1 === month) {
|
|
348
|
+
date = boundary.getDate();
|
|
349
|
+
if (value.getDate() === date) {
|
|
350
|
+
hour = boundary.getHours();
|
|
351
|
+
if (value.getHours() === hour) {
|
|
352
|
+
minute = boundary.getMinutes();
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return {
|
|
358
|
+
[`${type}Year`]: year,
|
|
359
|
+
[`${type}Month`]: month,
|
|
360
|
+
[`${type}Date`]: date,
|
|
361
|
+
[`${type}Hour`]: hour,
|
|
362
|
+
[`${type}Minute`]: minute,
|
|
363
|
+
};
|
|
364
|
+
},
|
|
365
|
+
onCancel() {
|
|
366
|
+
this.$emit('cancel');
|
|
367
|
+
},
|
|
368
|
+
onConfirm() {
|
|
369
|
+
this.$emit('confirm', this.data.innerValue);
|
|
370
|
+
},
|
|
371
|
+
onChange() {
|
|
372
|
+
const { data } = this;
|
|
373
|
+
let value;
|
|
374
|
+
const picker = this.getPicker();
|
|
375
|
+
const indexes = picker.getIndexes();
|
|
376
|
+
if (data.type === 'time' && data.is12HourClock) {
|
|
377
|
+
const originColumns = this.getOriginColumns();
|
|
378
|
+
const [partText, hour, minute] = indexes.map((item, index) => originColumns[index].values[item]);
|
|
379
|
+
const part = partText === this.data.pmText ? 'pm' : 'am';
|
|
380
|
+
this.setData({
|
|
381
|
+
part,
|
|
382
|
+
});
|
|
383
|
+
value = `${part === 'pm'
|
|
384
|
+
? hour === '12'
|
|
385
|
+
? 12
|
|
386
|
+
: Number(hour) + 12
|
|
387
|
+
: hour === '12'
|
|
388
|
+
? 0
|
|
389
|
+
: Number(hour)}:${Number(minute)}`;
|
|
390
|
+
}
|
|
391
|
+
else if (data.type === 'time') {
|
|
392
|
+
const originColumns = this.getOriginColumns();
|
|
393
|
+
value = `${+originColumns[0].values[indexes[0]]}:${+originColumns[1].values[indexes[1]]}`;
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
const originColumns = this.getOriginColumns();
|
|
397
|
+
const values = indexes.map((value, index) => originColumns[index].values[value]);
|
|
398
|
+
const year = getTrueValue(values[0]);
|
|
399
|
+
const month = getTrueValue(values[1]);
|
|
400
|
+
const maxDate = getMonthEndDay(year, month);
|
|
401
|
+
let date = getTrueValue(values[2]);
|
|
402
|
+
if (data.type === 'year-month') {
|
|
403
|
+
date = 1;
|
|
404
|
+
}
|
|
405
|
+
date = date > maxDate ? maxDate : date;
|
|
406
|
+
let hour = 0;
|
|
407
|
+
let minute = 0;
|
|
408
|
+
if (data.type === 'datetime') {
|
|
409
|
+
hour = getTrueValue(values[3]);
|
|
410
|
+
minute = getTrueValue(values[4]);
|
|
411
|
+
}
|
|
412
|
+
value = new Date(year, month - 1, date, hour, minute);
|
|
413
|
+
}
|
|
414
|
+
value = this.correctValue(value);
|
|
415
|
+
this.updateColumnValue(value);
|
|
416
|
+
picker.value = value;
|
|
417
|
+
this.$emit('input', value);
|
|
418
|
+
this.$emit('change', picker);
|
|
419
|
+
},
|
|
420
|
+
updateColumnValue(value) {
|
|
421
|
+
let values = [];
|
|
422
|
+
const _a = this.data, { columns, part, value: outerValue } = _a, rest = __rest(_a, ["columns", "part", "value"]);
|
|
423
|
+
rest.innerValue = value;
|
|
424
|
+
const dataStr = JSON.stringify(rest);
|
|
425
|
+
if (dataStr === this.preDataStr)
|
|
426
|
+
return;
|
|
427
|
+
this.preDataStr = dataStr;
|
|
428
|
+
const { type, is12HourClock } = this.data;
|
|
429
|
+
const formatter = this.formatterFunc;
|
|
430
|
+
if (type === 'time' && is12HourClock) {
|
|
431
|
+
const [hour, minute] = value.split(':');
|
|
432
|
+
const part = Number(hour) < 12 ? 'am' : 'pm';
|
|
433
|
+
this.setData({
|
|
434
|
+
part,
|
|
435
|
+
});
|
|
436
|
+
values = [
|
|
437
|
+
formatter('part', part, this.data),
|
|
438
|
+
formatter('hour', part === 'am'
|
|
439
|
+
? hour === '0'
|
|
440
|
+
? '12'
|
|
441
|
+
: hour
|
|
442
|
+
: hour === '12'
|
|
443
|
+
? '12'
|
|
444
|
+
: padZero(Number(hour) - 12), this.data),
|
|
445
|
+
formatter('minute', minute, this.data),
|
|
446
|
+
];
|
|
447
|
+
}
|
|
448
|
+
else if (type === 'time') {
|
|
449
|
+
const pair = value.split(':');
|
|
450
|
+
values = [formatter('hour', pair[0], this.data), formatter('minute', pair[1], this.data)];
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
const date = new Date(value);
|
|
454
|
+
values = [
|
|
455
|
+
formatter('year', `${date.getFullYear()}`, this.data),
|
|
456
|
+
formatter('month', padZero(date.getMonth() + 1), this.data),
|
|
457
|
+
];
|
|
458
|
+
if (type === 'date') {
|
|
459
|
+
values.push(formatter('day', padZero(date.getDate()), this.data));
|
|
460
|
+
}
|
|
461
|
+
if (type === 'datetime') {
|
|
462
|
+
values.push(formatter('day', padZero(date.getDate()), this.data), formatter('hour', padZero(date.getHours()), this.data), formatter('minute', padZero(date.getMinutes()), this.data));
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
this.setData({ innerValue: value });
|
|
466
|
+
this.updateColumns(values);
|
|
467
|
+
// picker.setValues(values);
|
|
468
|
+
// return this.set({ innerValue: value })
|
|
469
|
+
// .then(() => this.updateColumns())
|
|
470
|
+
// .then(() => picker.setValues(values));
|
|
471
|
+
},
|
|
472
|
+
onAnimationStart() {
|
|
473
|
+
this.$emit('animation-start');
|
|
474
|
+
},
|
|
475
|
+
onAnimationEnd() {
|
|
476
|
+
this.$emit('animation-end');
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<smart-picker
|
|
2
|
+
class="smart-datetime-picker"
|
|
3
|
+
active-class="active-class"
|
|
4
|
+
toolbar-class="toolbar-class"
|
|
5
|
+
column-class="column-class"
|
|
6
|
+
hairline-class="smart-datetime-picker-hairline"
|
|
7
|
+
title="{{ title }}"
|
|
8
|
+
columns="{{ columns }}"
|
|
9
|
+
item-height="{{ itemHeight }}"
|
|
10
|
+
active-style="{{ activeStyle }}"
|
|
11
|
+
animation-time="{{ animationTime }}"
|
|
12
|
+
show-toolbar="{{ showToolbar }}"
|
|
13
|
+
visible-item-count="{{ visibleItemCount }}"
|
|
14
|
+
confirm-button-text="{{ confirmButtonText }}"
|
|
15
|
+
cancel-button-text="{{ cancelButtonText }}"
|
|
16
|
+
change-animation="{{ changeAnimation }}"
|
|
17
|
+
bind:change="onChange"
|
|
18
|
+
bind:confirm="onConfirm"
|
|
19
|
+
bind:cancel="onCancel"
|
|
20
|
+
bind:animation-start="onAnimationStart"
|
|
21
|
+
bind:animation-end="onAnimationEnd"
|
|
22
|
+
/>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-bottom-sheet-dragger-node-background:rgba(0,0,0,.3);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-bottom-sheet-dragger-node-background:hsla(0,0%,100%,.3);--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-manrope{font-family:Manrope,sans-serif}:host{width:100%}.smart-datetime-picker{--hairline-color:transparent}.smart-datetime-picker-hairline{border-image-slice:1;border-image-source:var(--hairline-border-image-color,var(--smart-ui-border-image,linear-gradient(to right,transparent,rgba(0,0,0,.3),transparent)));border-style:solid;border-width:.5px 0;position:absolute}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="miniprogram-api-typings" />
|
|
2
|
+
interface SmartComponentInstance {
|
|
3
|
+
parent: WechatMiniprogram.Component.TrivialInstance;
|
|
4
|
+
children: WechatMiniprogram.Component.TrivialInstance[];
|
|
5
|
+
index: number;
|
|
6
|
+
$emit: (name: string, detail?: unknown, options?: WechatMiniprogram.Component.TriggerEventOption) => void;
|
|
7
|
+
setView: (value: Record<string, any>, callback?: () => void) => void;
|
|
8
|
+
}
|
|
9
|
+
export type SmartComponentOptions<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption> = {
|
|
10
|
+
data?: Data;
|
|
11
|
+
field?: boolean;
|
|
12
|
+
classes?: string[];
|
|
13
|
+
mixins?: string[];
|
|
14
|
+
props?: Props;
|
|
15
|
+
relation?: {
|
|
16
|
+
relations: Record<string, WechatMiniprogram.Component.RelationOption>;
|
|
17
|
+
mixin: string;
|
|
18
|
+
};
|
|
19
|
+
watch?: Record<string, (...args: any[]) => any>;
|
|
20
|
+
methods?: Methods;
|
|
21
|
+
beforeCreate?: () => void;
|
|
22
|
+
created?: () => void;
|
|
23
|
+
mounted?: () => void;
|
|
24
|
+
destroyed?: () => void;
|
|
25
|
+
} & ThisType<SmartComponentInstance & WechatMiniprogram.Component.Instance<Data & {
|
|
26
|
+
name: string;
|
|
27
|
+
value: any;
|
|
28
|
+
} & Record<string, any>, Props, Methods> & Record<string, any>>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/// <reference types="miniprogram-api-typings" />
|
|
2
|
+
/// <reference types="miniprogram-api-typings" />
|
|
3
|
+
export type Action = 'confirm' | 'cancel' | 'overlay';
|
|
4
|
+
type DialogContext = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
|
|
5
|
+
type AnyObject = {};
|
|
6
|
+
interface DialogOptions {
|
|
7
|
+
lang?: string;
|
|
8
|
+
show?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
icon?: boolean | string;
|
|
11
|
+
iconColor?: string;
|
|
12
|
+
iconSize?: string;
|
|
13
|
+
nativeDisabled?: boolean;
|
|
14
|
+
width?: string | number | null;
|
|
15
|
+
zIndex?: number;
|
|
16
|
+
theme?: string;
|
|
17
|
+
context?: (() => DialogContext) | DialogContext;
|
|
18
|
+
message?: string;
|
|
19
|
+
overlay?: boolean;
|
|
20
|
+
selector?: string;
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
customStyle?: string;
|
|
23
|
+
transition?: string;
|
|
24
|
+
autoClose?: boolean;
|
|
25
|
+
beforeClose?: null | ((action: Action, value?: string) => Promise<void | boolean> | void);
|
|
26
|
+
businessId?: number;
|
|
27
|
+
sessionFrom?: string;
|
|
28
|
+
overlayStyle?: string;
|
|
29
|
+
appParameter?: string;
|
|
30
|
+
messageAlign?: string;
|
|
31
|
+
sendMessageImg?: string;
|
|
32
|
+
showMessageCard?: boolean;
|
|
33
|
+
sendMessagePath?: string;
|
|
34
|
+
sendMessageTitle?: string;
|
|
35
|
+
confirmButtonText?: string;
|
|
36
|
+
cancelButtonText?: string;
|
|
37
|
+
showConfirmButton?: boolean;
|
|
38
|
+
showCancelButton?: boolean;
|
|
39
|
+
closeOnClickOverlay?: boolean;
|
|
40
|
+
confirmButtonOpenType?: string;
|
|
41
|
+
value?: null | string;
|
|
42
|
+
ignoreQueue?: boolean;
|
|
43
|
+
password?: boolean;
|
|
44
|
+
placeholder?: string;
|
|
45
|
+
maxlength?: number;
|
|
46
|
+
}
|
|
47
|
+
interface DialogInputOptions extends DialogOptions {
|
|
48
|
+
value: string;
|
|
49
|
+
type?: string;
|
|
50
|
+
password?: boolean;
|
|
51
|
+
placeholder?: string;
|
|
52
|
+
maxlength?: number;
|
|
53
|
+
emptyDisabled?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare const contextRef: {
|
|
56
|
+
value: Record<string, DialogContext | null>;
|
|
57
|
+
};
|
|
58
|
+
declare const Dialog: {
|
|
59
|
+
(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
|
|
60
|
+
alert(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
|
|
61
|
+
confirm(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
|
|
62
|
+
input: (options: DialogInputOptions) => Promise<WechatMiniprogram.Component.Instance<{
|
|
63
|
+
/**
|
|
64
|
+
* 输入框的当前值
|
|
65
|
+
*/
|
|
66
|
+
inputValue: string;
|
|
67
|
+
}, AnyObject, AnyObject>>;
|
|
68
|
+
close(): void;
|
|
69
|
+
stopLoading(): void;
|
|
70
|
+
currentOptions: DialogOptions;
|
|
71
|
+
defaultOptions: DialogOptions;
|
|
72
|
+
setDefaultOptions(options: DialogOptions): void;
|
|
73
|
+
resetDefaultOptions(): void;
|
|
74
|
+
};
|
|
75
|
+
export default Dialog;
|