@wot-ui/ui 1.0.0 → 2.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/attributes.json +1 -0
- package/changelog.md +53 -0
- package/common/AbortablePromise.ts +28 -0
- package/common/canvasHelper.ts +49 -0
- package/common/clickoutside.ts +25 -0
- package/common/event.ts +8 -0
- package/common/formatDate.ts +68 -0
- package/common/interceptor.ts +43 -0
- package/common/props.ts +53 -0
- package/common/util.ts +836 -0
- package/components/wd-action-sheet/index.scss +232 -0
- package/components/wd-action-sheet/types.ts +155 -0
- package/components/wd-action-sheet/wd-action-sheet.vue +176 -0
- package/components/wd-avatar/index.scss +150 -0
- package/components/wd-avatar/types.ts +98 -0
- package/components/wd-avatar/wd-avatar.vue +184 -0
- package/components/wd-avatar-group/index.scss +11 -0
- package/components/wd-avatar-group/types.ts +61 -0
- package/components/wd-avatar-group/wd-avatar-group.vue +115 -0
- package/components/wd-backtop/index.scss +67 -0
- package/components/wd-backtop/types.ts +66 -0
- package/components/wd-backtop/wd-backtop.vue +57 -0
- package/components/wd-badge/index.scss +116 -0
- package/components/wd-badge/types.ts +94 -0
- package/components/wd-badge/wd-badge.vue +78 -0
- package/components/wd-button/index.scss +436 -0
- package/components/wd-button/types.ts +204 -0
- package/components/wd-button/wd-button.vue +210 -0
- package/components/wd-calendar/index.scss +97 -0
- package/components/wd-calendar/types.ts +221 -0
- package/components/wd-calendar/wd-calendar.vue +339 -0
- package/components/wd-calendar-view/index.scss +41 -0
- package/components/wd-calendar-view/month/index.scss +144 -0
- package/components/wd-calendar-view/month/month.vue +389 -0
- package/components/wd-calendar-view/month/types.ts +70 -0
- package/components/wd-calendar-view/monthPanel/index.scss +84 -0
- package/components/wd-calendar-view/monthPanel/month-panel.vue +541 -0
- package/components/wd-calendar-view/monthPanel/types.ts +151 -0
- package/components/wd-calendar-view/types.ts +166 -0
- package/components/wd-calendar-view/utils.ts +318 -0
- package/components/wd-calendar-view/wd-calendar-view.vue +117 -0
- package/components/wd-calendar-view/year/index.scss +148 -0
- package/components/wd-calendar-view/year/types.ts +74 -0
- package/components/wd-calendar-view/year/year.vue +206 -0
- package/components/wd-calendar-view/yearPanel/index.scss +42 -0
- package/components/wd-calendar-view/yearPanel/types.ts +96 -0
- package/components/wd-calendar-view/yearPanel/year-panel.vue +249 -0
- package/components/wd-card/index.scss +104 -0
- package/components/wd-card/types.ts +47 -0
- package/components/wd-card/wd-card.vue +38 -0
- package/components/wd-cascader/index.scss +154 -0
- package/components/wd-cascader/types.ts +191 -0
- package/components/wd-cascader/wd-cascader.vue +589 -0
- package/components/wd-cell/index.scss +244 -0
- package/components/wd-cell/types.ts +205 -0
- package/components/wd-cell/wd-cell.vue +172 -0
- package/components/wd-cell-group/index.scss +53 -0
- package/components/wd-cell-group/types.ts +97 -0
- package/components/wd-cell-group/wd-cell-group.vue +48 -0
- package/components/wd-checkbox/index.scss +166 -0
- package/components/wd-checkbox/types.ts +118 -0
- package/components/wd-checkbox/wd-checkbox.vue +216 -0
- package/components/wd-checkbox-group/index.scss +5 -0
- package/components/wd-checkbox-group/types.ts +93 -0
- package/components/wd-checkbox-group/wd-checkbox-group.vue +148 -0
- package/components/wd-circle/index.scss +28 -0
- package/components/wd-circle/types.ts +54 -0
- package/components/wd-circle/wd-circle.vue +306 -0
- package/components/wd-col/index.scss +5 -0
- package/components/wd-col/types.ts +16 -0
- package/components/wd-col/wd-col.vue +83 -0
- package/components/wd-collapse/index.scss +71 -0
- package/components/wd-collapse/types.ts +68 -0
- package/components/wd-collapse/wd-collapse.vue +165 -0
- package/components/wd-collapse-item/index.scss +86 -0
- package/components/wd-collapse-item/types.ts +62 -0
- package/components/wd-collapse-item/wd-collapse-item.vue +184 -0
- package/components/wd-config-provider/index.scss +10 -0
- package/components/wd-config-provider/types.ts +2063 -0
- package/components/wd-config-provider/wd-config-provider.vue +61 -0
- package/components/wd-count-down/index.scss +16 -0
- package/components/wd-count-down/types.ts +58 -0
- package/components/wd-count-down/utils.ts +52 -0
- package/components/wd-count-down/wd-count-down.vue +62 -0
- package/components/wd-count-to/index.scss +25 -0
- package/components/wd-count-to/types.ts +121 -0
- package/components/wd-count-to/wd-count-to.vue +126 -0
- package/components/wd-curtain/index.scss +96 -0
- package/components/wd-curtain/types.ts +82 -0
- package/components/wd-curtain/wd-curtain.vue +172 -0
- package/components/wd-datetime-picker/index.scss +133 -0
- package/components/wd-datetime-picker/types.ts +198 -0
- package/components/wd-datetime-picker/wd-datetime-picker.vue +526 -0
- package/components/wd-datetime-picker-view/types.ts +171 -0
- package/components/wd-datetime-picker-view/util.ts +30 -0
- package/components/wd-datetime-picker-view/wd-datetime-picker-view.vue +402 -0
- package/components/wd-dialog/index.scss +281 -0
- package/components/wd-dialog/index.ts +168 -0
- package/components/wd-dialog/types.ts +452 -0
- package/components/wd-dialog/wd-dialog.vue +586 -0
- package/components/wd-divider/index.scss +122 -0
- package/components/wd-divider/types.ts +50 -0
- package/components/wd-divider/wd-divider.vue +54 -0
- package/components/wd-drop-menu/index.scss +90 -0
- package/components/wd-drop-menu/types.ts +38 -0
- package/components/wd-drop-menu/wd-drop-menu.vue +168 -0
- package/components/wd-drop-menu-item/index.scss +96 -0
- package/components/wd-drop-menu-item/types.ts +93 -0
- package/components/wd-drop-menu-item/wd-drop-menu-item.vue +205 -0
- package/components/wd-empty/index.scss +46 -0
- package/components/wd-empty/types.ts +37 -0
- package/components/wd-empty/wd-empty.vue +47 -0
- package/components/wd-fab/index.scss +124 -0
- package/components/wd-fab/types.ts +119 -0
- package/components/wd-fab/wd-fab.vue +322 -0
- package/components/wd-floating-panel/index.scss +73 -0
- package/components/wd-floating-panel/type.ts +32 -0
- package/components/wd-floating-panel/wd-floating-panel.vue +142 -0
- package/components/wd-form/adapters/zod.ts +56 -0
- package/components/wd-form/types.ts +147 -0
- package/components/wd-form/wd-form.vue +121 -0
- package/components/wd-form-item/index.scss +26 -0
- package/components/wd-form-item/types.ts +134 -0
- package/components/wd-form-item/wd-form-item.vue +182 -0
- package/components/wd-gap/index.scss +9 -0
- package/components/wd-gap/types.ts +26 -0
- package/components/wd-gap/wd-gap.vue +38 -0
- package/components/wd-grid/index.scss +11 -0
- package/components/wd-grid/types.ts +97 -0
- package/components/wd-grid/wd-grid.vue +48 -0
- package/components/wd-grid-item/index.scss +187 -0
- package/components/wd-grid-item/types.ts +98 -0
- package/components/wd-grid-item/wd-grid-item.vue +295 -0
- package/components/wd-icon/index.scss +46 -0
- package/components/wd-icon/types.ts +44 -0
- package/components/wd-icon/wd-icon.vue +66 -0
- package/components/wd-image-preview/index.scss +94 -0
- package/components/wd-image-preview/index.ts +95 -0
- package/components/wd-image-preview/types.ts +165 -0
- package/components/wd-image-preview/wd-image-preview.vue +233 -0
- package/components/wd-img/index.scss +82 -0
- package/components/wd-img/types.ts +96 -0
- package/components/wd-img/wd-img.vue +91 -0
- package/components/wd-img-cropper/index.scss +259 -0
- package/components/wd-img-cropper/types.ts +101 -0
- package/components/wd-img-cropper/wd-img-cropper.vue +653 -0
- package/components/wd-index-anchor/index.scss +34 -0
- package/components/wd-index-anchor/type.ts +9 -0
- package/components/wd-index-anchor/wd-index-anchor.vue +55 -0
- package/components/wd-index-bar/index.scss +68 -0
- package/components/wd-index-bar/type.ts +23 -0
- package/components/wd-index-bar/wd-index-bar.vue +157 -0
- package/components/wd-input/index.scss +129 -0
- package/components/wd-input/types.ts +165 -0
- package/components/wd-input/wd-input.vue +237 -0
- package/components/wd-input-number/index.scss +233 -0
- package/components/wd-input-number/types.ts +131 -0
- package/components/wd-input-number/wd-input-number.vue +473 -0
- package/components/wd-keyboard/constants.ts +81 -0
- package/components/wd-keyboard/index.scss +104 -0
- package/components/wd-keyboard/key/index.scss +103 -0
- package/components/wd-keyboard/key/index.vue +84 -0
- package/components/wd-keyboard/key/types.ts +44 -0
- package/components/wd-keyboard/types.ts +138 -0
- package/components/wd-keyboard/wd-keyboard.vue +236 -0
- package/components/wd-loading/index.scss +205 -0
- package/components/wd-loading/types.ts +61 -0
- package/components/wd-loading/wd-loading.vue +70 -0
- package/components/wd-loadmore/index.scss +62 -0
- package/components/wd-loadmore/types.ts +42 -0
- package/components/wd-loadmore/wd-loadmore.vue +68 -0
- package/components/wd-navbar/index.scss +96 -0
- package/components/wd-navbar/types.ts +74 -0
- package/components/wd-navbar/wd-navbar.vue +136 -0
- package/components/wd-navbar-capsule/index.scss +70 -0
- package/components/wd-navbar-capsule/types.ts +11 -0
- package/components/wd-navbar-capsule/wd-navbar-capsule.vue +48 -0
- package/components/wd-notice-bar/index.scss +94 -0
- package/components/wd-notice-bar/types.ts +97 -0
- package/components/wd-notice-bar/wd-notice-bar.vue +270 -0
- package/components/wd-notify/index.scss +114 -0
- package/components/wd-notify/index.ts +63 -0
- package/components/wd-notify/types.ts +130 -0
- package/components/wd-notify/wd-notify.vue +162 -0
- package/components/wd-overlay/index.scss +14 -0
- package/components/wd-overlay/types.ts +42 -0
- package/components/wd-overlay/wd-overlay.vue +55 -0
- package/components/wd-pagination/index.scss +71 -0
- package/components/wd-pagination/types.ts +69 -0
- package/components/wd-pagination/wd-pagination.vue +118 -0
- package/components/wd-password-input/index.scss +134 -0
- package/components/wd-password-input/types.ts +42 -0
- package/components/wd-password-input/wd-password-input.vue +51 -0
- package/components/wd-picker/index.scss +72 -0
- package/components/wd-picker/types.ts +141 -0
- package/components/wd-picker/wd-picker.vue +220 -0
- package/components/wd-picker-view/index.scss +93 -0
- package/components/wd-picker-view/types.ts +145 -0
- package/components/wd-picker-view/useSelection.ts +385 -0
- package/components/wd-picker-view/wd-picker-view.vue +227 -0
- package/components/wd-popover/index.scss +117 -0
- package/components/wd-popover/types.ts +106 -0
- package/components/wd-popover/wd-popover.vue +212 -0
- package/components/wd-popup/index.scss +89 -0
- package/components/wd-popup/types.ts +110 -0
- package/components/wd-popup/wd-popup.vue +174 -0
- package/components/wd-progress/index.scss +155 -0
- package/components/wd-progress/types.ts +94 -0
- package/components/wd-progress/wd-progress.vue +249 -0
- package/components/wd-radio/index.scss +189 -0
- package/components/wd-radio/types.ts +64 -0
- package/components/wd-radio/wd-radio.vue +164 -0
- package/components/wd-radio-group/index.scss +5 -0
- package/components/wd-radio-group/types.ts +70 -0
- package/components/wd-radio-group/wd-radio-group.vue +53 -0
- package/components/wd-rate/index.scss +57 -0
- package/components/wd-rate/types.ts +86 -0
- package/components/wd-rate/wd-rate.vue +168 -0
- package/components/wd-resize/index.scss +31 -0
- package/components/wd-resize/types.ts +14 -0
- package/components/wd-resize/wd-resize.vue +157 -0
- package/components/wd-root-portal/wd-root-portal.vue +77 -0
- package/components/wd-row/index.scss +6 -0
- package/components/wd-row/types.ts +36 -0
- package/components/wd-row/wd-row.vue +88 -0
- package/components/wd-search/index.scss +171 -0
- package/components/wd-search/types.ts +107 -0
- package/components/wd-search/wd-search.vue +198 -0
- package/components/wd-segmented/index.scss +155 -0
- package/components/wd-segmented/types.ts +81 -0
- package/components/wd-segmented/wd-segmented.vue +169 -0
- package/components/wd-select-picker/index.scss +72 -0
- package/components/wd-select-picker/types.ts +72 -0
- package/components/wd-select-picker/wd-select-picker.vue +371 -0
- package/components/wd-sidebar/index.scss +25 -0
- package/components/wd-sidebar/types.ts +34 -0
- package/components/wd-sidebar/wd-sidebar.vue +57 -0
- package/components/wd-sidebar-item/index.scss +91 -0
- package/components/wd-sidebar-item/types.ts +28 -0
- package/components/wd-sidebar-item/wd-sidebar-item.vue +118 -0
- package/components/wd-signature/index.scss +42 -0
- package/components/wd-signature/types.ts +295 -0
- package/components/wd-signature/wd-signature.vue +664 -0
- package/components/wd-skeleton/index.scss +112 -0
- package/components/wd-skeleton/types.ts +124 -0
- package/components/wd-skeleton/wd-skeleton.vue +110 -0
- package/components/wd-slide-verify/index.scss +112 -0
- package/components/wd-slide-verify/types.ts +98 -0
- package/components/wd-slide-verify/wd-slide-verify.vue +222 -0
- package/components/wd-slider/index.scss +485 -0
- package/components/wd-slider/types.ts +166 -0
- package/components/wd-slider/wd-slider.vue +529 -0
- package/components/wd-sort-button/index.scss +126 -0
- package/components/wd-sort-button/types.ts +68 -0
- package/components/wd-sort-button/wd-sort-button.vue +67 -0
- package/components/wd-step/index.scss +366 -0
- package/components/wd-step/types.ts +43 -0
- package/components/wd-step/wd-step.vue +181 -0
- package/components/wd-steps/index.scss +7 -0
- package/components/wd-steps/types.ts +50 -0
- package/components/wd-steps/wd-steps.vue +39 -0
- package/components/wd-sticky/index.scss +9 -0
- package/components/wd-sticky/types.ts +13 -0
- package/components/wd-sticky/wd-sticky.vue +192 -0
- package/components/wd-sticky-box/index.scss +6 -0
- package/components/wd-sticky-box/types.ts +20 -0
- package/components/wd-sticky-box/wd-sticky-box.vue +157 -0
- package/components/wd-swipe-action/index.scss +22 -0
- package/components/wd-swipe-action/types.ts +87 -0
- package/components/wd-swipe-action/wd-swipe-action.vue +320 -0
- package/components/wd-swiper/index.scss +69 -0
- package/components/wd-swiper/types.ts +275 -0
- package/components/wd-swiper/wd-swiper.vue +332 -0
- package/components/wd-swiper-nav/index.scss +179 -0
- package/components/wd-swiper-nav/types.ts +42 -0
- package/components/wd-swiper-nav/wd-swiper-nav.vue +42 -0
- package/components/wd-switch/index.scss +177 -0
- package/components/wd-switch/types.ts +93 -0
- package/components/wd-switch/wd-switch.vue +107 -0
- package/components/wd-tab/index.scss +16 -0
- package/components/wd-tab/types.ts +45 -0
- package/components/wd-tab/wd-tab.vue +99 -0
- package/components/wd-tabbar/index.scss +71 -0
- package/components/wd-tabbar/types.ts +79 -0
- package/components/wd-tabbar/wd-tabbar.vue +109 -0
- package/components/wd-tabbar-item/index.scss +50 -0
- package/components/wd-tabbar-item/types.ts +45 -0
- package/components/wd-tabbar-item/wd-tabbar-item.vue +101 -0
- package/components/wd-table/index.scss +128 -0
- package/components/wd-table/types.ts +160 -0
- package/components/wd-table/wd-table.vue +331 -0
- package/components/wd-table-column/index.scss +15 -0
- package/components/wd-table-column/types.ts +81 -0
- package/components/wd-table-column/wd-table-column.vue +198 -0
- package/components/wd-tabs/index.scss +332 -0
- package/components/wd-tabs/types.ts +155 -0
- package/components/wd-tabs/wd-tabs.vue +508 -0
- package/components/wd-tag/index.scss +325 -0
- package/components/wd-tag/types.ts +90 -0
- package/components/wd-tag/wd-tag.vue +158 -0
- package/components/wd-text/index.scss +52 -0
- package/components/wd-text/types.ts +107 -0
- package/components/wd-text/wd-text.vue +141 -0
- package/components/wd-textarea/index.scss +112 -0
- package/components/wd-textarea/types.ts +151 -0
- package/components/wd-textarea/wd-textarea.vue +212 -0
- package/components/wd-toast/index.scss +92 -0
- package/components/wd-toast/index.ts +97 -0
- package/components/wd-toast/types.ts +190 -0
- package/components/wd-toast/wd-toast.vue +158 -0
- package/components/wd-tooltip/index.scss +77 -0
- package/components/wd-tooltip/types.ts +105 -0
- package/components/wd-tooltip/wd-tooltip.vue +169 -0
- package/components/wd-tour/index.scss +106 -0
- package/components/wd-tour/types.ts +268 -0
- package/components/wd-tour/wd-tour.vue +518 -0
- package/components/wd-transition/index.scss +67 -0
- package/components/wd-transition/types.ts +106 -0
- package/components/wd-transition/wd-transition.vue +238 -0
- package/components/wd-upload/index.scss +204 -0
- package/components/wd-upload/types.ts +390 -0
- package/components/wd-upload/wd-upload.vue +565 -0
- package/components/wd-video-preview/index.scss +54 -0
- package/components/wd-video-preview/index.ts +64 -0
- package/components/wd-video-preview/types.ts +66 -0
- package/components/wd-video-preview/wd-video-preview.vue +141 -0
- package/components/wd-watermark/index.scss +21 -0
- package/components/wd-watermark/types.ts +130 -0
- package/components/wd-watermark/wd-watermark.vue +718 -0
- package/components/wot-ui/wot-ui.vue +5 -0
- package/composables/index.ts +12 -0
- package/composables/useCell.ts +34 -0
- package/composables/useChildren.ts +120 -0
- package/composables/useConfigProvider.ts +45 -0
- package/composables/useCountDown.ts +138 -0
- package/composables/useDeviceInfo.ts +136 -0
- package/composables/useLockScroll.ts +37 -0
- package/composables/useParent.ts +51 -0
- package/composables/usePopover.ts +212 -0
- package/composables/useQueue.ts +52 -0
- package/composables/useRaf.ts +37 -0
- package/composables/useTouch.ts +43 -0
- package/composables/useTranslate.ts +12 -0
- package/composables/useUpload.ts +366 -0
- package/global.d.ts +106 -0
- package/index.ts +11 -0
- package/locale/index.ts +32 -0
- package/locale/lang/ar-SA.ts +150 -0
- package/locale/lang/de-DE.ts +150 -0
- package/locale/lang/en-US.ts +150 -0
- package/locale/lang/es-ES.ts +150 -0
- package/locale/lang/fr-FR.ts +150 -0
- package/locale/lang/ja-JP.ts +150 -0
- package/locale/lang/ko-KR.ts +150 -0
- package/locale/lang/pt-PT.ts +150 -0
- package/locale/lang/ru-RU.ts +150 -0
- package/locale/lang/th-TH.ts +150 -0
- package/locale/lang/tr-TR.ts +155 -0
- package/locale/lang/ug-CN.ts +154 -0
- package/locale/lang/vi-VN.ts +89 -0
- package/locale/lang/zh-CN.ts +154 -0
- package/locale/lang/zh-HK.ts +78 -0
- package/locale/lang/zh-TW.ts +78 -0
- package/package.json +1 -11
- package/styles/iconfont/iconfont.scss +1243 -0
- package/styles/mixin/_config.scss +7 -0
- package/styles/mixin/_function.scss +44 -0
- package/styles/mixin/_mixin.scss +473 -0
- package/styles/theme/base/color.scss +210 -0
- package/styles/theme/base/font.scss +13 -0
- package/styles/theme/base/index.scss +8 -0
- package/styles/theme/base/insets.scss +32 -0
- package/styles/theme/base/number.scss +36 -0
- package/styles/theme/base/opacity.scss +9 -0
- package/styles/theme/base/radius.scss +13 -0
- package/styles/theme/base/stroke.scss +9 -0
- package/styles/theme/base/typography.scss +44 -0
- package/styles/theme/dark.scss +101 -0
- package/styles/theme/index.scss +16 -0
- package/styles/theme/light.scss +101 -0
- package/styles/variable.scss +472 -0
- package/tags.json +1 -0
- package/web-types.json +1 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
@use '../../styles/mixin/mixin.scss' as *;
|
|
2
|
+
@use '../../styles/variable.scss' as *;
|
|
3
|
+
|
|
4
|
+
// 行间距
|
|
5
|
+
$skeleton-row-margin-bottom: var(--wot-skeleton-row-margin-bottom, $spacing-loose) !default;
|
|
6
|
+
// 占位块背景色
|
|
7
|
+
$skeleton-col-bg: var(--wot-skeleton-col-bg, $filled-strong) !default;
|
|
8
|
+
// 文本占位高度
|
|
9
|
+
$skeleton-text-height: var(--wot-skeleton-text-height, $n-16) !default;
|
|
10
|
+
// 矩形占位高度
|
|
11
|
+
$skeleton-rect-height: var(--wot-skeleton-rect-height, $n-16) !default;
|
|
12
|
+
// 圆形占位尺寸
|
|
13
|
+
$skeleton-circle-height: var(--wot-skeleton-circle-height, $n-48) !default;
|
|
14
|
+
// 文本占位圆角
|
|
15
|
+
$skeleton-text-border-radius: var(--wot-skeleton-text-border-radius, $radius-small) !default;
|
|
16
|
+
// 矩形占位圆角
|
|
17
|
+
$skeleton-rect-border-radius: var(--wot-skeleton-rect-border-radius, $radius-main) !default;
|
|
18
|
+
// 圆形占位圆角
|
|
19
|
+
$skeleton-circle-border-radius: var(--wot-skeleton-circle-border-radius, $radius-radius-full) !default;
|
|
20
|
+
// 渐变动画高亮色
|
|
21
|
+
$skeleton-animation-gradient: var(--wot-skeleton-animation-gradient, $filled-bottom) !default;
|
|
22
|
+
// 闪烁动画高亮色
|
|
23
|
+
$skeleton-animation-flashed: var(--wot-skeleton-animation-flashed, $filled-bottom) !default;
|
|
24
|
+
// 闪烁动画透明度
|
|
25
|
+
$skeleton-animation-flashed-opacity: var(--wot-skeleton-animation-flashed-opacity, $opacity-backdrop) !default;
|
|
26
|
+
|
|
27
|
+
@include b(skeleton) {
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
|
|
30
|
+
@include e(row) {
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
margin-bottom: $skeleton-row-margin-bottom;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
|
|
36
|
+
&:only-child,
|
|
37
|
+
&:last-child {
|
|
38
|
+
margin-bottom: 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
@include e(col) {
|
|
42
|
+
border-radius: $skeleton-text-border-radius;
|
|
43
|
+
background-color: $skeleton-col-bg;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
|
|
48
|
+
&:first-child:last-child,
|
|
49
|
+
&:last-child {
|
|
50
|
+
margin-right: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
@include m(type) {
|
|
54
|
+
&-text {
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: $skeleton-text-height;
|
|
57
|
+
border-radius: $skeleton-text-border-radius;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&-rect {
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: $skeleton-rect-height;
|
|
63
|
+
border-radius: $skeleton-rect-border-radius;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&-circle {
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
width: $skeleton-circle-height;
|
|
69
|
+
height: $skeleton-circle-height;
|
|
70
|
+
border-radius: $skeleton-circle-border-radius;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
@include m(animation) {
|
|
74
|
+
&-gradient {
|
|
75
|
+
position: relative;
|
|
76
|
+
overflow-x: hidden;
|
|
77
|
+
|
|
78
|
+
&::after {
|
|
79
|
+
content: ' ';
|
|
80
|
+
position: absolute;
|
|
81
|
+
animation: wd-skeleton-gradient 1.5s linear 2s infinite;
|
|
82
|
+
background: linear-gradient(90deg, transparent, $skeleton-animation-gradient, transparent);
|
|
83
|
+
inset: 0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&-flashed {
|
|
88
|
+
animation: wd-skeleton-flashed 2s linear 2s infinite;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes wd-skeleton-gradient {
|
|
93
|
+
0% {
|
|
94
|
+
transform: translateX(-100%) skewX(-15deg);
|
|
95
|
+
}
|
|
96
|
+
100% {
|
|
97
|
+
transform: translateX(100%) skewX(-15deg);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
@keyframes wd-skeleton-flashed {
|
|
101
|
+
0% {
|
|
102
|
+
opacity: 1;
|
|
103
|
+
}
|
|
104
|
+
50% {
|
|
105
|
+
opacity: $skeleton-animation-flashed-opacity;
|
|
106
|
+
background: $skeleton-animation-flashed;
|
|
107
|
+
}
|
|
108
|
+
100% {
|
|
109
|
+
opacity: 1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { PropType, ExtractPropTypes, CSSProperties } from 'vue'
|
|
2
|
+
import { makeArrayProp, makeBooleanProp, makeStringProp } from '../../common/props'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 骨架图主题样式
|
|
6
|
+
* @type {'text' | 'avatar' | 'paragraph' | 'image'}
|
|
7
|
+
*/
|
|
8
|
+
export type SkeletonTheme = 'text' | 'avatar' | 'paragraph' | 'image'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 骨架图加载动画类型
|
|
12
|
+
* @type {'gradient' | 'flashed'}
|
|
13
|
+
*/
|
|
14
|
+
export type SkeletonAnimation = 'gradient' | 'flashed'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 骨架图行列配置对象
|
|
18
|
+
*/
|
|
19
|
+
export type SkeletonRowColObj = {
|
|
20
|
+
/** 占位符类型 */
|
|
21
|
+
type?: 'rect' | 'circle' | 'text'
|
|
22
|
+
/** 占位符宽高(正方形) */
|
|
23
|
+
size?: string | number
|
|
24
|
+
/** 占位符宽度 */
|
|
25
|
+
width?: string | number
|
|
26
|
+
/** 占位符高度 */
|
|
27
|
+
height?: string | number
|
|
28
|
+
/** 占位符外边距(简写) */
|
|
29
|
+
margin?: string | number
|
|
30
|
+
/** 占位符背景色 */
|
|
31
|
+
background?: string
|
|
32
|
+
/** 占位符左外边距 */
|
|
33
|
+
marginLeft?: string | number
|
|
34
|
+
/** 占位符右外边距 */
|
|
35
|
+
marginRight?: string | number
|
|
36
|
+
/** 占位符圆角半径 */
|
|
37
|
+
borderRadius?: string | number
|
|
38
|
+
/** 占位符背景色(等同于 background) */
|
|
39
|
+
backgroundColor?: string
|
|
40
|
+
/** 其他自定义属性 */
|
|
41
|
+
[key: string]: any
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 骨架图行列配置类型
|
|
46
|
+
* 支持:数字、配置对象、配置对象数组
|
|
47
|
+
* @example
|
|
48
|
+
* ```
|
|
49
|
+
* // 示例1: [1, 1, 2] 表示三行,分别为1列、1列、2列
|
|
50
|
+
* // 示例2: [1, { width: '100px' }] 表示两行,第二行自定义宽度
|
|
51
|
+
* // 示例3: [1, [{ width: '50%' }, { width: '50%' }]] 表示两行,第二行两列
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export type SkeletonRowCol = number | SkeletonRowColObj | Array<SkeletonRowColObj>
|
|
55
|
+
|
|
56
|
+
export const skeletonProps = {
|
|
57
|
+
/**
|
|
58
|
+
* 骨架图风格
|
|
59
|
+
* 可选值: 'text' | 'avatar' | 'paragraph' | 'image'
|
|
60
|
+
* 默认值: 'text'
|
|
61
|
+
*/
|
|
62
|
+
theme: makeStringProp<SkeletonTheme>('text'),
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 行列配置,用于自定义骨架图的行列数量及各项样式
|
|
66
|
+
* 类型: Array<number | SkeletonRowColObj | Array<SkeletonRowColObj>>
|
|
67
|
+
* 默认值: []
|
|
68
|
+
* @example
|
|
69
|
+
* ```
|
|
70
|
+
* // 三行,分别显示为一列、一列、两列的占位符
|
|
71
|
+
* [1, 1, 2]
|
|
72
|
+
*
|
|
73
|
+
* // 三行,第三行自定义宽度
|
|
74
|
+
* [1, 1, { width: '100px' }]
|
|
75
|
+
*
|
|
76
|
+
* // 第三行包含两列,分别设置宽度和右外边距
|
|
77
|
+
* [1, 1, [{ width: '50%' }, { width: '50%', marginRight: '10px' }]]
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
rowCol: makeArrayProp<SkeletonRowCol>(),
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 是否显示骨架图(加载中)
|
|
84
|
+
* 默认值: true
|
|
85
|
+
*/
|
|
86
|
+
loading: makeBooleanProp(true),
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 加载动画类型
|
|
90
|
+
* 可选值: 'gradient' | 'flashed' | ''
|
|
91
|
+
* 默认值: ''(无动画)
|
|
92
|
+
*/
|
|
93
|
+
animation: {
|
|
94
|
+
type: String as PropType<SkeletonAnimation>,
|
|
95
|
+
default: ''
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* 自定义样式类名
|
|
100
|
+
* 类型: string | string[] | Record<string, boolean>
|
|
101
|
+
* 默认值: ''
|
|
102
|
+
*/
|
|
103
|
+
customClass: {
|
|
104
|
+
type: [String, Array, Object],
|
|
105
|
+
default: ''
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* 自定义内联样式
|
|
110
|
+
* 类型: CSSProperties
|
|
111
|
+
* 默认值: {}
|
|
112
|
+
*/
|
|
113
|
+
customStyle: {
|
|
114
|
+
type: Object as PropType<CSSProperties>,
|
|
115
|
+
default() {
|
|
116
|
+
return {}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 骨架图组件 Props 类型
|
|
123
|
+
*/
|
|
124
|
+
export type SkeletonProps = ExtractPropTypes<typeof skeletonProps>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view :class="`wd-skeleton ${customClass}`" :style="customStyle">
|
|
3
|
+
<view class="wd-skeleton__content" v-if="show">
|
|
4
|
+
<view class="wd-skeleton__row" v-for="(row, index) of parsedRowCols" :key="`row-${index}`">
|
|
5
|
+
<view v-for="(col, idx) of row" :key="`col-${idx}`" :class="col.class" :style="col.style" />
|
|
6
|
+
</view>
|
|
7
|
+
</view>
|
|
8
|
+
<view v-else>
|
|
9
|
+
<slot />
|
|
10
|
+
</view>
|
|
11
|
+
</view>
|
|
12
|
+
</template>
|
|
13
|
+
<script lang="ts">
|
|
14
|
+
export default {
|
|
15
|
+
name: 'wd-skeleton',
|
|
16
|
+
// #ifndef MP-TOUTIAO
|
|
17
|
+
options: { virtualHost: true, addGlobalClass: true, styleIsolation: 'shared' }
|
|
18
|
+
// #endif
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script lang="ts" setup>
|
|
23
|
+
import type { CSSProperties } from 'vue'
|
|
24
|
+
import { ref, computed, watch } from 'vue'
|
|
25
|
+
import type { SkeletonRowCol, SkeletonRowColObj } from './types'
|
|
26
|
+
import { skeletonProps } from './types'
|
|
27
|
+
import { isNumber, addUnit } from '../../common/util'
|
|
28
|
+
|
|
29
|
+
const themeMap = {
|
|
30
|
+
avatar: [{ type: 'circle', height: '64px', width: '64px' }],
|
|
31
|
+
image: [{ type: 'rect', height: '64px', width: '64px' }],
|
|
32
|
+
text: [
|
|
33
|
+
1,
|
|
34
|
+
[
|
|
35
|
+
{ width: '24%', height: '16px', marginRight: '16px' },
|
|
36
|
+
{ width: '76%', height: '16px' }
|
|
37
|
+
]
|
|
38
|
+
],
|
|
39
|
+
paragraph: [1, 1, 1, { width: '55%' }]
|
|
40
|
+
}
|
|
41
|
+
const props = defineProps(skeletonProps)
|
|
42
|
+
const rowCols = ref<SkeletonRowCol[]>([])
|
|
43
|
+
|
|
44
|
+
const parsedRowCols = computed(() => {
|
|
45
|
+
return rowCols.value.map((item) => {
|
|
46
|
+
if (isNumber(item)) {
|
|
47
|
+
return [
|
|
48
|
+
{
|
|
49
|
+
class: getColItemClass({ type: 'text' }),
|
|
50
|
+
style: {}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
if (Array.isArray(item)) {
|
|
55
|
+
return item.map((col) => {
|
|
56
|
+
return {
|
|
57
|
+
...col,
|
|
58
|
+
class: getColItemClass(col),
|
|
59
|
+
style: getColItemStyle(col)
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
const nItem = item as SkeletonRowColObj
|
|
64
|
+
|
|
65
|
+
return [
|
|
66
|
+
{
|
|
67
|
+
...nItem,
|
|
68
|
+
class: getColItemClass(nItem),
|
|
69
|
+
style: getColItemStyle(nItem)
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
function getColItemClass(rowCol: SkeletonRowColObj) {
|
|
76
|
+
return ['wd-skeleton__col', `wd-skeleton--type-${rowCol.type || 'text'}`, { [`wd-skeleton--animation-${props.animation}`]: props.animation }]
|
|
77
|
+
}
|
|
78
|
+
function getColItemStyle(rowCol: SkeletonRowColObj) {
|
|
79
|
+
const style: CSSProperties = {}
|
|
80
|
+
const styleName = ['size', 'width', 'height', 'margin', 'background', 'marginLeft', 'marginRight', 'borderRadius', 'backgroundColor']
|
|
81
|
+
|
|
82
|
+
for (const name of styleName) {
|
|
83
|
+
if (Object.prototype.hasOwnProperty.call(rowCol, name)) {
|
|
84
|
+
const px = addUnit(rowCol[name])
|
|
85
|
+
|
|
86
|
+
if (name === 'size') {
|
|
87
|
+
style.width = px
|
|
88
|
+
style.height = px
|
|
89
|
+
} else {
|
|
90
|
+
;(style as any)[name] = px
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return style
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
watch(
|
|
98
|
+
() => props.rowCol,
|
|
99
|
+
(rowCol) => {
|
|
100
|
+
rowCols.value = [...(Array.isArray(rowCol) && rowCol.length ? props.rowCol : themeMap[props.theme])]
|
|
101
|
+
},
|
|
102
|
+
{ immediate: true }
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
const show = computed(() => props.loading == undefined || props.loading === true)
|
|
106
|
+
</script>
|
|
107
|
+
|
|
108
|
+
<style lang="scss">
|
|
109
|
+
@use './index.scss';
|
|
110
|
+
</style>
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
@use '../../styles/mixin/mixin.scss' as *;
|
|
2
|
+
@use '../../styles/variable.scss' as *;
|
|
3
|
+
|
|
4
|
+
// 组件高度
|
|
5
|
+
$slide-verify-height: var(--wot-slide-verify-height, $n-40) !default;
|
|
6
|
+
// 组件宽度
|
|
7
|
+
$slide-verify-width: var(--wot-slide-verify-width, 100%) !default;
|
|
8
|
+
// 组件背景色
|
|
9
|
+
$slide-verify-bg: var(--wot-slide-verify-bg, $filled-bottom) !default;
|
|
10
|
+
// 圆角
|
|
11
|
+
$slide-verify-radius: var(--wot-slide-verify-radius, $radius-large) !default;
|
|
12
|
+
// 成功态track背景色
|
|
13
|
+
$slide-verify-track-bg: var(--wot-slide-verify-track-bg, $success-main) !default;
|
|
14
|
+
// 禁用态透明度
|
|
15
|
+
$slide-verify-disabled-opacity: var(--wot-slide-verify-disabled-opacity, $opacity-disabled) !default;
|
|
16
|
+
// 提示文字颜色
|
|
17
|
+
$slide-verify-text-color: var(--wot-slide-verify-text-color, $text-main) !default;
|
|
18
|
+
// 提示文字字号
|
|
19
|
+
$slide-verify-text-font-size: var(--wot-slide-verify-text-font-size, $typography-label-size-main) !default;
|
|
20
|
+
// 提示文字行高
|
|
21
|
+
$slide-verify-text-line-height: var(--wot-slide-verify-text-line-height, $typography-label-line--height-size-main) !default;
|
|
22
|
+
// 成功态文字颜色
|
|
23
|
+
$slide-verify-success-text-color: var(--wot-slide-verify-success-text-color, $text-white) !default;
|
|
24
|
+
// 滑块背景色
|
|
25
|
+
$slide-verify-button-bg: var(--wot-slide-verify-button-bg, $filled-oppo) !default;
|
|
26
|
+
// 滑块阴影色
|
|
27
|
+
$slide-verify-button-shadow: var(--wot-slide-verify-button-shadow, $n-0 $n-2 $n-8 $opac-4_15) !default;
|
|
28
|
+
// 滑块图标颜色
|
|
29
|
+
$slide-verify-button-color: var(--wot-slide-verify-button-color, $icon-secondary) !default;
|
|
30
|
+
// 滑块图标成功态颜色
|
|
31
|
+
$slide-verify-button-success-color: var(--wot-slide-verify-button-success-color, $success-main) !default;
|
|
32
|
+
// 滑块尺寸
|
|
33
|
+
$slide-verify-button-size: var(--wot-slide-verify-button-size, $slide-verify-height) !default;
|
|
34
|
+
// 滑块边框颜色
|
|
35
|
+
$slide-verify-button-border-color: var(--wot-slide-verify-button-border-color, $border-light) !default;
|
|
36
|
+
// 滑块图标尺寸
|
|
37
|
+
$slide-verify-success-icon-size: var(--wot-slide-verify-success-icon-size, $n-20) !default;
|
|
38
|
+
|
|
39
|
+
@include b(slide-verify) {
|
|
40
|
+
position: relative;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
user-select: none;
|
|
46
|
+
width: $slide-verify-width;
|
|
47
|
+
height: $slide-verify-height;
|
|
48
|
+
background: $slide-verify-bg;
|
|
49
|
+
border-radius: $slide-verify-radius;
|
|
50
|
+
|
|
51
|
+
@include when(disabled) {
|
|
52
|
+
cursor: not-allowed;
|
|
53
|
+
opacity: $slide-verify-disabled-opacity;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@include e(text-inner) {
|
|
57
|
+
color: $slide-verify-text-color;
|
|
58
|
+
font-size: $slide-verify-text-font-size;
|
|
59
|
+
line-height: $slide-verify-text-line-height;
|
|
60
|
+
transition: color 0.3s ease;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@include e(track) {
|
|
64
|
+
position: absolute;
|
|
65
|
+
left: 0;
|
|
66
|
+
top: 0;
|
|
67
|
+
width: 0;
|
|
68
|
+
height: 100%;
|
|
69
|
+
background: $slide-verify-track-bg;
|
|
70
|
+
border-radius: $slide-verify-radius;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@include e(track-text) {
|
|
75
|
+
position: absolute;
|
|
76
|
+
color: $slide-verify-success-text-color;
|
|
77
|
+
left: 0;
|
|
78
|
+
height: 100%;
|
|
79
|
+
min-width: 100%;
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
user-select: none;
|
|
84
|
+
pointer-events: none;
|
|
85
|
+
word-break: keep-all;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@include e(button) {
|
|
89
|
+
@include pixelBorderSurround($slide-verify-button-border-color);
|
|
90
|
+
position: absolute;
|
|
91
|
+
right: 0;
|
|
92
|
+
top: 0;
|
|
93
|
+
width: $slide-verify-button-size;
|
|
94
|
+
height: $slide-verify-button-size;
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
background: $slide-verify-button-bg;
|
|
99
|
+
box-shadow: $slide-verify-button-shadow;
|
|
100
|
+
color: $slide-verify-button-color;
|
|
101
|
+
border-radius: $slide-verify-radius;
|
|
102
|
+
cursor: grab;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// 按钮图标
|
|
106
|
+
@include edeep(button-icon) {
|
|
107
|
+
font-size: $slide-verify-success-icon-size;
|
|
108
|
+
@include m(success) {
|
|
109
|
+
color: $slide-verify-button-success-color;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { ComponentPublicInstance, ExtractPropTypes } from 'vue'
|
|
2
|
+
import { baseProps, makeBooleanProp, makeStringProp, numericProp } from '../../common/props'
|
|
3
|
+
|
|
4
|
+
export const slideVerifyProps = {
|
|
5
|
+
...baseProps,
|
|
6
|
+
/**
|
|
7
|
+
* 容错范围(单位:px),距离终点多少距离内视为验证通过
|
|
8
|
+
* 类型: number
|
|
9
|
+
* 默认值: 10
|
|
10
|
+
*/
|
|
11
|
+
tolerance: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 10
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 提示文字
|
|
18
|
+
* 类型: string
|
|
19
|
+
* 默认值: ''
|
|
20
|
+
*/
|
|
21
|
+
text: makeStringProp(''),
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 验证成功提示文字
|
|
25
|
+
* 类型: string
|
|
26
|
+
* 默认值: ''
|
|
27
|
+
*/
|
|
28
|
+
successText: makeStringProp(''),
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 是否禁用
|
|
32
|
+
* 类型: boolean
|
|
33
|
+
* 默认值: false
|
|
34
|
+
*/
|
|
35
|
+
disabled: makeBooleanProp(false),
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 背景颜色
|
|
39
|
+
* 类型: string
|
|
40
|
+
*/
|
|
41
|
+
backgroundColor: String,
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 激活时的背景颜色
|
|
45
|
+
* 类型: string
|
|
46
|
+
*/
|
|
47
|
+
activeBackgroundColor: String,
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 滑块图标名称
|
|
51
|
+
* 类型: string
|
|
52
|
+
* 默认值: 'double-right'
|
|
53
|
+
*/
|
|
54
|
+
icon: makeStringProp('double-right'),
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 成功图标名称
|
|
58
|
+
* 类型: string
|
|
59
|
+
* 默认值: 'check-circle-fill'
|
|
60
|
+
*/
|
|
61
|
+
successIcon: makeStringProp('check-circle-fill'),
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 图标大小(单位:px)
|
|
65
|
+
* 类型: string | number
|
|
66
|
+
* 默认值: 20
|
|
67
|
+
*/
|
|
68
|
+
iconSize: numericProp,
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 成功图标大小(单位:px)
|
|
72
|
+
* 类型: string | number
|
|
73
|
+
* 默认值: 12
|
|
74
|
+
*/
|
|
75
|
+
successIconSize: numericProp
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type SlideVerifyProps = ExtractPropTypes<typeof slideVerifyProps>
|
|
79
|
+
|
|
80
|
+
export type SlideVerifyExpose = {
|
|
81
|
+
/**
|
|
82
|
+
* 初始化尺寸信息
|
|
83
|
+
*/
|
|
84
|
+
init: () => Promise<void>
|
|
85
|
+
/**
|
|
86
|
+
* 重置验证组件到初始状态
|
|
87
|
+
*/
|
|
88
|
+
reset: () => void
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type SlideVerifyEmits = {
|
|
92
|
+
/** 验证成功事件 */
|
|
93
|
+
success: []
|
|
94
|
+
/** 验证失败事件 */
|
|
95
|
+
fail: []
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type SlideVerifyInstance = ComponentPublicInstance<SlideVerifyProps, SlideVerifyExpose>
|