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,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ste-media-preview",
|
|
3
|
+
"description": "媒体预览",
|
|
4
|
+
"example": "<ste-media-preview />",
|
|
5
|
+
"tutorial": "https://stellar-ui.intecloud.com.cn/plus/#/?active=media-preview",
|
|
6
|
+
"attributes": [
|
|
7
|
+
{
|
|
8
|
+
"name": "show",
|
|
9
|
+
"description": "是否显示",
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"default": false
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "urls",
|
|
15
|
+
"description": "图片路径列表",
|
|
16
|
+
"type": "Array<string>",
|
|
17
|
+
"default": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "autoplay",
|
|
21
|
+
"description": "自动轮播时长,为0不自动轮播,单位ms",
|
|
22
|
+
"type": "number",
|
|
23
|
+
"default": 0
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "loop",
|
|
27
|
+
"description": "是否前后衔接播放",
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"default": false
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "index",
|
|
33
|
+
"description": "默认展示的资源下标",
|
|
34
|
+
"type": "number",
|
|
35
|
+
"default": 0
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "showIndex",
|
|
39
|
+
"description": "是否显示左下角索引",
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"default": false
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "scale",
|
|
45
|
+
"description": "是否支持双指缩放",
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"default": false
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "showmenu",
|
|
51
|
+
"description": "是否开启图片长按菜单",
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"default": true
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "[event]beforeClose",
|
|
57
|
+
"description": "关闭前触发",
|
|
58
|
+
"type": "() => void"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "[event]close",
|
|
62
|
+
"description": "关闭后触发",
|
|
63
|
+
"type": "() => void"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "[event]change",
|
|
67
|
+
"description": "切换时触发",
|
|
68
|
+
"type": "(index: number) => void",
|
|
69
|
+
"params": [
|
|
70
|
+
{
|
|
71
|
+
"name": "index",
|
|
72
|
+
"description": "切换后的下标"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "[event]longpress",
|
|
78
|
+
"description": "长按时触发",
|
|
79
|
+
"type": "(index: number) => void",
|
|
80
|
+
"params": [
|
|
81
|
+
{
|
|
82
|
+
"name": "index",
|
|
83
|
+
"description": "当前下标"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onMounted, watch, computed } from 'vue';
|
|
3
|
+
import utils from '../../utils/utils';
|
|
4
|
+
import propsData from './props';
|
|
5
|
+
import useData from './useData';
|
|
6
|
+
import TouchScaleing from './TouchScaleing';
|
|
7
|
+
import type { UniTouchEvent } from '../../types/event';
|
|
8
|
+
import type { SwiperOnChangeEvent } from '@uni-helper/uni-app-types';
|
|
9
|
+
|
|
10
|
+
const emits = defineEmits<{
|
|
11
|
+
(e: 'beforeClose', suspend: () => void, next: () => void, stop: () => void): void;
|
|
12
|
+
(e: 'update:show', show: boolean): void;
|
|
13
|
+
(e: 'close'): void;
|
|
14
|
+
(e: 'update:index', index: number): void;
|
|
15
|
+
(e: 'change', index: number): void;
|
|
16
|
+
(e: 'longpress', index: number): void;
|
|
17
|
+
}>();
|
|
18
|
+
|
|
19
|
+
const { dataIndex, setDataIndex, dataShow, setDataShow, touch, setTouch, scaling, setScaling, translate, setTranslate, rotate, setRotate, transition, setTransition, dataShowmenu, setDataShowmenu } =
|
|
20
|
+
useData();
|
|
21
|
+
|
|
22
|
+
const props = defineProps(propsData);
|
|
23
|
+
|
|
24
|
+
const cmpUrls = computed<{ url: string; type: string | number; path?: string }[]>(() => {
|
|
25
|
+
return props.urls.map(url => ({ url, type: utils.getMediaFileType(url) })).filter(item => item.type !== 'audio');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const cmpTransform = computed(() => {
|
|
29
|
+
return {
|
|
30
|
+
transform: `scale(${scaling.value}) translate(${translate.value}) rotate(${rotate.value}deg)`,
|
|
31
|
+
transition: transition.value,
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
onMounted(() => {
|
|
36
|
+
setTouch(new TouchScaleing());
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
watch(
|
|
40
|
+
() => props.show,
|
|
41
|
+
v => {
|
|
42
|
+
if (v && props.index !== null) {
|
|
43
|
+
setDataIndex(props.index);
|
|
44
|
+
}
|
|
45
|
+
setDataShow(v);
|
|
46
|
+
},
|
|
47
|
+
{ immediate: true }
|
|
48
|
+
);
|
|
49
|
+
watch(() => props.showmenu, setDataShowmenu, { immediate: true });
|
|
50
|
+
|
|
51
|
+
const onClose = async () => {
|
|
52
|
+
let next = true;
|
|
53
|
+
const stop = new Promise((resolve, reject) => {
|
|
54
|
+
emits(
|
|
55
|
+
'beforeClose',
|
|
56
|
+
() => (next = false),
|
|
57
|
+
() => resolve(true),
|
|
58
|
+
() => reject(false)
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
if (!next) {
|
|
62
|
+
await stop;
|
|
63
|
+
}
|
|
64
|
+
setDataShow(false);
|
|
65
|
+
emits('update:show', false);
|
|
66
|
+
emits('close');
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const onTouchstart = (e: UniTouchEvent) => {
|
|
70
|
+
if (props.scale) return;
|
|
71
|
+
const [x1, y1, x2, y2] = touch.value?.touchStart(e.changedTouches) || [];
|
|
72
|
+
if (x1 && y1 && x2 && y2) {
|
|
73
|
+
if (dataShowmenu) setDataShowmenu(false);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const onTouchmove = (e: UniTouchEvent) => {
|
|
78
|
+
if (props.scale) return;
|
|
79
|
+
const bool = touch.value?.touchMove(e.changedTouches);
|
|
80
|
+
if (!bool) return;
|
|
81
|
+
if (dataShowmenu) setDataShowmenu(false);
|
|
82
|
+
setScaling(touch.value?.scale || 1);
|
|
83
|
+
setTranslate(`${touch.value?.translateX || 0}px,${touch.value?.translateY || 0}px`);
|
|
84
|
+
setRotate(touch.value?.rotate || 0);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const onTouchend = (e: UniTouchEvent) => {
|
|
88
|
+
if (props.scale) return;
|
|
89
|
+
if (dataShowmenu.value !== props.showmenu) setDataShowmenu(props.showmenu);
|
|
90
|
+
const bool = touch.value?.touchEnd(e.changedTouches);
|
|
91
|
+
if (!bool) return;
|
|
92
|
+
setTransition('300ms');
|
|
93
|
+
setTimeout(() => {
|
|
94
|
+
setScaling(1);
|
|
95
|
+
setTranslate('0');
|
|
96
|
+
setRotate(0);
|
|
97
|
+
setTimeout(() => {
|
|
98
|
+
setTransition('0');
|
|
99
|
+
}, 100);
|
|
100
|
+
}, 50);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const onChange = (e: SwiperOnChangeEvent) => {
|
|
104
|
+
setDataIndex(e.detail.current);
|
|
105
|
+
emits('update:index', e.detail.current);
|
|
106
|
+
emits('change', e.detail.current);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const onLongpress = () => {
|
|
110
|
+
emits('longpress', dataIndex.value);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const getTransfrom = (i: number) => (dataIndex.value === i ? cmpTransform.value : {});
|
|
114
|
+
</script>
|
|
115
|
+
<template>
|
|
116
|
+
<view class="ste-media-preview-root" v-if="dataShow">
|
|
117
|
+
<view class="media-preview-content">
|
|
118
|
+
<swiper style="width: 100%; height: 100%" :autoplay="props.autoplay > 0" :interval="props.autoplay" :circular="props.loop" :current="dataIndex" @change="onChange">
|
|
119
|
+
<swiper-item v-for="(item, index) in cmpUrls" :key="index">
|
|
120
|
+
<view
|
|
121
|
+
class="preview-item"
|
|
122
|
+
@click.stop="1"
|
|
123
|
+
@touchstart="onTouchstart"
|
|
124
|
+
@touchmove="onTouchmove"
|
|
125
|
+
@touchend="onTouchend"
|
|
126
|
+
@longpress="onLongpress"
|
|
127
|
+
:style="[dataIndex === index ? cmpTransform : {}]"
|
|
128
|
+
>
|
|
129
|
+
<!-- #ifndef APP -->
|
|
130
|
+
<video class="video" object-fit="contain" v-if="item.type === 'video'" :src="item.url || item.path" @click.stop="1" />
|
|
131
|
+
<ste-image v-else class="image" :showMenuByLongpress="dataShowmenu" :src="item.url || item.path" mode="aspectFit" />
|
|
132
|
+
<!-- #endif -->
|
|
133
|
+
<!-- #ifdef APP -->
|
|
134
|
+
<video class="video" object-fit="contain" v-if="item.type === 'video' && cmpUrls.length <= 1" :src="item.url || item.path" @click.stop="1" />
|
|
135
|
+
<ste-image class="image" :showMenuByLongpress="dataShowmenu" :src="item.url || item.path" mode="aspectFit" />
|
|
136
|
+
<!-- #endif -->
|
|
137
|
+
</view>
|
|
138
|
+
</swiper-item>
|
|
139
|
+
</swiper>
|
|
140
|
+
</view>
|
|
141
|
+
<view class="media-preview-footer">
|
|
142
|
+
<view class="footer-index">
|
|
143
|
+
<text v-if="showIndex">{{ dataIndex + 1 }}/{{ cmpUrls.length }}</text>
|
|
144
|
+
</view>
|
|
145
|
+
<view class="footer-close" @click="onClose">
|
|
146
|
+
<ste-icon name="close" size="60" code="" color="#fff" />
|
|
147
|
+
</view>
|
|
148
|
+
</view>
|
|
149
|
+
</view>
|
|
150
|
+
</template>
|
|
151
|
+
<style scoped lang="scss">
|
|
152
|
+
.ste-media-preview-root {
|
|
153
|
+
position: fixed;
|
|
154
|
+
top: 0;
|
|
155
|
+
left: 0;
|
|
156
|
+
bottom: 0;
|
|
157
|
+
right: 0;
|
|
158
|
+
width: 100vw;
|
|
159
|
+
height: 100vh;
|
|
160
|
+
background-color: #000;
|
|
161
|
+
color: #fff;
|
|
162
|
+
z-index: 9999999;
|
|
163
|
+
|
|
164
|
+
.media-preview-content {
|
|
165
|
+
width: 100%;
|
|
166
|
+
height: calc(100% - 120rpx);
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
justify-content: center;
|
|
170
|
+
|
|
171
|
+
.preview-item {
|
|
172
|
+
width: 100%;
|
|
173
|
+
height: 100%;
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
|
|
178
|
+
.image,
|
|
179
|
+
.video {
|
|
180
|
+
width: 100%;
|
|
181
|
+
height: 100%;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.image {
|
|
185
|
+
max-width: 100%;
|
|
186
|
+
max-height: 100%;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.media-preview-footer {
|
|
192
|
+
width: 100%;
|
|
193
|
+
height: 120rpx;
|
|
194
|
+
padding: 0 30rpx 30rpx 30rpx;
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
justify-content: space-between;
|
|
198
|
+
font-size: var(--font-size-28, 28rpx);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
</style>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ref } from 'vue'
|
|
2
|
+
import type TouchScaleing from './TouchScaleing'
|
|
3
|
+
|
|
4
|
+
export default function useData() {
|
|
5
|
+
const dataIndex = ref(0)
|
|
6
|
+
const setDataIndex = (index: number) => {
|
|
7
|
+
dataIndex.value = index
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const dataShow = ref(false)
|
|
11
|
+
const setDataShow = (show: boolean) => {
|
|
12
|
+
dataShow.value = show
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const touch = ref<TouchScaleing>()
|
|
16
|
+
const setTouch = (_touch: TouchScaleing) => {
|
|
17
|
+
touch.value = _touch
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const scaling = ref(1)
|
|
21
|
+
const setScaling = (scale: number) => {
|
|
22
|
+
scaling.value = scale
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const translate = ref('0')
|
|
26
|
+
const setTranslate = (_translate: string) => {
|
|
27
|
+
translate.value = _translate
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const rotate = ref(0)
|
|
31
|
+
const setRotate = (_rotate: number) => {
|
|
32
|
+
rotate.value = _rotate
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const transition = ref('0')
|
|
36
|
+
const setTransition = (_transition: string) => {
|
|
37
|
+
transition.value = _transition
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const dataShowmenu = ref(false)
|
|
41
|
+
const setDataShowmenu = (show: boolean) => {
|
|
42
|
+
dataShowmenu.value = show
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
dataIndex,
|
|
47
|
+
setDataIndex,
|
|
48
|
+
dataShow,
|
|
49
|
+
setDataShow,
|
|
50
|
+
touch,
|
|
51
|
+
setTouch,
|
|
52
|
+
scaling,
|
|
53
|
+
setScaling,
|
|
54
|
+
translate,
|
|
55
|
+
setTranslate,
|
|
56
|
+
rotate,
|
|
57
|
+
setRotate,
|
|
58
|
+
transition,
|
|
59
|
+
setTransition,
|
|
60
|
+
dataShowmenu,
|
|
61
|
+
setDataShowmenu,
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# MessageBox 弹框
|
|
2
|
+
|
|
3
|
+
模拟系统的消息提示框而实现的一套模态对话框组件,用于消息提示、确认消息和提交内容。
|
|
4
|
+
|
|
5
|
+
---$
|
|
6
|
+
|
|
7
|
+
### 使用方法
|
|
8
|
+
|
|
9
|
+
#### 组合函数使用方法
|
|
10
|
+
|
|
11
|
+
ps:注意 目前 useMessageBox 只能在 setup 作用域下使用
|
|
12
|
+
父组件引入组件 组合函数调用showMsgBox方法,打开轻提示
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import { useMessageBox } from 'stellar-ui-plus/composables';
|
|
17
|
+
const msg = useMessageBox();
|
|
18
|
+
function click() {
|
|
19
|
+
msg.showMsgBox({ title: '提示' });
|
|
20
|
+
}
|
|
21
|
+
</script>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<template>
|
|
26
|
+
<ste-message-box></ste-message-box>
|
|
27
|
+
<ste-button @click="click" :width="400">提示</ste-button>
|
|
28
|
+
</template>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
#### Ref用法
|
|
32
|
+
|
|
33
|
+
父组件引入组件 绑定ref 通过ref调用showMsgBox方法,打开轻提示
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<template>
|
|
37
|
+
<ste-message-box ref="steMessageBox"></ste-message-box>
|
|
38
|
+
</template>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<script setup lang="ts">
|
|
43
|
+
import { ref } from 'vue';
|
|
44
|
+
let steMessageBox = ref();
|
|
45
|
+
steMessageBox.value.showMsgBox({
|
|
46
|
+
title: '提示内容',
|
|
47
|
+
});
|
|
48
|
+
</script>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### 全局引入
|
|
52
|
+
|
|
53
|
+
配合 [https://github.com/smartXJ/vue3-inset-loader](https://github.com/smartXJ/vue3-inset-loader) 插件, 将 ste-message-box 节点置于每个页面中,可以更进一步简化使用
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
insetLoader: {
|
|
57
|
+
config: {
|
|
58
|
+
messageBox: "<ste-message-box ref='messageBox'></ste-message-box>",
|
|
59
|
+
},
|
|
60
|
+
// 全局配置
|
|
61
|
+
label: ['messageBox'],
|
|
62
|
+
rootEle: '.*',
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 代码演示
|
|
67
|
+
|
|
68
|
+
以下代码演示为函数式调用方法
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<script setup lang="ts">
|
|
72
|
+
import { useMessageBox } from 'stellar-ui-plus/composables';
|
|
73
|
+
const msg = useMessageBox();
|
|
74
|
+
</script>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### 基础使用
|
|
78
|
+
|
|
79
|
+
可在标题(`title`)和内容(`content`)中使用`\n`来实现换行
|
|
80
|
+
|
|
81
|
+
```javascript
|
|
82
|
+
function click() {
|
|
83
|
+
msg.showMsgBox({
|
|
84
|
+
title: '确认删除订单吗?',
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
#### 带图标
|
|
90
|
+
|
|
91
|
+
- 内置三种图标类型:`info`、`success`、`error`
|
|
92
|
+
- 当显示图标时,内容(`content`)会失效,只显示标题(`title`)
|
|
93
|
+
|
|
94
|
+
```javascript
|
|
95
|
+
function msgBoxIcon1() {
|
|
96
|
+
msg.showMsgBox({
|
|
97
|
+
title: '提示',
|
|
98
|
+
icon: 'info',
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function msgBoxIcon2() {
|
|
102
|
+
msg.showMsgBox({
|
|
103
|
+
title: '提示',
|
|
104
|
+
icon: 'success',
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function msgBoxIcon3() {
|
|
108
|
+
msg.showMsgBox({
|
|
109
|
+
title: '提示',
|
|
110
|
+
icon: 'error',
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
#### 自定义按钮
|
|
116
|
+
|
|
117
|
+
```javascript
|
|
118
|
+
function msgBoxBtn1() {
|
|
119
|
+
msg.showMsgBox({
|
|
120
|
+
title: '提示',
|
|
121
|
+
content: '确认删除订单吗?',
|
|
122
|
+
cancelText: '算了',
|
|
123
|
+
confirmText: '删吧',
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function msgBoxBtn2() {
|
|
127
|
+
msg.showMsgBox({
|
|
128
|
+
title: '提示',
|
|
129
|
+
content: '确认删除订单吗?',
|
|
130
|
+
cancelColor: '#e1e',
|
|
131
|
+
confirmColor: '#a8ae1e',
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function msgBoxBtn3() {
|
|
135
|
+
msg.showMsgBox({
|
|
136
|
+
title: '提示',
|
|
137
|
+
content: '确认删除订单吗?',
|
|
138
|
+
showCancel: false,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
#### 显示输入框
|
|
144
|
+
|
|
145
|
+
当显示输入框时,内容(`content`)将不显示
|
|
146
|
+
|
|
147
|
+
```javascript
|
|
148
|
+
function msgBoxInput() {
|
|
149
|
+
msg.showMsgBox({
|
|
150
|
+
title: '提示',
|
|
151
|
+
content: '确认删除订单吗?',
|
|
152
|
+
editable: true,
|
|
153
|
+
placeholderText: '请输入',
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
#### 插槽
|
|
159
|
+
|
|
160
|
+
如果提供的弹框内容不满足需求,可以使用插槽自定义弹框内容。
|
|
161
|
+
可以通过指定唯一标识`selector`的方式,在一个页面中使用多个`ste-message-box`,`useSteMsgBox(selector)`会返回一个指定了selector的组件实例。
|
|
162
|
+
|
|
163
|
+
```html
|
|
164
|
+
<template>
|
|
165
|
+
<ste-button @click="customClick">插槽</ste-button>
|
|
166
|
+
<ste-message-box selector="myMsgBox">
|
|
167
|
+
<view style="display: flex; justify-content: center; padding-bottom: 20rpx;width: 504rpx">
|
|
168
|
+
<ste-rate v-model="rate"></ste-rate>
|
|
169
|
+
</view>
|
|
170
|
+
</ste-message-box>
|
|
171
|
+
</template>
|
|
172
|
+
<script lang="ts" setup>
|
|
173
|
+
import { ref } from 'vue';
|
|
174
|
+
import useSteMsgBox from '@/node_modules/stellar-ui/components/ste-message-box/ste-message-box.js';
|
|
175
|
+
const msgBox = useSteMsgBox('myMsgBox');
|
|
176
|
+
|
|
177
|
+
const rage = ref(0);
|
|
178
|
+
function customClick() {
|
|
179
|
+
msgBox.showMsgBox({
|
|
180
|
+
title: '评分',
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
</script>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### 回调事件
|
|
187
|
+
|
|
188
|
+
```javascript
|
|
189
|
+
function msgBoxCallback1() {
|
|
190
|
+
this.showMsgBox({
|
|
191
|
+
title: '提示',
|
|
192
|
+
cancel: () => {
|
|
193
|
+
console.log('点击了取消');
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
function msgBoxCallback2() {
|
|
198
|
+
this.showMsgBox({
|
|
199
|
+
title: '提示',
|
|
200
|
+
confirm: () => {
|
|
201
|
+
console.log('点击了确认');
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
function msgBoxCallback3() {
|
|
206
|
+
this.showMsgBox({
|
|
207
|
+
title: '提示',
|
|
208
|
+
complete: () => {
|
|
209
|
+
console.log('弹框完成');
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---$
|
|
216
|
+
|
|
217
|
+
### API
|
|
218
|
+
|
|
219
|
+
<!-- props -->
|
|
220
|
+
|
|
221
|
+
---$
|
|
222
|
+
{{fuyuwei}}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const ICON_OBJ = {
|
|
2
|
+
info: '',
|
|
3
|
+
success: '',
|
|
4
|
+
error: '',
|
|
5
|
+
}
|
|
6
|
+
export const DURATION = 200
|
|
7
|
+
export const ANIMATION_PROP: UniApp.CreateAnimationOptions = { duration: DURATION, timingFunction: 'ease-out' }
|
|
8
|
+
|
|
9
|
+
export type MessageBoxIcon = 'info' | 'success' | 'error'
|
|
10
|
+
|
|
11
|
+
export const DEFAULT_CONFIG = {
|
|
12
|
+
title: '',
|
|
13
|
+
content: '',
|
|
14
|
+
showCancel: true,
|
|
15
|
+
icon: '',
|
|
16
|
+
cancelText: '取消',
|
|
17
|
+
cancelColor: '#333333',
|
|
18
|
+
confirmText: '确认',
|
|
19
|
+
confirmColor: '',
|
|
20
|
+
editable: false,
|
|
21
|
+
placeholderText: '',
|
|
22
|
+
success: null,
|
|
23
|
+
fail: null,
|
|
24
|
+
complete: null,
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ste-message-box",
|
|
3
|
+
"description": "模拟系统的消息提示框而实现的一套模态对话框组件,用于消息提示、确认消息和提交内容。",
|
|
4
|
+
"example": "<ste-message-box></ste-message-box>",
|
|
5
|
+
"tutorial": "https://stellar-ui.intecloud.com.cn/plus/#/?active=message-box",
|
|
6
|
+
"attributes": [
|
|
7
|
+
{
|
|
8
|
+
"name": "selector",
|
|
9
|
+
"description": "用于自定义插槽时的选择器",
|
|
10
|
+
"type": "String",
|
|
11
|
+
"default": ""
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const messageBoxDefaultOptionsKey = 'messageBox'
|