@tplc/wot 1.0.6 → 1.0.8
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/CHANGELOG.md +20 -0
- package/components/common/AbortablePromise.ts +3 -11
- package/components/common/abstracts/_config.scss +1 -1
- package/components/common/abstracts/_function.scss +26 -13
- package/components/common/abstracts/_mixin.scss +117 -71
- package/components/common/abstracts/variable.scss +325 -697
- package/components/common/base64.ts +1 -2
- package/components/common/canvasHelper.ts +1 -1
- package/components/common/interceptor.ts +43 -0
- package/components/common/props.ts +8 -8
- package/components/common/util.ts +145 -60
- package/components/composables/index.ts +11 -0
- package/components/composables/useChildren.ts +9 -18
- package/components/composables/useCountDown.ts +2 -2
- package/components/composables/useLockScroll.ts +1 -3
- package/components/composables/useParent.ts +4 -4
- package/components/composables/usePopover.ts +43 -60
- package/components/composables/useQueue.ts +2 -2
- package/components/composables/useTouch.ts +2 -3
- package/components/composables/useTranslate.ts +2 -13
- package/components/composables/useUpload.ts +389 -0
- package/components/wd-action-sheet/index.scss +22 -22
- package/components/wd-action-sheet/types.ts +11 -21
- package/components/wd-action-sheet/wd-action-sheet.vue +21 -40
- package/components/wd-backtop/index.scss +5 -5
- package/components/wd-backtop/types.ts +3 -15
- package/components/wd-backtop/wd-backtop.vue +12 -20
- package/components/wd-badge/index.scss +14 -10
- package/components/wd-badge/types.ts +6 -9
- package/components/wd-badge/wd-badge.vue +29 -37
- package/components/wd-button/index.scss +76 -80
- package/components/wd-button/types.ts +43 -13
- package/components/wd-button/wd-button.vue +41 -22
- package/components/wd-calendar/index.scss +58 -145
- package/components/wd-calendar/types.ts +23 -41
- package/components/wd-calendar/wd-calendar.vue +123 -130
- package/components/wd-calendar-view/month/index.scss +33 -65
- package/components/wd-calendar-view/month/month.vue +80 -113
- package/components/wd-calendar-view/month/types.ts +2 -1
- package/components/wd-calendar-view/monthPanel/index.scss +15 -15
- package/components/wd-calendar-view/monthPanel/month-panel.vue +64 -78
- package/components/wd-calendar-view/monthPanel/types.ts +58 -10
- package/components/wd-calendar-view/types.ts +12 -36
- package/components/wd-calendar-view/utils.ts +14 -36
- package/components/wd-calendar-view/wd-calendar-view.vue +7 -7
- package/components/wd-calendar-view/year/index.scss +18 -13
- package/components/wd-calendar-view/year/types.ts +2 -1
- package/components/wd-calendar-view/year/year.vue +25 -43
- package/components/wd-calendar-view/yearPanel/index.scss +4 -4
- package/components/wd-calendar-view/yearPanel/types.ts +2 -2
- package/components/wd-calendar-view/yearPanel/year-panel.vue +36 -41
- package/components/wd-card/index.scss +11 -10
- package/components/wd-card/types.ts +1 -1
- package/components/wd-card/wd-card.vue +6 -9
- package/components/wd-cell/index.scss +56 -41
- package/components/wd-cell/types.ts +23 -8
- package/components/wd-cell/wd-cell.vue +48 -18
- package/components/wd-cell-group/index.scss +8 -7
- package/components/wd-cell-group/types.ts +1 -1
- package/components/wd-cell-group/wd-cell-group.vue +5 -5
- package/components/wd-checkbox/index.scss +35 -35
- package/components/wd-checkbox/types.ts +6 -6
- package/components/wd-checkbox/wd-checkbox.vue +12 -20
- package/components/wd-checkbox-group/index.scss +4 -4
- package/components/wd-checkbox-group/types.ts +2 -2
- package/components/wd-checkbox-group/wd-checkbox-group.vue +9 -12
- package/components/wd-circle/index.scss +5 -5
- package/components/wd-circle/types.ts +2 -2
- package/components/wd-circle/wd-circle.vue +18 -40
- package/components/wd-col/index.scss +2 -2
- package/components/wd-col/types.ts +1 -1
- package/components/wd-col/wd-col.vue +11 -53
- package/components/wd-col-picker/index.scss +41 -115
- package/components/wd-col-picker/types.ts +10 -14
- package/components/wd-col-picker/wd-col-picker.vue +103 -155
- package/components/wd-collapse/index.scss +7 -13
- package/components/wd-collapse/types.ts +4 -10
- package/components/wd-collapse/wd-collapse.vue +22 -55
- package/components/wd-collapse-item/index.scss +16 -5
- package/components/wd-collapse-item/types.ts +14 -2
- package/components/wd-collapse-item/wd-collapse-item.vue +70 -81
- package/components/wd-config-provider/types.ts +69 -40
- package/components/wd-config-provider/wd-config-provider.vue +11 -11
- package/components/wd-count-down/index.scss +3 -2
- package/components/wd-count-down/types.ts +1 -1
- package/components/wd-count-down/wd-count-down.vue +5 -5
- package/components/wd-count-to/index.scss +2 -1
- package/components/wd-count-to/types.ts +10 -3
- package/components/wd-count-to/wd-count-to.vue +9 -18
- package/components/wd-curtain/index.scss +28 -23
- package/components/wd-curtain/types.ts +46 -9
- package/components/wd-curtain/wd-curtain.vue +45 -47
- package/components/wd-datetime-picker/index.scss +65 -145
- package/components/wd-datetime-picker/types.ts +41 -31
- package/components/wd-datetime-picker/wd-datetime-picker.vue +307 -333
- package/components/wd-datetime-picker-view/types.ts +29 -46
- package/components/wd-datetime-picker-view/util.ts +30 -0
- package/components/wd-datetime-picker-view/wd-datetime-picker-view.vue +104 -119
- package/components/wd-divider/index.scss +78 -10
- package/components/wd-divider/types.ts +26 -3
- package/components/wd-divider/wd-divider.vue +33 -10
- package/components/wd-drop-menu/index.scss +17 -45
- package/components/wd-drop-menu/types.ts +3 -3
- package/components/wd-drop-menu/wd-drop-menu.vue +61 -25
- package/components/wd-drop-menu-item/index.scss +15 -15
- package/components/wd-drop-menu-item/types.ts +18 -15
- package/components/wd-drop-menu-item/wd-drop-menu-item.vue +33 -54
- package/components/wd-fab/index.scss +13 -12
- package/components/wd-fab/types.ts +9 -4
- package/components/wd-fab/wd-fab.vue +70 -51
- package/components/wd-floating-panel/index.scss +64 -0
- package/components/wd-floating-panel/type.ts +32 -0
- package/components/wd-floating-panel/wd-floating-panel.vue +140 -0
- package/components/wd-form/types.ts +8 -16
- package/components/wd-form/wd-form.vue +67 -45
- package/components/wd-form-item/index.scss +3 -2
- package/components/wd-form-item/types.ts +2 -8
- package/components/wd-form-item/wd-form-item.vue +3 -3
- package/components/wd-grid/index.scss +2 -2
- package/components/wd-grid/types.ts +5 -0
- package/components/wd-grid/wd-grid.vue +11 -12
- package/components/wd-grid-item/index.scss +44 -33
- package/components/wd-grid-item/types.ts +7 -4
- package/components/wd-grid-item/wd-grid-item.vue +39 -44
- package/components/wd-icon/index.scss +311 -303
- package/components/wd-icon/types.ts +3 -3
- package/components/wd-icon/wd-icon.vue +6 -6
- package/components/wd-img/types.ts +1 -1
- package/components/wd-img/wd-img.vue +13 -3
- package/components/wd-img-cropper/index.scss +43 -39
- package/components/wd-img-cropper/types.ts +6 -8
- package/components/wd-img-cropper/wd-img-cropper.vue +132 -127
- package/components/wd-index-anchor/index.scss +7 -6
- package/components/wd-index-anchor/type.ts +2 -2
- package/components/wd-index-anchor/wd-index-anchor.vue +3 -9
- package/components/wd-index-bar/index.scss +5 -5
- package/components/wd-index-bar/type.ts +3 -2
- package/components/wd-index-bar/wd-index-bar.vue +15 -51
- package/components/wd-input/index.scss +44 -33
- package/components/wd-input/types.ts +40 -19
- package/components/wd-input/wd-input.vue +58 -42
- package/components/wd-input-number/index.scss +23 -31
- package/components/wd-input-number/types.ts +42 -14
- package/components/wd-input-number/wd-input-number.vue +374 -141
- package/components/wd-keyboard/constants.ts +81 -0
- package/components/wd-keyboard/index.scss +102 -0
- package/components/wd-keyboard/key/index.scss +79 -0
- package/components/wd-keyboard/key/index.vue +71 -0
- package/components/wd-keyboard/key/types.ts +11 -0
- package/components/wd-keyboard/types.ts +92 -0
- package/components/wd-keyboard/wd-keyboard.vue +206 -0
- package/components/wd-loading/index.scss +9 -6
- package/components/wd-loading/types.ts +1 -1
- package/components/wd-loading/wd-loading.vue +9 -9
- package/components/wd-loadmore/index.scss +5 -5
- package/components/wd-loadmore/types.ts +8 -2
- package/components/wd-loadmore/wd-loadmore.vue +28 -13
- package/components/wd-message-box/index.scss +21 -34
- package/components/wd-message-box/index.ts +30 -29
- package/components/wd-message-box/types.ts +33 -8
- package/components/wd-message-box/wd-message-box.vue +130 -152
- package/components/wd-navbar/index.scss +14 -24
- package/components/wd-navbar/types.ts +1 -1
- package/components/wd-navbar/wd-navbar.vue +14 -45
- package/components/wd-navbar-capsule/index.scss +16 -15
- package/components/wd-navbar-capsule/types.ts +8 -0
- package/components/wd-navbar-capsule/wd-navbar-capsule.vue +8 -4
- package/components/wd-notice-bar/index.scss +15 -33
- package/components/wd-notice-bar/types.ts +14 -3
- package/components/wd-notice-bar/wd-notice-bar.vue +109 -66
- package/components/wd-notify/index.scss +5 -5
- package/components/wd-notify/index.ts +17 -15
- package/components/wd-notify/types.ts +4 -0
- package/components/wd-notify/wd-notify.vue +21 -19
- package/components/wd-number-keyboard/index.scss +10 -10
- package/components/wd-number-keyboard/key/index.scss +7 -5
- package/components/wd-number-keyboard/key/index.vue +6 -9
- package/components/wd-number-keyboard/key/types.ts +1 -1
- package/components/wd-number-keyboard/types.ts +4 -0
- package/components/wd-number-keyboard/wd-number-keyboard.vue +22 -44
- package/components/wd-overlay/index.scss +3 -3
- package/components/wd-overlay/types.ts +2 -2
- package/components/wd-overlay/wd-overlay.vue +7 -15
- package/components/wd-pagination/index.scss +17 -17
- package/components/wd-pagination/types.ts +1 -1
- package/components/wd-pagination/wd-pagination.vue +10 -21
- package/components/wd-password-input/index.scss +7 -6
- package/components/wd-password-input/types.ts +2 -8
- package/components/wd-password-input/wd-password-input.vue +6 -15
- package/components/wd-picker/index.scss +46 -153
- package/components/wd-picker/types.ts +22 -19
- package/components/wd-picker/wd-picker.vue +89 -86
- package/components/wd-picker-view/index.scss +13 -12
- package/components/wd-picker-view/types.ts +16 -26
- package/components/wd-picker-view/wd-picker-view.vue +32 -24
- package/components/wd-popover/index.scss +29 -36
- package/components/wd-popover/types.ts +1 -1
- package/components/wd-popover/wd-popover.vue +20 -56
- package/components/wd-popup/index.scss +47 -75
- package/components/wd-popup/types.ts +40 -4
- package/components/wd-popup/wd-popup.vue +100 -157
- package/components/wd-progress/index.scss +20 -14
- package/components/wd-progress/types.ts +10 -6
- package/components/wd-progress/wd-progress.vue +137 -141
- package/components/wd-radio/index.scss +54 -53
- package/components/wd-radio/types.ts +15 -6
- package/components/wd-radio/wd-radio.vue +41 -59
- package/components/wd-radio-group/index.scss +5 -5
- package/components/wd-radio-group/types.ts +4 -1
- package/components/wd-radio-group/wd-radio-group.vue +6 -9
- package/components/wd-rate/index.scss +1 -1
- package/components/wd-rate/types.ts +10 -5
- package/components/wd-rate/wd-rate.vue +35 -17
- package/components/wd-resize/index.scss +2 -1
- package/components/wd-resize/types.ts +1 -1
- package/components/wd-resize/wd-resize.vue +11 -22
- package/components/wd-root-portal/wd-root-portal.vue +50 -0
- package/components/wd-row/index.scss +1 -1
- package/components/wd-row/types.ts +1 -1
- package/components/wd-row/wd-row.vue +14 -35
- package/components/wd-search/index.scss +29 -29
- package/components/wd-search/types.ts +22 -3
- package/components/wd-search/wd-search.vue +70 -120
- package/components/wd-segmented/index.scss +19 -15
- package/components/wd-segmented/types.ts +16 -4
- package/components/wd-segmented/wd-segmented.vue +34 -34
- package/components/wd-select-picker/index.scss +55 -122
- package/components/wd-select-picker/types.ts +29 -36
- package/components/wd-select-picker/wd-select-picker.vue +128 -274
- package/components/wd-sidebar/index.scss +5 -5
- package/components/wd-sidebar/types.ts +22 -3
- package/components/wd-sidebar/wd-sidebar.vue +26 -4
- package/components/wd-sidebar-item/index.scss +17 -13
- package/components/wd-sidebar-item/types.ts +3 -3
- package/components/wd-sidebar-item/wd-sidebar-item.vue +12 -10
- package/components/wd-signature/index.scss +31 -0
- package/components/wd-signature/types.ts +263 -0
- package/components/wd-signature/wd-signature.vue +630 -0
- package/components/wd-skeleton/index.scss +8 -13
- package/components/wd-skeleton/types.ts +6 -6
- package/components/wd-skeleton/wd-skeleton.vue +15 -31
- package/components/wd-slider/index.scss +24 -17
- package/components/wd-slider/types.ts +45 -17
- package/components/wd-slider/wd-slider.vue +275 -297
- package/components/wd-sort-button/index.scss +10 -7
- package/components/wd-sort-button/types.ts +1 -1
- package/components/wd-sort-button/wd-sort-button.vue +7 -14
- package/components/wd-status-tip/index.scss +8 -8
- package/components/wd-status-tip/types.ts +8 -2
- package/components/wd-status-tip/wd-status-tip.vue +14 -37
- package/components/wd-step/index.scss +29 -30
- package/components/wd-step/types.ts +1 -1
- package/components/wd-step/wd-step.vue +8 -9
- package/components/wd-steps/index.scss +1 -1
- package/components/wd-steps/types.ts +1 -1
- package/components/wd-steps/wd-steps.vue +5 -5
- package/components/wd-sticky/index.scss +1 -1
- package/components/wd-sticky/types.ts +1 -1
- package/components/wd-sticky/wd-sticky.vue +21 -29
- package/components/wd-sticky-box/index.scss +1 -1
- package/components/wd-sticky-box/wd-sticky-box.vue +7 -6
- package/components/wd-swipe-action/index.scss +1 -1
- package/components/wd-swipe-action/types.ts +2 -5
- package/components/wd-swipe-action/wd-swipe-action.vue +9 -22
- package/components/wd-swiper-nav/index.scss +22 -16
- package/components/wd-swiper-nav/types.ts +1 -9
- package/components/wd-swiper-nav/wd-swiper-nav.vue +2 -5
- package/components/wd-switch/index.scss +15 -15
- package/components/wd-switch/types.ts +8 -6
- package/components/wd-switch/wd-switch.vue +15 -15
- package/components/wd-tab/index.scss +11 -3
- package/components/wd-tab/types.ts +11 -1
- package/components/wd-tab/wd-tab.vue +28 -36
- package/components/wd-tabbar/index.scss +12 -7
- package/components/wd-tabbar/types.ts +3 -18
- package/components/wd-tabbar/wd-tabbar.vue +10 -23
- package/components/wd-tabbar-item/index.scss +15 -12
- package/components/wd-tabbar-item/types.ts +3 -3
- package/components/wd-tabbar-item/wd-tabbar-item.vue +11 -13
- package/components/wd-table/index.scss +40 -9
- package/components/wd-table/types.ts +13 -15
- package/components/wd-table/wd-table.vue +123 -94
- package/components/wd-table-col/index.scss +6 -4
- package/components/wd-table-col/types.ts +1 -1
- package/components/wd-table-col/wd-table-col.vue +12 -12
- package/components/wd-tag/index.scss +19 -19
- package/components/wd-tag/types.ts +1 -1
- package/components/wd-tag/wd-tag.vue +14 -20
- package/components/wd-text/index.scss +4 -1
- package/components/wd-text/types.ts +4 -4
- package/components/wd-text/wd-text.vue +12 -11
- package/components/wd-textarea/index.scss +51 -41
- package/components/wd-textarea/types.ts +24 -34
- package/components/wd-textarea/wd-textarea.vue +59 -66
- package/components/wd-toast/index.scss +31 -18
- package/components/wd-toast/index.ts +26 -43
- package/components/wd-toast/types.ts +117 -3
- package/components/wd-toast/wd-toast.vue +49 -69
- package/components/wd-tooltip/index.scss +21 -16
- package/components/wd-tooltip/types.ts +8 -3
- package/components/wd-tooltip/wd-tooltip.vue +17 -43
- package/components/wd-tour/index.scss +123 -0
- package/components/wd-tour/types.ts +153 -0
- package/components/wd-tour/wd-tour.vue +509 -0
- package/components/wd-transition/index.scss +39 -35
- package/components/wd-transition/types.ts +27 -9
- package/components/wd-transition/wd-transition.vue +45 -34
- package/components/wd-upload/index.scss +23 -21
- package/components/wd-upload/types.ts +43 -30
- package/components/wd-upload/wd-upload.vue +183 -247
- package/components/wd-video-preview/index.scss +9 -9
- package/components/wd-video-preview/types.ts +1 -1
- package/components/wd-video-preview/wd-video-preview.vue +18 -22
- package/components/wd-watermark/index.scss +7 -7
- package/components/wd-watermark/types.ts +2 -8
- package/components/wd-watermark/wd-watermark.vue +38 -135
- package/dayjs/constant.js +26 -0
- package/dayjs/index.d.ts +430 -0
- package/dayjs/index.js +542 -0
- package/dayjs/locale/en.js +13 -0
- package/dayjs/utils.js +59 -0
- package/global.d.ts +97 -91
- package/index.ts +2 -10
- package/locale/index.ts +3 -15
- package/locale/lang/ar-SA.ts +133 -0
- package/locale/lang/de-DE.ts +133 -0
- package/locale/lang/en-US.ts +31 -26
- package/locale/lang/es-ES.ts +133 -0
- package/locale/lang/fr-FR.ts +133 -0
- package/locale/lang/ja-JP.ts +133 -0
- package/locale/lang/ko-KR.ts +133 -0
- package/locale/lang/pt-PT.ts +133 -0
- package/locale/lang/ru-RU.ts +133 -0
- package/locale/lang/th-TH.ts +28 -22
- package/locale/lang/tr-TR.ts +138 -0
- package/locale/lang/ug-CN.ts +137 -0
- package/locale/lang/vi-VN.ts +27 -30
- package/locale/lang/zh-CN.ts +32 -22
- package/locale/lang/zh-HK.ts +18 -31
- package/locale/lang/zh-TW.ts +22 -31
- package/package.json +1 -1
- package/types/components/common/interceptor.d.ts +15 -0
- package/types/components/common/util.d.ts +61 -1
- package/types/components/composables/useCell.d.ts +1 -1
- package/types/components/composables/useLockScroll.d.ts +1 -2
- package/types/components/composables/useParent.d.ts +1 -1
- package/types/components/composables/usePopover.d.ts +2 -2
- package/types/components/composables/useUpload.d.ts +41 -0
- package/types/components/wd-action-sheet/types.d.ts +13 -4
- package/types/components/wd-action-sheet/wd-action-sheet.vue.d.ts +20 -11
- package/types/components/wd-backtop/types.d.ts +1 -9
- package/types/components/wd-backtop/wd-backtop.vue.d.ts +6 -25
- package/types/components/wd-badge/types.d.ts +3 -6
- package/types/components/wd-badge/wd-badge.vue.d.ts +7 -14
- package/types/components/wd-button/types.d.ts +44 -8
- package/types/components/wd-button/wd-button.vue.d.ts +13 -9
- package/types/components/wd-calendar/types.d.ts +24 -18
- package/types/components/wd-calendar/wd-calendar.vue.d.ts +48 -32
- package/types/components/wd-calendar-view/month/month.vue.d.ts +11 -3
- package/types/components/wd-calendar-view/month/types.d.ts +4 -0
- package/types/components/wd-calendar-view/monthPanel/month-panel.vue.d.ts +18 -12
- package/types/components/wd-calendar-view/monthPanel/types.d.ts +48 -6
- package/types/components/wd-calendar-view/types.d.ts +11 -4
- package/types/components/wd-calendar-view/utils.d.ts +3 -12
- package/types/components/wd-calendar-view/wd-calendar-view.vue.d.ts +1 -1
- package/types/components/wd-calendar-view/year/types.d.ts +4 -0
- package/types/components/wd-calendar-view/year/year.vue.d.ts +11 -3
- package/types/components/wd-cell/types.d.ts +37 -1
- package/types/components/wd-cell/wd-cell.vue.d.ts +53 -9
- package/types/components/wd-checkbox/wd-checkbox.vue.d.ts +2 -2
- package/types/components/wd-checkbox-group/wd-checkbox-group.vue.d.ts +2 -2
- package/types/components/wd-circle/wd-circle.vue.d.ts +3 -3
- package/types/components/wd-col-picker/types.d.ts +14 -0
- package/types/components/wd-col-picker/wd-col-picker.vue.d.ts +36 -19
- package/types/components/wd-collapse/types.d.ts +1 -5
- package/types/components/wd-collapse/wd-collapse.vue.d.ts +3 -11
- package/types/components/wd-collapse-item/types.d.ts +19 -1
- package/types/components/wd-collapse-item/wd-collapse-item.vue.d.ts +20 -1
- package/types/components/wd-config-provider/types.d.ts +64 -7
- package/types/components/wd-config-provider/wd-config-provider.vue.d.ts +1 -1
- package/types/components/wd-count-to/types.d.ts +11 -0
- package/types/components/wd-count-to/wd-count-to.vue.d.ts +13 -4
- package/types/components/wd-curtain/types.d.ts +56 -0
- package/types/components/wd-curtain/wd-curtain.vue.d.ts +152 -77
- package/types/components/wd-datetime-picker/types.d.ts +49 -15
- package/types/components/wd-datetime-picker/wd-datetime-picker.vue.d.ts +75 -38
- package/types/components/wd-datetime-picker-view/types.d.ts +36 -14
- package/types/components/wd-datetime-picker-view/util.d.ts +12 -0
- package/types/components/wd-datetime-picker-view/wd-datetime-picker-view.vue.d.ts +35 -9
- package/types/components/wd-divider/types.d.ts +32 -4
- package/types/components/wd-divider/wd-divider.vue.d.ts +30 -7
- package/types/components/wd-drop-menu/types.d.ts +3 -3
- package/types/components/wd-drop-menu/wd-drop-menu.vue.d.ts +8 -8
- package/types/components/wd-drop-menu-item/types.d.ts +27 -15
- package/types/components/wd-drop-menu-item/wd-drop-menu-item.vue.d.ts +47 -36
- package/types/components/wd-fab/types.d.ts +19 -3
- package/types/components/wd-fab/wd-fab.vue.d.ts +13 -1
- package/types/components/wd-floating-panel/type.d.ts +54 -0
- package/types/components/wd-floating-panel/wd-floating-panel.vue.d.ts +109 -0
- package/types/components/wd-form/types.d.ts +1 -1
- package/types/components/wd-form/wd-form.vue.d.ts +2 -2
- package/types/components/wd-form-item/wd-form-item.vue.d.ts +2 -2
- package/types/components/wd-grid/types.d.ts +5 -0
- package/types/components/wd-grid/wd-grid.vue.d.ts +2 -0
- package/types/components/wd-grid-item/types.d.ts +4 -1
- package/types/components/wd-grid-item/wd-grid-item.vue.d.ts +3 -3
- package/types/components/wd-icon/types.d.ts +1 -1
- package/types/components/wd-icon/wd-icon.vue.d.ts +3 -3
- package/types/components/wd-img/types.d.ts +4 -1
- package/types/components/wd-img/wd-img.vue.d.ts +11 -4
- package/types/components/wd-img-cropper/types.d.ts +7 -0
- package/types/components/wd-img-cropper/wd-img-cropper.vue.d.ts +12 -3
- package/types/components/wd-index-bar/type.d.ts +2 -1
- package/types/components/wd-index-bar/wd-index-bar.vue.d.ts +1 -5
- package/types/components/wd-input/types.d.ts +53 -37
- package/types/components/wd-input/wd-input.vue.d.ts +50 -52
- package/types/components/wd-input-number/types.d.ts +51 -6
- package/types/components/wd-input-number/wd-input-number.vue.d.ts +152 -125
- package/types/components/wd-keyboard/constants.d.ts +8 -0
- package/types/components/wd-keyboard/key/index.vue.d.ts +70 -0
- package/types/components/wd-keyboard/key/types.d.ts +23 -0
- package/types/components/wd-keyboard/types.d.ts +137 -0
- package/types/components/wd-keyboard/wd-keyboard.vue.d.ts +200 -0
- package/types/components/wd-loading/wd-loading.vue.d.ts +2 -2
- package/types/components/wd-loadmore/types.d.ts +7 -4
- package/types/components/wd-loadmore/wd-loadmore.vue.d.ts +5 -9
- package/types/components/wd-message-box/index.d.ts +3 -8
- package/types/components/wd-message-box/types.d.ts +36 -5
- package/types/components/wd-message-box/wd-message-box.vue.d.ts +18 -2
- package/types/components/wd-navbar/wd-navbar.vue.d.ts +3 -3
- package/types/components/wd-navbar-capsule/types.d.ts +12 -0
- package/types/components/wd-navbar-capsule/wd-navbar-capsule.vue.d.ts +27 -4
- package/types/components/wd-notice-bar/types.d.ts +9 -1
- package/types/components/wd-notice-bar/wd-notice-bar.vue.d.ts +7 -5
- package/types/components/wd-notify/types.d.ts +7 -0
- package/types/components/wd-notify/wd-notify.vue.d.ts +13 -4
- package/types/components/wd-number-keyboard/types.d.ts +7 -0
- package/types/components/wd-number-keyboard/wd-number-keyboard.vue.d.ts +18 -9
- package/types/components/wd-overlay/wd-overlay.vue.d.ts +2 -2
- package/types/components/wd-pagination/wd-pagination.vue.d.ts +1 -1
- package/types/components/wd-password-input/wd-password-input.vue.d.ts +2 -2
- package/types/components/wd-picker/types.d.ts +28 -2
- package/types/components/wd-picker/wd-picker.vue.d.ts +55 -19
- package/types/components/wd-picker-view/types.d.ts +10 -0
- package/types/components/wd-picker-view/wd-picker-view.vue.d.ts +15 -3
- package/types/components/wd-popover/wd-popover.vue.d.ts +4 -4
- package/types/components/wd-popup/types.d.ts +44 -5
- package/types/components/wd-popup/wd-popup.vue.d.ts +35 -24
- package/types/components/wd-progress/types.d.ts +6 -3
- package/types/components/wd-progress/wd-progress.vue.d.ts +4 -6
- package/types/components/wd-qr-code/uqrcode.vue.d.ts +3 -3
- package/types/components/wd-qr-code/wd-qr-code.vue.d.ts +4 -4
- package/types/components/wd-radio/types.d.ts +8 -0
- package/types/components/wd-radio/wd-radio.vue.d.ts +7 -0
- package/types/components/wd-radio-group/types.d.ts +7 -1
- package/types/components/wd-radio-group/wd-radio-group.vue.d.ts +11 -2
- package/types/components/wd-rate/types.d.ts +9 -0
- package/types/components/wd-rate/wd-rate.vue.d.ts +13 -4
- package/types/components/wd-root-portal/wd-root-portal.vue.d.ts +26 -0
- package/types/components/wd-search/types.d.ts +16 -1
- package/types/components/wd-search/wd-search.vue.d.ts +28 -8
- package/types/components/wd-segmented/types.d.ts +10 -1
- package/types/components/wd-segmented/wd-segmented.vue.d.ts +6 -4
- package/types/components/wd-select-picker/types.d.ts +37 -22
- package/types/components/wd-select-picker/wd-select-picker.vue.d.ts +59 -30
- package/types/components/wd-sidebar/types.d.ts +19 -3
- package/types/components/wd-sidebar/wd-sidebar.vue.d.ts +4 -2
- package/types/components/wd-signature/types.d.ts +252 -0
- package/types/components/wd-signature/wd-signature.vue.d.ts +229 -0
- package/types/components/wd-skeleton/types.d.ts +3 -4
- package/types/components/wd-skeleton/wd-skeleton.vue.d.ts +10 -10
- package/types/components/wd-slider/types.d.ts +39 -15
- package/types/components/wd-slider/wd-slider.vue.d.ts +12 -38
- package/types/components/wd-sort-button/wd-sort-button.vue.d.ts +3 -3
- package/types/components/wd-status-tip/types.d.ts +9 -0
- package/types/components/wd-status-tip/wd-status-tip.vue.d.ts +69 -49
- package/types/components/wd-steps/wd-steps.vue.d.ts +1 -1
- package/types/components/wd-sticky/wd-sticky.vue.d.ts +3 -7
- package/types/components/wd-swipe-action/wd-swipe-action.vue.d.ts +3 -3
- package/types/components/wd-swiper/wd-swiper.vue.d.ts +4 -4
- package/types/components/wd-swiper-nav/types.d.ts +0 -14
- package/types/components/wd-swiper-nav/wd-swiper-nav.vue.d.ts +0 -18
- package/types/components/wd-switch/types.d.ts +0 -1
- package/types/components/wd-switch/wd-switch.vue.d.ts +2 -5
- package/types/components/wd-tab/types.d.ts +16 -3
- package/types/components/wd-tab/wd-tab.vue.d.ts +12 -4
- package/types/components/wd-tabbar/types.d.ts +1 -1
- package/types/components/wd-tabbar/wd-tabbar.vue.d.ts +5 -5
- package/types/components/wd-tabbar-item/wd-tabbar-item.vue.d.ts +1 -1
- package/types/components/wd-table/types.d.ts +12 -8
- package/types/components/wd-table/wd-table.vue.d.ts +16 -13
- package/types/components/wd-table-col/wd-table-col.vue.d.ts +1 -1
- package/types/components/wd-tabs/wd-tabs.vue.d.ts +7 -7
- package/types/components/wd-tag/wd-tag.vue.d.ts +4 -4
- package/types/components/wd-text/types.d.ts +2 -2
- package/types/components/wd-text/wd-text.vue.d.ts +7 -7
- package/types/components/wd-textarea/types.d.ts +41 -39
- package/types/components/wd-textarea/wd-textarea.vue.d.ts +46 -46
- package/types/components/wd-toast/index.d.ts +1 -6
- package/types/components/wd-toast/types.d.ts +127 -5
- package/types/components/wd-toast/wd-toast.vue.d.ts +101 -0
- package/types/components/wd-tooltip/types.d.ts +1 -1
- package/types/components/wd-tooltip/wd-tooltip.vue.d.ts +7 -7
- package/types/components/wd-tour/types.d.ts +194 -0
- package/types/components/wd-tour/wd-tour.vue.d.ts +267 -0
- package/types/components/wd-transition/types.d.ts +22 -7
- package/types/components/wd-transition/wd-transition.vue.d.ts +33 -20
- package/types/components/wd-upload/types.d.ts +39 -10
- package/types/components/wd-upload/wd-upload.vue.d.ts +42 -16
- package/types/components/wd-watermark/wd-watermark.vue.d.ts +7 -7
- package/types/locale/index.d.ts +0 -3
- package/types/locale/lang/zh-CN.d.ts +9 -0
- package/components/wd-datetime-picker-view/index.scss +0 -0
- package/components/wd-form/index.scss +0 -10
- package/components/wd-upload/utils.ts +0 -152
- package/types/components/common/dayjs.d.ts +0 -26
- package/types/components/wd-upload/utils.d.ts +0 -11
- package/types/locale/lang/en-US.d.ts +0 -128
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
@include b(collapse-item) {
|
|
6
6
|
@include halfPixelBorder('top', 0, $-dark-border-color);
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
@include e(title) {
|
|
9
10
|
color: $-dark-color;
|
|
10
11
|
}
|
|
@@ -24,24 +25,34 @@
|
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
|
|
28
|
+
|
|
27
29
|
@include b(collapse-item) {
|
|
28
30
|
position: relative;
|
|
29
31
|
@include halfPixelBorder('top');
|
|
30
32
|
|
|
33
|
+
|
|
31
34
|
@include e(header) {
|
|
32
35
|
position: relative;
|
|
33
36
|
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
37
|
justify-content: space-between;
|
|
38
|
+
align-items: center;
|
|
36
39
|
padding: $-collapse-header-padding;
|
|
37
40
|
overflow: hidden;
|
|
38
41
|
user-select: none;
|
|
42
|
+
|
|
43
|
+
@include when(expanded) {
|
|
44
|
+
@include halfPixelBorder('bottom');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@include when(custom) {
|
|
48
|
+
display: block;
|
|
49
|
+
}
|
|
39
50
|
}
|
|
40
51
|
|
|
41
52
|
@include e(title) {
|
|
42
|
-
font-size: $-collapse-title-fs;
|
|
43
|
-
font-weight: $-fw-medium;
|
|
44
53
|
color: $-collapse-title-color;
|
|
54
|
+
font-weight: $-fw-medium;
|
|
55
|
+
font-size: $-collapse-title-fs;
|
|
45
56
|
}
|
|
46
57
|
|
|
47
58
|
@include edeep(arrow) {
|
|
@@ -62,10 +73,10 @@
|
|
|
62
73
|
}
|
|
63
74
|
|
|
64
75
|
@include e(body) {
|
|
65
|
-
|
|
76
|
+
color: $-collapse-body-color;
|
|
66
77
|
font-size: $-collapse-body-fs;
|
|
78
|
+
padding: $-collapse-body-padding;
|
|
67
79
|
line-height: 1.43;
|
|
68
|
-
color: $-collapse-body-color;
|
|
69
80
|
}
|
|
70
81
|
|
|
71
82
|
@include when(disabled) {
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue'
|
|
2
2
|
import { baseProps, makeBooleanProp, makeRequiredProp, makeStringProp } from '../common/props'
|
|
3
3
|
|
|
4
|
-
export type CollapseItemBeforeExpand = (name: string) =>
|
|
4
|
+
export type CollapseItemBeforeExpand = (name: string) => boolean | Promise<unknown>
|
|
5
5
|
|
|
6
6
|
export const collapseItemProps = {
|
|
7
7
|
...baseProps,
|
|
8
|
+
/**
|
|
9
|
+
* 自定义折叠栏内容容器样式类名
|
|
10
|
+
*/
|
|
11
|
+
customBodyClass: makeStringProp(''),
|
|
12
|
+
/**
|
|
13
|
+
* 自定义折叠栏内容容器样式
|
|
14
|
+
*/
|
|
15
|
+
customBodyStyle: makeStringProp(''),
|
|
8
16
|
/**
|
|
9
17
|
* 折叠栏的标题, 可通过 slot 传递自定义内容
|
|
10
18
|
*/
|
|
@@ -20,7 +28,7 @@ export const collapseItemProps = {
|
|
|
20
28
|
/**
|
|
21
29
|
* 打开前的回调函数,返回 false 可以阻止打开,支持返回 Promise
|
|
22
30
|
*/
|
|
23
|
-
beforeExpend: Function as PropType<CollapseItemBeforeExpand
|
|
31
|
+
beforeExpend: Function as PropType<CollapseItemBeforeExpand>
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
export type CollapseItemProps = ExtractPropTypes<typeof collapseItemProps>
|
|
@@ -31,6 +39,10 @@ export type CollapseItemExpose = {
|
|
|
31
39
|
* @returns boolean
|
|
32
40
|
*/
|
|
33
41
|
getExpanded: () => boolean
|
|
42
|
+
/**
|
|
43
|
+
* 更新展开状态
|
|
44
|
+
*/
|
|
45
|
+
updateExpand: () => Promise<void>
|
|
34
46
|
}
|
|
35
47
|
|
|
36
48
|
export type CollapseItemInstance = ComponentPublicInstance<CollapseItemProps, CollapseItemExpose>
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view
|
|
3
|
-
:class="`wd-collapse-item ${disabled ? 'is-disabled' : ''} is-border ${customClass}`"
|
|
4
|
-
:style="customStyle"
|
|
5
|
-
>
|
|
2
|
+
<view :class="`wd-collapse-item ${disabled ? 'is-disabled' : ''} is-border ${customClass}`" :style="customStyle">
|
|
6
3
|
<view
|
|
7
|
-
:class="`wd-collapse-item__header
|
|
4
|
+
:class="`wd-collapse-item__header ${expanded ? 'is-expanded' : ''} ${isFirst ? 'wd-collapse-item__header-first' : ''} ${
|
|
5
|
+
$slots.title ? 'is-custom' : ''
|
|
6
|
+
}`"
|
|
8
7
|
@click="handleClick"
|
|
9
8
|
>
|
|
10
9
|
<slot name="title" :expanded="expanded" :disabled="disabled" :isFirst="isFirst">
|
|
11
10
|
<text class="wd-collapse-item__title">{{ title }}</text>
|
|
12
|
-
<wd-icon
|
|
13
|
-
name="arrow-down"
|
|
14
|
-
:custom-class="`wd-collapse-item__arrow ${expanded ? 'is-retract' : ''}`"
|
|
15
|
-
/>
|
|
11
|
+
<wd-icon name="arrow-down" :custom-class="`wd-collapse-item__arrow ${expanded ? 'is-retract' : ''}`" />
|
|
16
12
|
</slot>
|
|
17
13
|
</view>
|
|
18
|
-
<view
|
|
19
|
-
class="wd-collapse-
|
|
20
|
-
:style="contentStyle"
|
|
21
|
-
@transitionend="handleTransitionEnd"
|
|
22
|
-
>
|
|
23
|
-
<view class="wd-collapse-item__body" :id="collapseId">
|
|
14
|
+
<view class="wd-collapse-item__wrapper" :style="contentStyle" @transitionend="handleTransitionEnd">
|
|
15
|
+
<view class="wd-collapse-item__body" :class="customBodyClass" :style="customBodyStyle" :id="collapseId">
|
|
24
16
|
<slot />
|
|
25
17
|
</view>
|
|
26
18
|
</view>
|
|
@@ -32,23 +24,15 @@ export default {
|
|
|
32
24
|
options: {
|
|
33
25
|
addGlobalClass: true,
|
|
34
26
|
virtualHost: true,
|
|
35
|
-
styleIsolation: 'shared'
|
|
36
|
-
}
|
|
27
|
+
styleIsolation: 'shared'
|
|
28
|
+
}
|
|
37
29
|
}
|
|
38
30
|
</script>
|
|
39
31
|
|
|
40
32
|
<script lang="ts" setup>
|
|
33
|
+
import wdIcon from '../wd-icon/wd-icon.vue'
|
|
41
34
|
import { computed, getCurrentInstance, onMounted, ref, watch, type CSSProperties } from 'vue'
|
|
42
|
-
import {
|
|
43
|
-
addUnit,
|
|
44
|
-
getRect,
|
|
45
|
-
isArray,
|
|
46
|
-
isDef,
|
|
47
|
-
isPromise,
|
|
48
|
-
objToStyle,
|
|
49
|
-
requestAnimationFrame,
|
|
50
|
-
uuid,
|
|
51
|
-
} from '../common/util'
|
|
35
|
+
import { addUnit, getRect, isArray, isDef, isPromise, isString, objToStyle, pause, uuid } from '../common/util'
|
|
52
36
|
import { useParent } from '../composables/useParent'
|
|
53
37
|
import { COLLAPSE_KEY } from '../wd-collapse/types'
|
|
54
38
|
import { collapseItemProps, type CollapseItemExpose } from './types'
|
|
@@ -87,54 +71,50 @@ const contentStyle = computed(() => {
|
|
|
87
71
|
return objToStyle(style)
|
|
88
72
|
})
|
|
89
73
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
74
|
+
/**
|
|
75
|
+
* 是否选中
|
|
76
|
+
*/
|
|
77
|
+
const isSelected = computed(() => {
|
|
78
|
+
const modelValue = collapse ? collapse?.props.modelValue || [] : []
|
|
79
|
+
const { name } = props
|
|
80
|
+
return (isString(modelValue) && modelValue === name) || (isArray(modelValue) && modelValue.indexOf(name as string) >= 0)
|
|
96
81
|
})
|
|
97
82
|
|
|
98
83
|
watch(
|
|
99
|
-
() =>
|
|
100
|
-
() => {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
updateExpend()
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
deep: true,
|
|
108
|
-
immediate: true,
|
|
109
|
-
},
|
|
84
|
+
() => isSelected.value,
|
|
85
|
+
(newVal) => {
|
|
86
|
+
updateExpand(newVal)
|
|
87
|
+
}
|
|
110
88
|
)
|
|
111
89
|
|
|
112
90
|
onMounted(() => {
|
|
113
|
-
|
|
91
|
+
updateExpand(isSelected.value)
|
|
114
92
|
})
|
|
115
93
|
|
|
116
|
-
function
|
|
117
|
-
|
|
94
|
+
async function updateExpand(useBeforeExpand: boolean = true) {
|
|
95
|
+
try {
|
|
96
|
+
if (useBeforeExpand) {
|
|
97
|
+
await handleBeforeExpand()
|
|
98
|
+
}
|
|
99
|
+
initRect()
|
|
100
|
+
} catch (error) {
|
|
101
|
+
/* empty */
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function initRect() {
|
|
106
|
+
getRect(`#${collapseId.value}`, false, proxy).then(async (rect) => {
|
|
118
107
|
const { height: rectHeight } = rect
|
|
119
108
|
height.value = isDef(rectHeight) ? Number(rectHeight) : ''
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
expanded.value = false
|
|
130
|
-
}
|
|
131
|
-
} else {
|
|
132
|
-
expanded.value = false
|
|
133
|
-
}
|
|
134
|
-
if (!inited.value) {
|
|
135
|
-
inited.value = true
|
|
136
|
-
}
|
|
137
|
-
})
|
|
109
|
+
await pause()
|
|
110
|
+
if (isSelected.value) {
|
|
111
|
+
expanded.value = true
|
|
112
|
+
} else {
|
|
113
|
+
expanded.value = false
|
|
114
|
+
}
|
|
115
|
+
if (!inited.value) {
|
|
116
|
+
inited.value = true
|
|
117
|
+
}
|
|
138
118
|
})
|
|
139
119
|
}
|
|
140
120
|
|
|
@@ -145,36 +125,45 @@ function handleTransitionEnd() {
|
|
|
145
125
|
}
|
|
146
126
|
|
|
147
127
|
// 点击子项
|
|
148
|
-
function handleClick() {
|
|
128
|
+
async function handleClick() {
|
|
149
129
|
if (props.disabled) return
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
130
|
+
try {
|
|
131
|
+
await updateExpand()
|
|
132
|
+
const { name } = props
|
|
133
|
+
collapse && collapse.toggle(name, !expanded.value)
|
|
134
|
+
} catch (error) {
|
|
135
|
+
/* empty */
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* 展开前钩子
|
|
141
|
+
*/
|
|
142
|
+
function handleBeforeExpand() {
|
|
143
|
+
return new Promise<void>((resolve, reject) => {
|
|
144
|
+
const { name } = props
|
|
145
|
+
const nextexpanded = !expanded.value
|
|
146
|
+
if (nextexpanded && props.beforeExpend) {
|
|
147
|
+
const response = props.beforeExpend(name)
|
|
155
148
|
if (!response) {
|
|
156
|
-
|
|
149
|
+
reject()
|
|
157
150
|
}
|
|
158
151
|
if (isPromise(response)) {
|
|
159
|
-
response.then(() =>
|
|
160
|
-
collapse && collapse.toggle(name, !expanded.value)
|
|
161
|
-
})
|
|
152
|
+
response.then(() => resolve()).catch(reject)
|
|
162
153
|
} else {
|
|
163
|
-
|
|
154
|
+
resolve()
|
|
164
155
|
}
|
|
165
156
|
} else {
|
|
166
|
-
|
|
157
|
+
resolve()
|
|
167
158
|
}
|
|
168
|
-
}
|
|
169
|
-
collapse && collapse.toggle(name, !expanded.value)
|
|
170
|
-
}
|
|
159
|
+
})
|
|
171
160
|
}
|
|
172
161
|
|
|
173
162
|
function getExpanded() {
|
|
174
163
|
return expanded.value
|
|
175
164
|
}
|
|
176
165
|
|
|
177
|
-
defineExpose<CollapseItemExpose>({ getExpanded })
|
|
166
|
+
defineExpose<CollapseItemExpose>({ getExpanded, updateExpand })
|
|
178
167
|
</script>
|
|
179
168
|
|
|
180
169
|
<style lang="scss" scoped>
|
|
@@ -14,8 +14,8 @@ export const configProviderProps = {
|
|
|
14
14
|
*/
|
|
15
15
|
themeVars: {
|
|
16
16
|
type: Object as PropType<ConfigProviderThemeVars>,
|
|
17
|
-
default: () => ({})
|
|
18
|
-
}
|
|
17
|
+
default: () => ({})
|
|
18
|
+
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export type ConfigProviderProps = ExtractPropTypes<typeof configProviderProps>
|
|
@@ -125,74 +125,55 @@ export type badgeThemeVars = {
|
|
|
125
125
|
|
|
126
126
|
export type buttonThemeVars = {
|
|
127
127
|
buttonDisabledOpacity?: string
|
|
128
|
-
|
|
129
128
|
buttonSmallHeight?: string
|
|
130
129
|
buttonSmallPadding?: string
|
|
131
130
|
buttonSmallFs?: string
|
|
132
131
|
buttonSmallRadius?: string
|
|
133
132
|
buttonSmallLoading?: string
|
|
134
|
-
|
|
135
133
|
buttonMediumHeight?: string
|
|
136
134
|
buttonMediumPadding?: string
|
|
137
135
|
buttonMediumFs?: string
|
|
138
136
|
buttonMediumRadius?: string
|
|
139
137
|
buttonMediumLoading?: string
|
|
140
138
|
buttonMediumBoxShadowSize?: string
|
|
141
|
-
|
|
142
139
|
buttonLargeHeight?: string
|
|
143
140
|
buttonLargePadding?: string
|
|
144
141
|
buttonLargeFs?: string
|
|
145
142
|
buttonLargeRadius?: string
|
|
146
143
|
buttonLargeLoading?: string
|
|
147
144
|
buttonLargeBoxShadowSize?: string
|
|
148
|
-
|
|
149
145
|
buttonIconFs?: string
|
|
150
146
|
buttonIconSize?: string
|
|
151
147
|
buttonIconColor?: string
|
|
152
148
|
buttonIconDisabledColor?: string
|
|
153
|
-
|
|
154
149
|
buttonNormalColor?: string
|
|
155
150
|
buttonNormalDisabledColor?: string
|
|
156
|
-
|
|
157
151
|
buttonPlainBgColor?: string
|
|
158
|
-
|
|
159
152
|
buttonPrimaryColor?: string
|
|
160
153
|
buttonPrimaryBgColor?: string
|
|
161
|
-
buttonPrimaryBoxShadowColor?: string
|
|
162
|
-
|
|
163
154
|
buttonSuccessColor?: string
|
|
164
155
|
buttonSuccessBgColor?: string
|
|
165
|
-
buttonSuccessBoxShadowColor?: string
|
|
166
|
-
|
|
167
156
|
buttonInfoColor?: string
|
|
168
157
|
buttonInfoBgColor?: string
|
|
169
158
|
buttonInfoPlainBorderColor?: string
|
|
170
159
|
buttonInfoPlainNormalColor?: string
|
|
171
|
-
|
|
172
160
|
buttonWarningColor?: string
|
|
173
161
|
buttonWarningBgColor?: string
|
|
174
|
-
buttonWarningBoxShadowColor?: string
|
|
175
|
-
|
|
176
162
|
buttonErrorColor?: string
|
|
177
163
|
buttonErrorBgColor?: string
|
|
178
|
-
buttonErrorBoxShadowColor?: string
|
|
179
|
-
|
|
180
164
|
buttonTextHoverOpacity?: string
|
|
181
165
|
}
|
|
182
166
|
|
|
183
167
|
export type cellThemeVars = {
|
|
184
168
|
cellPadding?: string
|
|
185
169
|
cellLineHeight?: string
|
|
186
|
-
|
|
187
170
|
cellGroupTitleFs?: string
|
|
188
171
|
cellGroupPadding?: string
|
|
189
172
|
cellGroupTitleColor?: string
|
|
190
173
|
cellGroupValueFs?: string
|
|
191
174
|
cellGroupValueColor?: string
|
|
192
|
-
|
|
193
175
|
cellWrapperPadding?: string
|
|
194
176
|
cellWrapperPaddingLarge?: string
|
|
195
|
-
|
|
196
177
|
cellWrapperPaddingWithLabel?: string
|
|
197
178
|
cellIconRight?: string
|
|
198
179
|
cellIconSize?: string
|
|
@@ -201,17 +182,18 @@ export type cellThemeVars = {
|
|
|
201
182
|
cellLabelFs?: string
|
|
202
183
|
cellLabelColor?: string
|
|
203
184
|
cellValueFs?: string
|
|
185
|
+
cellValueFsLarge?: string
|
|
204
186
|
cellValueColor?: string
|
|
205
187
|
cellArrowSize?: string
|
|
206
188
|
cellArrowColor?: string
|
|
189
|
+
cellClearColor?: string
|
|
207
190
|
cellTapBg?: string
|
|
208
|
-
|
|
209
191
|
cellTitleFsLarge?: string
|
|
210
192
|
cellLabelFsLarge?: string
|
|
211
193
|
cellIconSizeLarge?: string
|
|
212
|
-
|
|
213
194
|
cellRequiredColor?: string
|
|
214
195
|
cellRequiredSize?: string
|
|
196
|
+
cellRequiredMargin?: string
|
|
215
197
|
cellVerticalTop?: string
|
|
216
198
|
}
|
|
217
199
|
|
|
@@ -229,10 +211,12 @@ export type calendarThemeVars = {
|
|
|
229
211
|
calendarDayHeight?: string
|
|
230
212
|
calendarMonthWidth?: string
|
|
231
213
|
calendarActiveColor?: string
|
|
214
|
+
calendarSelectedColor?: string
|
|
232
215
|
calendarDisabledColor?: string
|
|
233
216
|
calendarRangeColor?: string
|
|
234
217
|
calendarActiveBorder?: string
|
|
235
218
|
calendarInfoFs?: string
|
|
219
|
+
calendarItemMarginBottom?: string
|
|
236
220
|
}
|
|
237
221
|
|
|
238
222
|
export type checkboxThemeVars = {
|
|
@@ -246,16 +230,13 @@ export type checkboxThemeVars = {
|
|
|
246
230
|
checkboxLabelFs?: string
|
|
247
231
|
checkboxLabelColor?: string
|
|
248
232
|
checkboxCheckedColor?: string
|
|
249
|
-
|
|
250
233
|
checkboxDisabledColor?: string
|
|
251
234
|
checkboxDisabledLabelColor?: string
|
|
252
235
|
checkboxDisabledCheckColor?: string
|
|
253
236
|
checkboxDisabledCheckBg?: string
|
|
254
237
|
checkboxSquareRadius?: string
|
|
255
|
-
|
|
256
238
|
checkboxLargeSize?: string
|
|
257
239
|
checkboxLargeLabelFs?: string
|
|
258
|
-
|
|
259
240
|
checkboxButtonHeight?: string
|
|
260
241
|
checkboxButtonMinWidth?: string
|
|
261
242
|
checkboxButtonRadius?: string
|
|
@@ -282,9 +263,18 @@ export type collapseThemeVars = {
|
|
|
282
263
|
|
|
283
264
|
export type dividerThemeVars = {
|
|
284
265
|
dividerPadding?: string
|
|
266
|
+
dividerMargin?: string
|
|
285
267
|
dividerColor?: string
|
|
286
268
|
dividerLineColor?: string
|
|
269
|
+
dividerLineHeight?: string
|
|
287
270
|
dividerFs?: string
|
|
271
|
+
dividerContentLeftWidth?: string
|
|
272
|
+
dividerContentLeftMargin?: string
|
|
273
|
+
dividerContentRightMargin?: string
|
|
274
|
+
dividerContentRightWidth?: string
|
|
275
|
+
dividerVerticalHeight?: string
|
|
276
|
+
dividerVerticalContentMargin?: string
|
|
277
|
+
dividerVerticalLineWidth?: string
|
|
288
278
|
}
|
|
289
279
|
|
|
290
280
|
export type dropMenuThemeVars = {
|
|
@@ -292,7 +282,6 @@ export type dropMenuThemeVars = {
|
|
|
292
282
|
dropMenuColor?: string
|
|
293
283
|
dropMenuFs?: string
|
|
294
284
|
dropMenuArrowFs?: string
|
|
295
|
-
|
|
296
285
|
dropMenuSidePadding?: string
|
|
297
286
|
dropMenuDisabledColor?: string
|
|
298
287
|
dropMenuItemHeight?: string
|
|
@@ -335,7 +324,6 @@ export type inputThemeVars = {
|
|
|
335
324
|
inputCountColor?: string
|
|
336
325
|
inputCountCurrentColor?: string
|
|
337
326
|
inputBg?: string
|
|
338
|
-
|
|
339
327
|
inputCellBg?: string
|
|
340
328
|
inputCellBorderColor?: string
|
|
341
329
|
inputCellPadding?: string
|
|
@@ -447,16 +435,13 @@ export type pickerThemeVars = {
|
|
|
447
435
|
pickerColumnSelectBg?: string
|
|
448
436
|
pickerLoadingButtonColor?: string
|
|
449
437
|
pickerColumnPadding?: string
|
|
450
|
-
|
|
451
438
|
pickerColumnDisabledColor?: string
|
|
452
439
|
pickerMask?: string
|
|
453
440
|
pickerLoadingBg?: string
|
|
454
441
|
pickerRegionSeparatorColor?: string
|
|
455
442
|
pickerCellArrowSizeLarge?: string
|
|
456
|
-
|
|
457
443
|
pickerRegionColor?: string
|
|
458
444
|
pickerRegionBgActiveColor?: string
|
|
459
|
-
|
|
460
445
|
pickerRegionFs?: string
|
|
461
446
|
}
|
|
462
447
|
|
|
@@ -497,9 +482,8 @@ export type progressThemeVars = {
|
|
|
497
482
|
progressBg?: string
|
|
498
483
|
progressDangerColor?: string
|
|
499
484
|
progressSuccessColor?: string
|
|
485
|
+
progressWarningColor?: string
|
|
500
486
|
progressColor?: string
|
|
501
|
-
progressLinearSuccessColor?: string
|
|
502
|
-
progressLinearDangerColor?: string
|
|
503
487
|
progressHeight?: string
|
|
504
488
|
progressLabelColor?: string
|
|
505
489
|
progressLabelFs?: string
|
|
@@ -516,10 +500,8 @@ export type radioThemeVars = {
|
|
|
516
500
|
radioCheckedColor?: string
|
|
517
501
|
radioDisabledColor?: string
|
|
518
502
|
radioDisabledLabelColor?: string
|
|
519
|
-
|
|
520
503
|
radioLargeSize?: string
|
|
521
504
|
radioLargeLabelFs?: string
|
|
522
|
-
|
|
523
505
|
radioButtonHeight?: string
|
|
524
506
|
radioButtonMinWidth?: string
|
|
525
507
|
radioButtonMaxWidth?: string
|
|
@@ -528,7 +510,6 @@ export type radioThemeVars = {
|
|
|
528
510
|
radioButtonFs?: string
|
|
529
511
|
radioButtonBorder?: string
|
|
530
512
|
radioButtonDisabledBorder?: string
|
|
531
|
-
|
|
532
513
|
radioDotSize?: string
|
|
533
514
|
radioDotLargeSize?: string
|
|
534
515
|
radioDotCheckedBg?: string
|
|
@@ -650,15 +631,19 @@ export type tagThemeVars = {
|
|
|
650
631
|
}
|
|
651
632
|
|
|
652
633
|
export type toastThemeVars = {
|
|
634
|
+
toastColor?: string
|
|
653
635
|
toastPadding?: string
|
|
654
636
|
toastMaxWidth?: string
|
|
655
637
|
toastRadius?: string
|
|
656
638
|
toastBg?: string
|
|
657
639
|
toastFs?: string
|
|
640
|
+
toastLineHeight?: string
|
|
658
641
|
toastWithIconMinWidth?: string
|
|
659
642
|
toastIconSize?: string
|
|
660
643
|
toastIconMarginRight?: string
|
|
644
|
+
toastIconMarginBottom?: string
|
|
661
645
|
toastLoadingPadding?: string
|
|
646
|
+
toastLoadingMarginBottom?: string
|
|
662
647
|
toastBoxShadow?: string
|
|
663
648
|
}
|
|
664
649
|
|
|
@@ -698,6 +683,8 @@ export type gridItemThemeVars = {
|
|
|
698
683
|
gridItemBg?: string
|
|
699
684
|
gridItemPadding?: string
|
|
700
685
|
gridItemBorderColor?: string
|
|
686
|
+
gridItemHoverBg?: string
|
|
687
|
+
gridItemHoverBgDark?: string
|
|
701
688
|
}
|
|
702
689
|
|
|
703
690
|
export type statustipThemeVars = {
|
|
@@ -783,20 +770,19 @@ export type circleThemeVars = {
|
|
|
783
770
|
export type swiperThemeVars = {
|
|
784
771
|
swiperRadius?: string
|
|
785
772
|
swiperItemPadding?: string
|
|
773
|
+
swiperItemTextColor?: string
|
|
774
|
+
swiperItemTextFs?: string
|
|
786
775
|
}
|
|
787
776
|
|
|
788
777
|
export type swiperNavThemeVars = {
|
|
789
|
-
// dot & dots-bar
|
|
790
778
|
swiperNavDotColor?: string
|
|
791
779
|
swiperNavDotActiveColor?: string
|
|
792
780
|
swiperNavDotSize?: string
|
|
793
781
|
swiperNavDotsBarActiveWidth?: string
|
|
794
|
-
// fraction
|
|
795
782
|
swiperNavFractionColor?: string
|
|
796
783
|
swiperNavFractionBgColor?: string
|
|
797
784
|
swiperNavFractionHeight?: string
|
|
798
785
|
swiperNavFractionFontSize?: string
|
|
799
|
-
// button
|
|
800
786
|
swiperNavBtnColor?: string
|
|
801
787
|
swiperNavBtnBgColor?: string
|
|
802
788
|
swiperNavBtnSize?: string
|
|
@@ -886,6 +872,26 @@ export type countDownThemeVars = {
|
|
|
886
872
|
countDownLineHeight?: string
|
|
887
873
|
}
|
|
888
874
|
|
|
875
|
+
export type keyboardThemeVars = {
|
|
876
|
+
keyboardKeyHeight?: string
|
|
877
|
+
keyboardKeyFontSize?: string
|
|
878
|
+
keyboardKeyBackground?: string
|
|
879
|
+
keyboardKeyBorderRadius?: string
|
|
880
|
+
keyboardDeleteFontSize?: string
|
|
881
|
+
keyboardKeyActiveColor?: string
|
|
882
|
+
keyboardButtonTextColor?: string
|
|
883
|
+
keyboardButtonBackground?: string
|
|
884
|
+
keyboardButtonActiveOpacity?: string
|
|
885
|
+
keyboardBackground?: string
|
|
886
|
+
keyboardTitleHeight?: string
|
|
887
|
+
keyboardTitleColor?: string
|
|
888
|
+
keyboardTitleFontSize?: string
|
|
889
|
+
keyboardClosePadding?: string
|
|
890
|
+
keyboardCloseColor?: string
|
|
891
|
+
keyboardCloseFontSize?: string
|
|
892
|
+
keyboardIconSize?: string
|
|
893
|
+
}
|
|
894
|
+
|
|
889
895
|
export type numberKeyboardThemeVars = {
|
|
890
896
|
numberKeyboardKeyHeight?: string
|
|
891
897
|
numberKeyboardKeyFontSize?: string
|
|
@@ -959,6 +965,26 @@ export type imgCropperThemeVars = {
|
|
|
959
965
|
imgCropperIconColor?: string
|
|
960
966
|
}
|
|
961
967
|
|
|
968
|
+
export type floatingPanelThemeVars = {
|
|
969
|
+
floatingPanelBg?: string
|
|
970
|
+
floatingPanelRadius?: string
|
|
971
|
+
floatingPanelZIndex?: string
|
|
972
|
+
floatingPanelHeaderHeight?: string
|
|
973
|
+
floatingPanelBarWidth?: string
|
|
974
|
+
floatingPanelBarHeight?: string
|
|
975
|
+
floatingPanelBarBg?: string
|
|
976
|
+
floatingPanelBarRadius?: string
|
|
977
|
+
floatingPanelContentBg?: string
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export type signatureThemeVars = {
|
|
981
|
+
signatureBg?: string
|
|
982
|
+
signatureRadius?: string
|
|
983
|
+
signatureBorder?: string
|
|
984
|
+
signatureFooterMarginTop?: string
|
|
985
|
+
signatureButtonMarginLeft?: string
|
|
986
|
+
}
|
|
987
|
+
|
|
962
988
|
export type ConfigProviderThemeVars = baseThemeVars &
|
|
963
989
|
actionSheetThemeVars &
|
|
964
990
|
badgeThemeVars &
|
|
@@ -1013,6 +1039,7 @@ export type ConfigProviderThemeVars = baseThemeVars &
|
|
|
1013
1039
|
sidebarItemThemeVars &
|
|
1014
1040
|
fabThemeVars &
|
|
1015
1041
|
countDownThemeVars &
|
|
1042
|
+
keyboardThemeVars &
|
|
1016
1043
|
numberKeyboardThemeVars &
|
|
1017
1044
|
passwodInputThemeVars &
|
|
1018
1045
|
formItemThemeVars &
|
|
@@ -1020,4 +1047,6 @@ export type ConfigProviderThemeVars = baseThemeVars &
|
|
|
1020
1047
|
indexBarThemeVars &
|
|
1021
1048
|
textThemeVars &
|
|
1022
1049
|
videoPreviewThemeVars &
|
|
1023
|
-
imgCropperThemeVars
|
|
1050
|
+
imgCropperThemeVars &
|
|
1051
|
+
floatingPanelThemeVars &
|
|
1052
|
+
signatureThemeVars
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: weisheng
|
|
3
3
|
* @Date: 2023-06-13 11:34:35
|
|
4
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditTime: 2025-04-28 22:26:25
|
|
5
5
|
* @LastEditors: weisheng
|
|
6
6
|
* @Description:
|
|
7
|
-
* @FilePath:
|
|
7
|
+
* @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-config-provider/wd-config-provider.vue
|
|
8
8
|
* 记得注释
|
|
9
9
|
-->
|
|
10
10
|
<template>
|
|
@@ -19,8 +19,8 @@ export default {
|
|
|
19
19
|
options: {
|
|
20
20
|
virtualHost: true,
|
|
21
21
|
addGlobalClass: true,
|
|
22
|
-
styleIsolation: 'shared'
|
|
23
|
-
}
|
|
22
|
+
styleIsolation: 'shared'
|
|
23
|
+
}
|
|
24
24
|
}
|
|
25
25
|
</script>
|
|
26
26
|
|
|
@@ -37,7 +37,7 @@ const themeClass = computed(() => {
|
|
|
37
37
|
|
|
38
38
|
const themeStyle = computed(() => {
|
|
39
39
|
const styleObj = mapThemeVarsToCSSVars(props.themeVars)
|
|
40
|
-
return styleObj ? `${objToStyle(styleObj)}
|
|
40
|
+
return styleObj ? `${objToStyle(styleObj)}${props.customStyle}` : props.customStyle
|
|
41
41
|
})
|
|
42
42
|
|
|
43
43
|
const kebabCase = (str: string): string => {
|
|
@@ -46,20 +46,20 @@ const kebabCase = (str: string): string => {
|
|
|
46
46
|
}
|
|
47
47
|
const colorRgb = (str: string) => {
|
|
48
48
|
if (!str) return
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
var sColor = str.toLowerCase()
|
|
50
|
+
//十六进制颜色值的正则表达式
|
|
51
|
+
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/
|
|
52
52
|
// 如果是16进制颜色
|
|
53
53
|
if (sColor && reg.test(sColor)) {
|
|
54
54
|
if (sColor.length === 4) {
|
|
55
|
-
|
|
55
|
+
var sColorNew = '#'
|
|
56
56
|
for (let i = 1; i < 4; i += 1) {
|
|
57
57
|
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1))
|
|
58
58
|
}
|
|
59
59
|
sColor = sColorNew
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
//处理六位的颜色值
|
|
62
|
+
var sColorChange: number[] = []
|
|
63
63
|
for (let i = 1; i < 7; i += 2) {
|
|
64
64
|
sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2)))
|
|
65
65
|
}
|