stellar-ui-plus 1.16.18
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/README.md +176 -0
- package/common/css/common.scss +19 -0
- package/common/useProps.js +9 -0
- package/components/ste-animate/ATTRIBUTES.md +10 -0
- package/components/ste-animate/README.md +115 -0
- package/components/ste-animate/animate.scss +247 -0
- package/components/ste-animate/config.json +5 -0
- package/components/ste-animate/props.ts +9 -0
- package/components/ste-animate/ste-animate.easycom.json +39 -0
- package/components/ste-animate/ste-animate.scss +113 -0
- package/components/ste-animate/ste-animate.vue +67 -0
- package/components/ste-badge/ATTRIBUTES.md +17 -0
- package/components/ste-badge/README.md +162 -0
- package/components/ste-badge/config.json +5 -0
- package/components/ste-badge/props.ts +17 -0
- package/components/ste-badge/ste-badge.easycom.json +96 -0
- package/components/ste-badge/ste-badge.vue +157 -0
- package/components/ste-barcode/ATTRIBUTES.md +14 -0
- package/components/ste-barcode/README.md +28 -0
- package/components/ste-barcode/config.json +5 -0
- package/components/ste-barcode/encode.ts +317 -0
- package/components/ste-barcode/props.ts +7 -0
- package/components/ste-barcode/ste-barcode.easycom.json +44 -0
- package/components/ste-barcode/ste-barcode.vue +152 -0
- package/components/ste-button/ATTRIBUTES.md +32 -0
- package/components/ste-button/README.md +119 -0
- package/components/ste-button/config.json +5 -0
- package/components/ste-button/props.ts +21 -0
- package/components/ste-button/ste-button.easycom.json +168 -0
- package/components/ste-button/ste-button.vue +275 -0
- package/components/ste-calendar/ATTRIBUTES.md +31 -0
- package/components/ste-calendar/README.md +241 -0
- package/components/ste-calendar/config.json +5 -0
- package/components/ste-calendar/date.ts +110 -0
- package/components/ste-calendar/props.ts +26 -0
- package/components/ste-calendar/ste-calendar.easycom.json +172 -0
- package/components/ste-calendar/ste-calendar.vue +376 -0
- package/components/ste-calendar/useData.ts +30 -0
- package/components/ste-checkbox/ATTRIBUTES.md +25 -0
- package/components/ste-checkbox/README.md +302 -0
- package/components/ste-checkbox/config.json +5 -0
- package/components/ste-checkbox/props.ts +33 -0
- package/components/ste-checkbox/ste-checkbox.easycom.json +151 -0
- package/components/ste-checkbox/ste-checkbox.vue +206 -0
- package/components/ste-checkbox/type.d.ts +2 -0
- package/components/ste-checkbox-group/props.ts +34 -0
- package/components/ste-checkbox-group/ste-checkbox-group.vue +34 -0
- package/components/ste-code-input/ATTRIBUTES.md +22 -0
- package/components/ste-code-input/README.md +56 -0
- package/components/ste-code-input/config.json +5 -0
- package/components/ste-code-input/props.ts +19 -0
- package/components/ste-code-input/ste-code-input.easycom.json +99 -0
- package/components/ste-code-input/ste-code-input.vue +222 -0
- package/components/ste-date-picker/ATTRIBUTES.md +25 -0
- package/components/ste-date-picker/README.md +119 -0
- package/components/ste-date-picker/config.json +5 -0
- package/components/ste-date-picker/props.ts +62 -0
- package/components/ste-date-picker/ste-date-picker.easycom.json +137 -0
- package/components/ste-date-picker/ste-date-picker.vue +290 -0
- package/components/ste-date-picker/types.d.ts +3 -0
- package/components/ste-drag/ATTRIBUTES.md +13 -0
- package/components/ste-drag/README.md +88 -0
- package/components/ste-drag/config.json +5 -0
- package/components/ste-drag/props.ts +10 -0
- package/components/ste-drag/ste-drag.easycom.json +50 -0
- package/components/ste-drag/ste-drag.vue +172 -0
- package/components/ste-dropdown-menu/ATTRIBUTES.md +22 -0
- package/components/ste-dropdown-menu/README.md +325 -0
- package/components/ste-dropdown-menu/config.json +5 -0
- package/components/ste-dropdown-menu/constans.ts +4 -0
- package/components/ste-dropdown-menu/props.ts +30 -0
- package/components/ste-dropdown-menu/ste-dropdown-menu.easycom.json +111 -0
- package/components/ste-dropdown-menu/ste-dropdown-menu.scss +99 -0
- package/components/ste-dropdown-menu/ste-dropdown-menu.vue +223 -0
- package/components/ste-dropdown-menu-item/props.ts +17 -0
- package/components/ste-dropdown-menu-item/ste-dropdown-menu-item.scss +61 -0
- package/components/ste-dropdown-menu-item/ste-dropdown-menu-item.vue +84 -0
- package/components/ste-dropdown-menu-item/type.d.ts +4 -0
- package/components/ste-icon/ATTRIBUTES.md +19 -0
- package/components/ste-icon/README.md +72 -0
- package/components/ste-icon/config.json +5 -0
- package/components/ste-icon/iconfont.css +22 -0
- package/components/ste-icon/props.ts +14 -0
- package/components/ste-icon/ste-icon.easycom.json +71 -0
- package/components/ste-icon/ste-icon.vue +80 -0
- package/components/ste-image/ATTRIBUTES.md +21 -0
- package/components/ste-image/README.md +118 -0
- package/components/ste-image/config.json +5 -0
- package/components/ste-image/props.ts +15 -0
- package/components/ste-image/ste-image.easycom.json +189 -0
- package/components/ste-image/ste-image.vue +146 -0
- package/components/ste-index-item/props.ts +4 -0
- package/components/ste-index-item/ste-index-item.vue +83 -0
- package/components/ste-index-list/ATTRIBUTES.md +15 -0
- package/components/ste-index-list/README.md +138 -0
- package/components/ste-index-list/config.json +5 -0
- package/components/ste-index-list/props.ts +17 -0
- package/components/ste-index-list/ste-index-list.easycom.json +48 -0
- package/components/ste-index-list/ste-index-list.vue +109 -0
- package/components/ste-input/ATTRIBUTES.md +37 -0
- package/components/ste-input/README.md +130 -0
- package/components/ste-input/config.json +5 -0
- package/components/ste-input/props.ts +46 -0
- package/components/ste-input/ste-input.easycom.json +282 -0
- package/components/ste-input/ste-input.scss +124 -0
- package/components/ste-input/ste-input.vue +221 -0
- package/components/ste-loading/ATTRIBUTES.md +11 -0
- package/components/ste-loading/README.md +74 -0
- package/components/ste-loading/config.json +5 -0
- package/components/ste-loading/props.ts +8 -0
- package/components/ste-loading/ste-loading.easycom.json +54 -0
- package/components/ste-loading/ste-loading.vue +127 -0
- package/components/ste-media-preview/ATTRIBUTES.md +20 -0
- package/components/ste-media-preview/README.md +252 -0
- package/components/ste-media-preview/TouchScaleing.ts +117 -0
- package/components/ste-media-preview/config.json +5 -0
- package/components/ste-media-preview/props.ts +12 -0
- package/components/ste-media-preview/ste-media-preview.easycom.json +88 -0
- package/components/ste-media-preview/ste-media-preview.vue +201 -0
- package/components/ste-media-preview/useData.ts +63 -0
- package/components/ste-message-box/ATTRIBUTES.md +6 -0
- package/components/ste-message-box/README.md +222 -0
- package/components/ste-message-box/config.json +5 -0
- package/components/ste-message-box/constants.ts +25 -0
- package/components/ste-message-box/ste-message-box.easycom.json +14 -0
- package/components/ste-message-box/ste-message-box.ts +1 -0
- package/components/ste-message-box/ste-message-box.vue +355 -0
- package/components/ste-message-box/use-message-box.ts +26 -0
- package/components/ste-message-box/useData.ts +56 -0
- package/components/ste-notice-bar/ATTRIBUTES.md +22 -0
- package/components/ste-notice-bar/README.md +124 -0
- package/components/ste-notice-bar/config.json +5 -0
- package/components/ste-notice-bar/props.ts +15 -0
- package/components/ste-notice-bar/ste-notice-bar.easycom.json +109 -0
- package/components/ste-notice-bar/ste-notice-bar.vue +262 -0
- package/components/ste-number-keyboard/ATTRIBUTES.md +31 -0
- package/components/ste-number-keyboard/KeyboardVue.vue +142 -0
- package/components/ste-number-keyboard/README.md +192 -0
- package/components/ste-number-keyboard/config.json +5 -0
- package/components/ste-number-keyboard/props.ts +35 -0
- package/components/ste-number-keyboard/ste-number-keyboard.easycom.json +177 -0
- package/components/ste-number-keyboard/ste-number-keyboard.vue +81 -0
- package/components/ste-number-keyboard/useData.ts +144 -0
- package/components/ste-picker/props.ts +16 -0
- package/components/ste-picker/ste-picker.vue +194 -0
- package/components/ste-popup/ATTRIBUTES.md +24 -0
- package/components/ste-popup/README.md +135 -0
- package/components/ste-popup/config.json +6 -0
- package/components/ste-popup/event.ts +0 -0
- package/components/ste-popup/props.ts +19 -0
- package/components/ste-popup/ste-popup.easycom.json +122 -0
- package/components/ste-popup/ste-popup.vue +253 -0
- package/components/ste-price/ATTRIBUTES.md +26 -0
- package/components/ste-price/README.md +110 -0
- package/components/ste-price/config.json +5 -0
- package/components/ste-price/props.ts +23 -0
- package/components/ste-price/ste-price.easycom.json +154 -0
- package/components/ste-price/ste-price.vue +148 -0
- package/components/ste-progress/ATTRIBUTES.md +17 -0
- package/components/ste-progress/README.md +88 -0
- package/components/ste-progress/config.json +5 -0
- package/components/ste-progress/props.ts +16 -0
- package/components/ste-progress/ste-progress.easycom.json +80 -0
- package/components/ste-progress/ste-progress.vue +135 -0
- package/components/ste-qrcode/ATTRIBUTES.md +16 -0
- package/components/ste-qrcode/README.md +34 -0
- package/components/ste-qrcode/config.json +5 -0
- package/components/ste-qrcode/props.ts +16 -0
- package/components/ste-qrcode/ste-qrcode.easycom.json +56 -0
- package/components/ste-qrcode/ste-qrcode.vue +134 -0
- package/components/ste-qrcode/uqrcode.d.ts +57 -0
- package/components/ste-qrcode/uqrcode.js +34 -0
- package/components/ste-radio/ATTRIBUTES.md +25 -0
- package/components/ste-radio/README.md +260 -0
- package/components/ste-radio/config.json +5 -0
- package/components/ste-radio/props.ts +33 -0
- package/components/ste-radio/ste-radio.easycom.json +150 -0
- package/components/ste-radio/ste-radio.vue +188 -0
- package/components/ste-radio/type.d.ts +2 -0
- package/components/ste-radio-group/props.ts +33 -0
- package/components/ste-radio-group/ste-radio-group.vue +34 -0
- package/components/ste-rate/ATTRIBUTES.md +21 -0
- package/components/ste-rate/README.md +97 -0
- package/components/ste-rate/config.json +5 -0
- package/components/ste-rate/props.ts +16 -0
- package/components/ste-rate/ste-rate.easycom.json +85 -0
- package/components/ste-rate/ste-rate.vue +143 -0
- package/components/ste-read-more/ATTRIBUTES.md +16 -0
- package/components/ste-read-more/README.md +93 -0
- package/components/ste-read-more/config.json +5 -0
- package/components/ste-read-more/props.ts +9 -0
- package/components/ste-read-more/ste-read-more.easycom.json +54 -0
- package/components/ste-read-more/ste-read-more.vue +106 -0
- package/components/ste-rich-text/ATTRIBUTES.md +8 -0
- package/components/ste-rich-text/README.md +26 -0
- package/components/ste-rich-text/config.json +5 -0
- package/components/ste-rich-text/props.ts +8 -0
- package/components/ste-rich-text/ste-rich-text.easycom.json +40 -0
- package/components/ste-rich-text/ste-rich-text.vue +33 -0
- package/components/ste-scroll-to/ATTRIBUTES.md +11 -0
- package/components/ste-scroll-to/README.md +47 -0
- package/components/ste-scroll-to/config.json +5 -0
- package/components/ste-scroll-to/props.ts +17 -0
- package/components/ste-scroll-to/ste-scroll-to.easycom.json +25 -0
- package/components/ste-scroll-to/ste-scroll-to.vue +42 -0
- package/components/ste-scroll-to/useData.ts +214 -0
- package/components/ste-scroll-to-item/ste-scroll-to-item.vue +24 -0
- package/components/ste-search/ATTRIBUTES.md +39 -0
- package/components/ste-search/README.md +232 -0
- package/components/ste-search/config.json +5 -0
- package/components/ste-search/props.ts +124 -0
- package/components/ste-search/ste-search.easycom.json +232 -0
- package/components/ste-search/ste-search.vue +379 -0
- package/components/ste-search/useData.ts +34 -0
- package/components/ste-select/ATTRIBUTES.md +39 -0
- package/components/ste-select/README.md +324 -0
- package/components/ste-select/config.json +5 -0
- package/components/ste-select/datapager.vue +54 -0
- package/components/ste-select/datetime.vue +109 -0
- package/components/ste-select/defaultDate.ts +138 -0
- package/components/ste-select/props.ts +67 -0
- package/components/ste-select/ste-select.easycom.json +287 -0
- package/components/ste-select/ste-select.vue +437 -0
- package/components/ste-select/useData.ts +471 -0
- package/components/ste-signature/ATTRIBUTES.md +18 -0
- package/components/ste-signature/README.md +97 -0
- package/components/ste-signature/config.json +5 -0
- package/components/ste-signature/props.ts +12 -0
- package/components/ste-signature/ste-signature.easycom.json +74 -0
- package/components/ste-signature/ste-signature.vue +183 -0
- package/components/ste-signature/types.d.ts +4 -0
- package/components/ste-slider/ATTRIBUTES.md +25 -0
- package/components/ste-slider/README.md +149 -0
- package/components/ste-slider/config.json +5 -0
- package/components/ste-slider/props.ts +32 -0
- package/components/ste-slider/ste-slider.easycom.json +128 -0
- package/components/ste-slider/ste-slider.scss +150 -0
- package/components/ste-slider/ste-slider.vue +293 -0
- package/components/ste-slider/type.d.ts +4 -0
- package/components/ste-slider/useData.ts +79 -0
- package/components/ste-step/props.ts +10 -0
- package/components/ste-step/ste-step.scss +104 -0
- package/components/ste-step/ste-step.vue +122 -0
- package/components/ste-stepper/ATTRIBUTES.md +33 -0
- package/components/ste-stepper/README.md +172 -0
- package/components/ste-stepper/config.json +5 -0
- package/components/ste-stepper/props.ts +41 -0
- package/components/ste-stepper/ste-stepper.easycom.json +220 -0
- package/components/ste-stepper/ste-stepper.vue +249 -0
- package/components/ste-steps/ATTRIBUTES.md +12 -0
- package/components/ste-steps/README.md +139 -0
- package/components/ste-steps/config.json +5 -0
- package/components/ste-steps/props.ts +18 -0
- package/components/ste-steps/ste-steps.easycom.json +46 -0
- package/components/ste-steps/ste-steps.vue +44 -0
- package/components/ste-sticky/ATTRIBUTES.md +15 -0
- package/components/ste-sticky/README.md +56 -0
- package/components/ste-sticky/config.json +5 -0
- package/components/ste-sticky/props.ts +7 -0
- package/components/ste-sticky/ste-sticky.easycom.json +48 -0
- package/components/ste-sticky/ste-sticky.vue +88 -0
- package/components/ste-swipe-action/ATTRIBUTES.md +16 -0
- package/components/ste-swipe-action/README.md +195 -0
- package/components/ste-swipe-action/config.json +5 -0
- package/components/ste-swipe-action/props.ts +23 -0
- package/components/ste-swipe-action/ste-swipe-action.easycom.json +74 -0
- package/components/ste-swipe-action/ste-swipe-action.vue +138 -0
- package/components/ste-swipe-action/useData.ts +204 -0
- package/components/ste-swipe-action-group/ATTRIBUTES.md +17 -0
- package/components/ste-swipe-action-group/props.ts +22 -0
- package/components/ste-swipe-action-group/ste-swipe-action-group.easycom.json +90 -0
- package/components/ste-swipe-action-group/ste-swipe-action-group.vue +57 -0
- package/components/ste-swiper/ATTRIBUTES.md +24 -0
- package/components/ste-swiper/README.md +156 -0
- package/components/ste-swiper/config.json +5 -0
- package/components/ste-swiper/props.ts +41 -0
- package/components/ste-swiper/ste-swiper.easycom.json +123 -0
- package/components/ste-swiper/ste-swiper.vue +98 -0
- package/components/ste-swiper/useData.ts +365 -0
- package/components/ste-swiper-item/ste-swiper-item.vue +41 -0
- package/components/ste-switch/ATTRIBUTES.md +17 -0
- package/components/ste-switch/README.md +105 -0
- package/components/ste-switch/config.json +5 -0
- package/components/ste-switch/props.ts +9 -0
- package/components/ste-switch/ste-switch.easycom.json +60 -0
- package/components/ste-switch/ste-switch.vue +96 -0
- package/components/ste-tab/ATTRIBUTES.md +14 -0
- package/components/ste-tab/props.ts +25 -0
- package/components/ste-tab/ste-tab.easycom.json +56 -0
- package/components/ste-tab/ste-tab.vue +26 -0
- package/components/ste-table/ATTRIBUTES.md +41 -0
- package/components/ste-table/README.md +638 -0
- package/components/ste-table/config.json +5 -0
- package/components/ste-table/props.ts +72 -0
- package/components/ste-table/ste-table.easycom.json +188 -0
- package/components/ste-table/ste-table.vue +427 -0
- package/components/ste-table/types.d.ts +3 -0
- package/components/ste-table/useData.ts +233 -0
- package/components/ste-table/utils.ts +11 -0
- package/components/ste-table-column/checkbox-icon.vue +35 -0
- package/components/ste-table-column/common.scss +52 -0
- package/components/ste-table-column/props.ts +18 -0
- package/components/ste-table-column/radio-icon.vue +99 -0
- package/components/ste-table-column/ste-table-column.vue +169 -0
- package/components/ste-table-column/var.scss +1 -0
- package/components/ste-tabs/ATTRIBUTES.md +52 -0
- package/components/ste-tabs/README.md +165 -0
- package/components/ste-tabs/config.json +5 -0
- package/components/ste-tabs/props.ts +133 -0
- package/components/ste-tabs/ste-tabs.easycom.json +278 -0
- package/components/ste-tabs/ste-tabs.vue +447 -0
- package/components/ste-tabs/useData.ts +364 -0
- package/components/ste-text/ATTRIBUTES.md +9 -0
- package/components/ste-text/README.md +58 -0
- package/components/ste-text/config.json +6 -0
- package/components/ste-text/props.ts +10 -0
- package/components/ste-text/ste-text.easycom.json +30 -0
- package/components/ste-text/ste-text.vue +46 -0
- package/components/ste-toast/ATTRIBUTES.md +15 -0
- package/components/ste-toast/README.md +222 -0
- package/components/ste-toast/config.json +5 -0
- package/components/ste-toast/props.ts +7 -0
- package/components/ste-toast/ste-toast.easycom.json +73 -0
- package/components/ste-toast/ste-toast.vue +209 -0
- package/components/ste-toast/use-toast.ts +26 -0
- package/components/ste-touch-swipe/ATTRIBUTES.md +18 -0
- package/components/ste-touch-swipe/README.md +89 -0
- package/components/ste-touch-swipe/TouchEvent.ts +79 -0
- package/components/ste-touch-swipe/config.json +5 -0
- package/components/ste-touch-swipe/props.ts +23 -0
- package/components/ste-touch-swipe/ste-touch-swipe.easycom.json +83 -0
- package/components/ste-touch-swipe/ste-touch-swipe.vue +283 -0
- package/components/ste-touch-swipe/useData.ts +51 -0
- package/components/ste-touch-swipe-item/ste-touch-swipe-item.vue +32 -0
- package/components/ste-tour/ATTRIBUTES.md +26 -0
- package/components/ste-tour/README.md +134 -0
- package/components/ste-tour/config.json +5 -0
- package/components/ste-tour/props.ts +45 -0
- package/components/ste-tour/ste-tour.easycom.json +120 -0
- package/components/ste-tour/ste-tour.vue +152 -0
- package/components/ste-tour/useData.ts +220 -0
- package/components/ste-tree/ATTRIBUTES.md +19 -0
- package/components/ste-tree/README.md +217 -0
- package/components/ste-tree/config.json +5 -0
- package/components/ste-tree/props.ts +24 -0
- package/components/ste-tree/ste-tree.easycom.json +106 -0
- package/components/ste-tree/ste-tree.vue +140 -0
- package/components/ste-tree/useData.ts +219 -0
- package/components/ste-upload/ATTRIBUTES.md +35 -0
- package/components/ste-upload/README.md +208 -0
- package/components/ste-upload/ReadFile.ts +305 -0
- package/components/ste-upload/config.json +5 -0
- package/components/ste-upload/props.ts +25 -0
- package/components/ste-upload/ste-upload.easycom.json +267 -0
- package/components/ste-upload/ste-upload.vue +386 -0
- package/components/ste-upload/useData.ts +46 -0
- package/components/ste-video/ATTRIBUTES.md +34 -0
- package/components/ste-video/README.md +48 -0
- package/components/ste-video/config.json +5 -0
- package/components/ste-video/props.ts +86 -0
- package/components/ste-video/ste-video.easycom.json +226 -0
- package/components/ste-video/ste-video.scss +201 -0
- package/components/ste-video/ste-video.vue +390 -0
- package/components/ste-video/types.d.ts +4 -0
- package/components/ste-video/useData.ts +140 -0
- package/composables.ts +2 -0
- package/config/color.ts +16 -0
- package/config/index.ts +48 -0
- package/index.ts +118 -0
- package/package.json +22 -0
- package/store/color.ts +24 -0
- package/store/index.ts +12 -0
- package/store/message-box.ts +54 -0
- package/store/toast.ts +50 -0
- package/types/components.d.ts +124 -0
- package/types/event.d.ts +51 -0
- package/types/index.d.ts +112 -0
- package/types/refComponents.d.ts +118 -0
- package/utils/Color.ts +66 -0
- package/utils/System.ts +114 -0
- package/utils/mixin.ts +122 -0
- package/utils/utils.ts +520 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# Calendar 日历
|
|
2
|
+
|
|
3
|
+
日历组件
|
|
4
|
+
|
|
5
|
+
---$
|
|
6
|
+
|
|
7
|
+
### 基础用法
|
|
8
|
+
|
|
9
|
+
- 属性`height`用于设置日历的高度,单位为`rpx`,默认`100%`
|
|
10
|
+
- 属性`showTitle`用于设置是否显示日历的标题,默认`true`
|
|
11
|
+
- 属性`title`用户设置日历的标题,默认`日期选择`
|
|
12
|
+
- 事件`confirm`用于监听用户点击确定按钮事件,参数为选中的日期数组
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import { ref } from 'vue';
|
|
17
|
+
import type { RefCalendar } from '@/uni_modules/stellar-ui-plus/types/refComponents';
|
|
18
|
+
const show1 = ref(false);
|
|
19
|
+
const show2 = ref(false);
|
|
20
|
+
const show3 = ref(false);
|
|
21
|
+
const show4 = ref(false);
|
|
22
|
+
const show5 = ref(false);
|
|
23
|
+
const show6 = ref(false);
|
|
24
|
+
const show7 = ref(false);
|
|
25
|
+
const show8 = ref(false);
|
|
26
|
+
const show9 = ref(false);
|
|
27
|
+
const show10 = ref(false);
|
|
28
|
+
const show11 = ref(false);
|
|
29
|
+
const show12 = ref(false);
|
|
30
|
+
const show13 = ref(false);
|
|
31
|
+
|
|
32
|
+
const handleConfirm = (v: (string | number)[]) => {
|
|
33
|
+
toast.showToast({
|
|
34
|
+
title: '确定选择:' + v.join(' '),
|
|
35
|
+
icon: 'none',
|
|
36
|
+
duration: 1500,
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const defaultMonth = ref<RefCalendar>();
|
|
41
|
+
|
|
42
|
+
const setViewMonth = () => {
|
|
43
|
+
defaultMonth.value?.showMonth('2024-07');
|
|
44
|
+
};
|
|
45
|
+
</script>
|
|
46
|
+
<template>
|
|
47
|
+
<ste-calendar height="720" :showTitle="false" @confirm="handleConfirm" />
|
|
48
|
+
</template>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 结合弹窗使用
|
|
52
|
+
|
|
53
|
+
#### 基础使用
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<ste-button @click="show1 = true">默认(单个日期)</ste-button>
|
|
57
|
+
<ste-popup v-model:show="show1" height="60vh" position="bottom">
|
|
58
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
59
|
+
<ste-calendar @confirm="handleConfirm" />
|
|
60
|
+
</div>
|
|
61
|
+
</ste-popup>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
#### 多个日期
|
|
65
|
+
|
|
66
|
+
- 属性`mode`用于设置日历的模式,可选值`single`、`multiple`、`range`,默认`single`
|
|
67
|
+
- 设置为`multiple`可以选择多个日期
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<ste-button @click="show2 = true">多个日期</ste-button>
|
|
71
|
+
<ste-popup v-model:show="show2" height="60vh" position="bottom">
|
|
72
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
73
|
+
<ste-calendar mode="multiple" @confirm="handleConfirm" />
|
|
74
|
+
</div>
|
|
75
|
+
</ste-popup>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
#### 日期范围
|
|
79
|
+
|
|
80
|
+
- 属性`mode`用于设置日历的模式,可选值`single`、`multiple`、`range`,默认`single`
|
|
81
|
+
- 设置为`single`可以选择日期范围
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<ste-button @click="show3 = true">日期范围</ste-button>
|
|
85
|
+
<ste-popup v-model:show="show3" height="60vh" position="bottom">
|
|
86
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
87
|
+
<ste-calendar mode="range" @confirm="handleConfirm" />
|
|
88
|
+
</div>
|
|
89
|
+
</ste-popup>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
#### 自定义主题色
|
|
93
|
+
|
|
94
|
+
- 属性`color`可以设置日历的主题色,包括周末日期颜色、日期选中颜色、日期范围选中颜色、确定按钮颜色
|
|
95
|
+
|
|
96
|
+
```html
|
|
97
|
+
<ste-button @click="show4 = true">自定义主题色</ste-button>
|
|
98
|
+
<ste-popup v-model:show="show4" height="60vh" position="bottom">
|
|
99
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
100
|
+
<ste-calendar color="#3478f6" @confirm="handleConfirm" />
|
|
101
|
+
</div>
|
|
102
|
+
</ste-popup>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### 自定义文案
|
|
106
|
+
|
|
107
|
+
- 属性`title`可以设置标题文案
|
|
108
|
+
- 属性`startText`可以设置开始日期的文案,`mode`值为`range`时生效
|
|
109
|
+
- 属性`endText`可以设置结束日期的文案,`mode`值为`range`时生效
|
|
110
|
+
|
|
111
|
+
```html
|
|
112
|
+
<ste-button @click="show5 = true">自定义文案</ste-button>
|
|
113
|
+
<ste-popup v-model:show="show5" height="60vh" position="bottom">
|
|
114
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
115
|
+
<ste-calendar mode="range" title="酒店预约" startText="住店" endText="离店" @confirm="handleConfirm" />
|
|
116
|
+
</div>
|
|
117
|
+
</ste-popup>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### 日期最大范围
|
|
121
|
+
|
|
122
|
+
- 属性`minDate`可以设置日期的最小可选范围
|
|
123
|
+
- 属性`maxDate`可以设置日期的最大可选范围
|
|
124
|
+
|
|
125
|
+
```html
|
|
126
|
+
<ste-button @click="show6 = true">日期最大范围</ste-button>
|
|
127
|
+
<ste-popup v-model:show="show6" height="60vh" position="bottom">
|
|
128
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
129
|
+
<ste-calendar mode="range" minDate="2024-05-10" maxDate="2024-05-20" @confirm="handleConfirm" />
|
|
130
|
+
</div>
|
|
131
|
+
</ste-popup>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
#### 多选数量限制
|
|
135
|
+
|
|
136
|
+
- 属性`maxCount`用于设置多选模式下最多可选的日期数量
|
|
137
|
+
|
|
138
|
+
```html
|
|
139
|
+
<ste-button @click="show7 = true">多选数量限制</ste-button>
|
|
140
|
+
<ste-popup v-model:show="show7" height="60vh" position="bottom">
|
|
141
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
142
|
+
<ste-calendar mode="multiple" :maxCount="5" @confirm="handleConfirm" />
|
|
143
|
+
</div>
|
|
144
|
+
</ste-popup>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
#### 多选数量限制
|
|
148
|
+
|
|
149
|
+
- 属性`maxRange`用于设置范围模式下最多可选的日期数量
|
|
150
|
+
- 属性`showRangePrompt`用于设置范围模式下是否显示超出数量时的提示文案
|
|
151
|
+
- 属性`rangePrompt`用于设置范围模式下超出数量时的提示文案
|
|
152
|
+
|
|
153
|
+
```html
|
|
154
|
+
<ste-button @click="show8 = true">范围数量限制</ste-button>
|
|
155
|
+
<ste-popup v-model:show="show8" height="60vh" position="bottom">
|
|
156
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
157
|
+
<ste-calendar mode="range" :maxRange="5" @confirm="handleConfirm" />
|
|
158
|
+
</div>
|
|
159
|
+
</ste-popup>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
#### 默认选择日期
|
|
163
|
+
|
|
164
|
+
- 属性`list`用于设置默认选择的日期
|
|
165
|
+
|
|
166
|
+
```html
|
|
167
|
+
<ste-button @click="show9 = true">默认选择日期</ste-button>
|
|
168
|
+
<ste-popup v-model:show="show9" height="60vh" position="bottom">
|
|
169
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
170
|
+
<ste-calendar :list="[Date.now()]" @confirm="handleConfirm" />
|
|
171
|
+
</div>
|
|
172
|
+
</ste-popup>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
#### 默认展示月份
|
|
176
|
+
|
|
177
|
+
- 属性`defaultMonth`用于设置默认展示的月份,因为弹窗中的日历不在文档流,无法设置滚动距离,所以需要在弹窗动画结束之后手动设置默认展示的月份
|
|
178
|
+
|
|
179
|
+
```html
|
|
180
|
+
<ste-button @click="show10 = true">默认展示月份</ste-button>
|
|
181
|
+
<ste-popup v-model:show="show10" position="bottom" height="60vh" @open-after="setViewMonth">
|
|
182
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
183
|
+
<ste-calendar ref="defaultMonth" minDate="2024-05-20" maxDate="2024-08-01" @confirm="handleConfirm" />
|
|
184
|
+
</div>
|
|
185
|
+
</ste-popup>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
#### 隐藏确定按钮
|
|
189
|
+
|
|
190
|
+
- 属性`showConfirm`用于设置是否显示确定按钮
|
|
191
|
+
- 事件`select`用于监听选择日期的事件
|
|
192
|
+
|
|
193
|
+
```html
|
|
194
|
+
<ste-button @click="show11 = true">隐藏确定按钮</ste-button>
|
|
195
|
+
<ste-popup v-model:show="show11" position="bottom" height="60vh">
|
|
196
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
197
|
+
<ste-calendar minDate="2024-05-20" maxDate="2024-08-01" @select="handleConfirm" :showConfirm="false" />
|
|
198
|
+
</div>
|
|
199
|
+
</ste-popup>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
#### 只读
|
|
203
|
+
|
|
204
|
+
- 属性`readonly`用于设置是否只读
|
|
205
|
+
|
|
206
|
+
```html
|
|
207
|
+
<ste-button @click="show12 = true">只读</ste-button>
|
|
208
|
+
<ste-popup v-model:show="show12" position="bottom" height="60vh">
|
|
209
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
210
|
+
<ste-calendar minDate="2024-05-20" maxDate="2024-06-10" readonly :list="['2024-05-21']" />
|
|
211
|
+
</div>
|
|
212
|
+
</ste-popup>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
#### 隐藏背景月份
|
|
216
|
+
|
|
217
|
+
- 属性`showMark`用于设置是否显示背景月份
|
|
218
|
+
|
|
219
|
+
```html
|
|
220
|
+
<ste-button @click="show13 = true">隐藏背景月份</ste-button>
|
|
221
|
+
<ste-popup v-model:show="show13" position="bottom" height="60vh">
|
|
222
|
+
<div style="padding-bottom: 20px; height: 100%">
|
|
223
|
+
<ste-calendar :showMark="false" @select="handleConfirm" />
|
|
224
|
+
</div>
|
|
225
|
+
</ste-popup>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---$
|
|
229
|
+
|
|
230
|
+
### API
|
|
231
|
+
|
|
232
|
+
<!-- props -->
|
|
233
|
+
|
|
234
|
+
#### Methods
|
|
235
|
+
|
|
236
|
+
| 方法名 | 说明 | 参数 | 支持版本 |
|
|
237
|
+
| --------- | ------------------ | --------------------------- | -------- |
|
|
238
|
+
| showMonth | 设置默认展示的月份 | 要展示的年月(YYYY-MM格式) | - |
|
|
239
|
+
|
|
240
|
+
---$
|
|
241
|
+
{{xuyajun}}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import utils from '../../utils/utils'
|
|
2
|
+
import type { Dayjs } from '../../types/index'
|
|
3
|
+
|
|
4
|
+
export interface WeekType {
|
|
5
|
+
dayText: string | number
|
|
6
|
+
key: string | number
|
|
7
|
+
disabled: boolean
|
|
8
|
+
weekend: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface MonthType {
|
|
12
|
+
date: Dayjs
|
|
13
|
+
monthText: string
|
|
14
|
+
key: string
|
|
15
|
+
month: number
|
|
16
|
+
weeks: WeekType[][]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type DateType = string | number | Dayjs | Date
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 获取从当前月份开始的12个月
|
|
23
|
+
*/
|
|
24
|
+
function getMonthList(minDate?: DateType, maxDate?: DateType) {
|
|
25
|
+
const start = minDate ? utils.dayjs(minDate) : utils.dayjs()
|
|
26
|
+
const sY = Number(start.format('YYYY'))
|
|
27
|
+
const sM = Number(start.format('MM'))
|
|
28
|
+
const end = maxDate ? utils.dayjs(maxDate) : null
|
|
29
|
+
let eY, eM
|
|
30
|
+
if (end) {
|
|
31
|
+
eY = Number(end.format('YYYY'))
|
|
32
|
+
eM = Number(end.format('MM'))
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
eY = sM + 11 > 12 ? sY + 1 : sY
|
|
36
|
+
eM = sM + 11 > 12 ? sM + 11 - 12 : sM + 11
|
|
37
|
+
}
|
|
38
|
+
const months = []
|
|
39
|
+
for (let y = sY; y <= eY; y++) {
|
|
40
|
+
for (let m = y === sY ? sM : 1; m <= (y === eY ? eM : 12); m++)
|
|
41
|
+
months.push(utils.dayjs(`${y}-${m < 10 ? `0${m}` : m}-01`))
|
|
42
|
+
}
|
|
43
|
+
return months
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 获取每个月的天数
|
|
48
|
+
*/
|
|
49
|
+
export function getMonthDays(year: number, month: number) {
|
|
50
|
+
// 是否是闰年
|
|
51
|
+
const isLeapYear = (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0
|
|
52
|
+
// 每个月的天数
|
|
53
|
+
const daysCount = [31, isLeapYear ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
|
54
|
+
return daysCount[month]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 获取日历数据
|
|
59
|
+
*/
|
|
60
|
+
export function getCalendarData(minDate?: DateType, maxDate?: DateType, formatter = 'YYYY-MM-DD') {
|
|
61
|
+
const monthDatas: MonthType[] = []
|
|
62
|
+
const months = getMonthList(minDate, maxDate)
|
|
63
|
+
months.forEach((date) => {
|
|
64
|
+
const daysCount = getMonthDays(date.year(), date.month())
|
|
65
|
+
// 一号的星期
|
|
66
|
+
const firstDay = date.startOf('month').day()
|
|
67
|
+
const monthData: MonthType = {
|
|
68
|
+
date,
|
|
69
|
+
monthText: date.format('YYYY年MM月'),
|
|
70
|
+
key: date.format('YYYY-MM'),
|
|
71
|
+
month: date.month() + 1,
|
|
72
|
+
weeks: [],
|
|
73
|
+
}
|
|
74
|
+
// 计算本月周数
|
|
75
|
+
const weekNum = Math.ceil((daysCount + firstDay) / 7)
|
|
76
|
+
let day = 1
|
|
77
|
+
for (let w = 0; w < weekNum; w++) {
|
|
78
|
+
const week = []
|
|
79
|
+
for (let d = 0; d < 7; d++) {
|
|
80
|
+
let _day
|
|
81
|
+
if ((w === 0 && d < firstDay) || day > daysCount)
|
|
82
|
+
_day = ''
|
|
83
|
+
else
|
|
84
|
+
_day = day++
|
|
85
|
+
|
|
86
|
+
const key = _day ? utils.dayjs(`${monthData.key}-${_day}`).format(formatter) : Math.random()
|
|
87
|
+
let disabled = !_day
|
|
88
|
+
if (_day)
|
|
89
|
+
disabled = Boolean((minDate && key < minDate) || (maxDate && key > maxDate))
|
|
90
|
+
|
|
91
|
+
week.push({
|
|
92
|
+
dayText: _day,
|
|
93
|
+
key,
|
|
94
|
+
disabled,
|
|
95
|
+
weekend: d === 0 || d === 6,
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
monthData.weeks.push(week)
|
|
99
|
+
}
|
|
100
|
+
monthDatas.push(monthData)
|
|
101
|
+
})
|
|
102
|
+
return { monthDatas, weekTexts: '日一二三四五六'.split('') }
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 格式化时间
|
|
107
|
+
*/
|
|
108
|
+
export function formatDate(date: DateType, formatter = 'YYYY-MM-DD') {
|
|
109
|
+
return utils.dayjs(date).format(formatter)
|
|
110
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { PropType } from 'vue'
|
|
2
|
+
import type { DateType } from './date'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: { type: String, default: () => '日期选择' },
|
|
6
|
+
showTitle: { type: Boolean, default: () => true },
|
|
7
|
+
list: { type: Array as PropType<DateType[]>, default: () => [] },
|
|
8
|
+
mode: { type: String, default: () => 'single' },
|
|
9
|
+
startText: { type: String, default: () => '开始' },
|
|
10
|
+
endText: { type: String, default: () => '结束' },
|
|
11
|
+
color: { type: String, default: () => '' },
|
|
12
|
+
minDate: { type: [String, Number, Date], default: () => 0 },
|
|
13
|
+
maxDate: { type: [String, Number, Date], default: () => 0 },
|
|
14
|
+
defaultMonth: { type: [Number, String, Date], default: () => 0 },
|
|
15
|
+
maxCount: { type: [Number, String], default: () => 0 },
|
|
16
|
+
formatter: { type: String, default: () => 'YYYY-MM-DD' },
|
|
17
|
+
showMark: { type: Boolean, default: () => true },
|
|
18
|
+
readonly: { type: Boolean, default: () => false },
|
|
19
|
+
maxRange: { type: Number, default: () => null },
|
|
20
|
+
rangePrompt: { type: String, default: () => null },
|
|
21
|
+
showRangePrompt: { type: Boolean, default: () => true },
|
|
22
|
+
allowSameDay: { type: Boolean, default: () => false },
|
|
23
|
+
showConfirm: { type: Boolean, default: () => true },
|
|
24
|
+
width: { type: [Number, String], default: () => '100%' },
|
|
25
|
+
height: { type: [Number, String], default: () => '100%' },
|
|
26
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ste-calendar",
|
|
3
|
+
"description": "按钮组件",
|
|
4
|
+
"example": "<ste-calendar></ste-calendar>",
|
|
5
|
+
"tutorial": "https://stellar-ui.intecloud.com.cn/plus/#/?active=calendar",
|
|
6
|
+
"attributes": [
|
|
7
|
+
{
|
|
8
|
+
"name": "title",
|
|
9
|
+
"description": "尺寸",
|
|
10
|
+
"type": "string",
|
|
11
|
+
"default": "日期选择"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "showTitle",
|
|
15
|
+
"description": "是否显示标题",
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"default": true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "list",
|
|
21
|
+
"description": "选中的日期列表",
|
|
22
|
+
"type": "number | string",
|
|
23
|
+
"default": []
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "mode",
|
|
27
|
+
"description": "选项的值",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"default": "single",
|
|
30
|
+
"values": [
|
|
31
|
+
{
|
|
32
|
+
"name": "single",
|
|
33
|
+
"description": "选择单个日期(默认)"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "multiple",
|
|
37
|
+
"description": "可以选择多个日期"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "range",
|
|
41
|
+
"description": "可以选择日期范围"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "startText",
|
|
47
|
+
"description": "开始日期文本",
|
|
48
|
+
"type": "string",
|
|
49
|
+
"default": "开始"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "endText",
|
|
53
|
+
"description": "结束日期文本",
|
|
54
|
+
"type": "string",
|
|
55
|
+
"default": "结束"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "color",
|
|
59
|
+
"description": "主题颜色(选中日期背景、周末文日期颜色和确定按钮)",
|
|
60
|
+
"type": "string",
|
|
61
|
+
"default": "#0090FF"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "minDate",
|
|
65
|
+
"description": "最小可选日期",
|
|
66
|
+
"type": "number | string | Date",
|
|
67
|
+
"default": 0
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "maxDate",
|
|
71
|
+
"description": "最大可选日期",
|
|
72
|
+
"type": "number | string | Date",
|
|
73
|
+
"default": 0
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "defaultMonth",
|
|
77
|
+
"description": "默认展示的月份",
|
|
78
|
+
"type": "number | string | Date",
|
|
79
|
+
"default": 0
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "maxCount",
|
|
83
|
+
"description": "mode=multiple时,最多可选多少个日期",
|
|
84
|
+
"type": "number",
|
|
85
|
+
"default": 0
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "formatter",
|
|
89
|
+
"description": "日期格式化(默认'YYYY-MM-DD')",
|
|
90
|
+
"type": "string",
|
|
91
|
+
"default": "YYYY-MM-DD"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "showMark",
|
|
95
|
+
"description": "是否显示月份背景色",
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"default": true
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "readonly",
|
|
101
|
+
"description": "是否为只读状态,只读状态下禁止选择日期",
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"default": false
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "maxRange",
|
|
107
|
+
"description": "日期区间最多可选天数,默认无限制,mode = range时有效",
|
|
108
|
+
"type": "number"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "rangePrompt",
|
|
112
|
+
"description": "范围选择超过最多可选天数时的提示文案,mode = range时有效",
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "showRangePrompt",
|
|
117
|
+
"description": "范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效",
|
|
118
|
+
"type": "boolean",
|
|
119
|
+
"default": true
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "allowSameDay",
|
|
123
|
+
"description": "是否允许日期范围的起止时间为同一天,mode = range时有效",
|
|
124
|
+
"type": "boolean",
|
|
125
|
+
"default": false
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "showConfirm",
|
|
129
|
+
"description": "是否显示确定按钮",
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"default": true
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "width",
|
|
135
|
+
"description": "可视区域宽度",
|
|
136
|
+
"type": "number | string",
|
|
137
|
+
"default": "100%"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "height",
|
|
141
|
+
"description": "可视区域高度",
|
|
142
|
+
"type": "number | string",
|
|
143
|
+
"default": "100%"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "[event]select",
|
|
147
|
+
"description": "选择日期时触发",
|
|
148
|
+
"type": "(days:(number|string)[],day:number|string) => void",
|
|
149
|
+
"params": [
|
|
150
|
+
{
|
|
151
|
+
"name": "days",
|
|
152
|
+
"description": "选中的日期列表"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "day",
|
|
156
|
+
"description": "当前选中的日期"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "[event]confirm",
|
|
162
|
+
"description": "点击确定按钮时触发",
|
|
163
|
+
"type": "(days:(number|string)[]) => void",
|
|
164
|
+
"params": [
|
|
165
|
+
{
|
|
166
|
+
"name": "days",
|
|
167
|
+
"description": "当前选中的日期列表"
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|