@tplc/wot 0.0.1
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/components/common/AbortablePromise.ts +36 -0
- package/components/common/abstracts/_config.scss +7 -0
- package/components/common/abstracts/_function.scss +76 -0
- package/components/common/abstracts/_mixin.scss +339 -0
- package/components/common/abstracts/variable.scss +1346 -0
- package/components/common/base64.ts +30 -0
- package/components/common/canvasHelper.ts +49 -0
- package/components/common/clickoutside.ts +34 -0
- package/components/common/dayjs.ts +157 -0
- package/components/common/event.ts +8 -0
- package/components/common/props.ts +51 -0
- package/components/common/util.ts +751 -0
- package/components/composables/useCell.ts +13 -0
- package/components/composables/useChildren.ts +122 -0
- package/components/composables/useCountDown.ts +138 -0
- package/components/composables/useLockScroll.ts +39 -0
- package/components/composables/useParent.ts +41 -0
- package/components/composables/usePopover.ts +193 -0
- package/components/composables/useQueue.ts +52 -0
- package/components/composables/useRaf.ts +37 -0
- package/components/composables/useTouch.ts +44 -0
- package/components/composables/useTranslate.ts +22 -0
- package/components/wd-action-sheet/index.scss +204 -0
- package/components/wd-action-sheet/types.ts +128 -0
- package/components/wd-action-sheet/wd-action-sheet.vue +174 -0
- package/components/wd-backtop/index.scss +25 -0
- package/components/wd-backtop/types.ts +37 -0
- package/components/wd-backtop/wd-backtop.vue +48 -0
- package/components/wd-badge/index.scss +59 -0
- package/components/wd-badge/types.ts +53 -0
- package/components/wd-badge/wd-badge.vue +69 -0
- package/components/wd-button/index.scss +340 -0
- package/components/wd-button/types.ts +112 -0
- package/components/wd-button/wd-button.vue +176 -0
- package/components/wd-calendar/index.scss +244 -0
- package/components/wd-calendar/types.ts +235 -0
- package/components/wd-calendar/wd-calendar.vue +456 -0
- package/components/wd-calendar-view/index.scss +9 -0
- package/components/wd-calendar-view/month/index.scss +151 -0
- package/components/wd-calendar-view/month/month.vue +391 -0
- package/components/wd-calendar-view/month/types.ts +19 -0
- package/components/wd-calendar-view/monthPanel/index.scss +89 -0
- package/components/wd-calendar-view/monthPanel/month-panel.vue +388 -0
- package/components/wd-calendar-view/monthPanel/types.ts +48 -0
- package/components/wd-calendar-view/types.ts +134 -0
- package/components/wd-calendar-view/utils.ts +451 -0
- package/components/wd-calendar-view/wd-calendar-view.vue +111 -0
- package/components/wd-calendar-view/year/index.scss +148 -0
- package/components/wd-calendar-view/year/types.ts +19 -0
- package/components/wd-calendar-view/year/year.vue +220 -0
- package/components/wd-calendar-view/yearPanel/index.scss +24 -0
- package/components/wd-calendar-view/yearPanel/types.ts +38 -0
- package/components/wd-calendar-view/yearPanel/year-panel.vue +140 -0
- package/components/wd-card/index.scss +70 -0
- package/components/wd-card/types.ts +30 -0
- package/components/wd-card/wd-card.vue +40 -0
- package/components/wd-cell/index.scss +189 -0
- package/components/wd-cell/types.ts +96 -0
- package/components/wd-cell/wd-cell.vue +135 -0
- package/components/wd-cell-group/index.scss +55 -0
- package/components/wd-cell-group/types.ts +41 -0
- package/components/wd-cell-group/wd-cell-group.vue +45 -0
- package/components/wd-checkbox/index.scss +285 -0
- package/components/wd-checkbox/types.ts +68 -0
- package/components/wd-checkbox/wd-checkbox.vue +185 -0
- package/components/wd-checkbox-group/index.scss +20 -0
- package/components/wd-checkbox-group/types.ts +59 -0
- package/components/wd-checkbox-group/wd-checkbox-group.vue +103 -0
- package/components/wd-circle/index.scss +18 -0
- package/components/wd-circle/types.ts +54 -0
- package/components/wd-circle/wd-circle.vue +318 -0
- package/components/wd-col/index.scss +19 -0
- package/components/wd-col/types.ts +15 -0
- package/components/wd-col/wd-col.vue +91 -0
- package/components/wd-col-picker/index.scss +241 -0
- package/components/wd-col-picker/types.ts +170 -0
- package/components/wd-col-picker/wd-col-picker.vue +550 -0
- package/components/wd-collapse/index.scss +55 -0
- package/components/wd-collapse/types.ts +63 -0
- package/components/wd-collapse/wd-collapse.vue +160 -0
- package/components/wd-collapse-item/index.scss +79 -0
- package/components/wd-collapse-item/types.ts +36 -0
- package/components/wd-collapse-item/wd-collapse-item.vue +182 -0
- package/components/wd-config-provider/types.ts +1023 -0
- package/components/wd-config-provider/wd-config-provider.vue +82 -0
- package/components/wd-count-down/index.scss +14 -0
- package/components/wd-count-down/types.ts +41 -0
- package/components/wd-count-down/utils.ts +52 -0
- package/components/wd-count-down/wd-count-down.vue +60 -0
- package/components/wd-count-to/index.scss +6 -0
- package/components/wd-count-to/types.ts +110 -0
- package/components/wd-count-to/wd-count-to.vue +134 -0
- package/components/wd-curtain/index.scss +80 -0
- package/components/wd-curtain/types.ts +45 -0
- package/components/wd-curtain/wd-curtain.vue +174 -0
- package/components/wd-datetime-picker/index.scss +243 -0
- package/components/wd-datetime-picker/types.ts +225 -0
- package/components/wd-datetime-picker/wd-datetime-picker.vue +827 -0
- package/components/wd-datetime-picker-view/index.scss +0 -0
- package/components/wd-datetime-picker-view/types.ts +137 -0
- package/components/wd-datetime-picker-view/wd-datetime-picker-view.vue +514 -0
- package/components/wd-divider/index.scss +32 -0
- package/components/wd-divider/types.ts +12 -0
- package/components/wd-divider/wd-divider.vue +29 -0
- package/components/wd-drop-menu/index.scss +89 -0
- package/components/wd-drop-menu/types.ts +38 -0
- package/components/wd-drop-menu/wd-drop-menu.vue +128 -0
- package/components/wd-drop-menu-item/index.scss +66 -0
- package/components/wd-drop-menu-item/types.ts +78 -0
- package/components/wd-drop-menu-item/wd-drop-menu-item.vue +230 -0
- package/components/wd-fab/index.scss +115 -0
- package/components/wd-fab/types.ts +61 -0
- package/components/wd-fab/wd-fab.vue +257 -0
- package/components/wd-form/index.scss +10 -0
- package/components/wd-form/types.ts +93 -0
- package/components/wd-form/wd-form.vue +185 -0
- package/components/wd-form-item/index.scss +17 -0
- package/components/wd-form-item/types.ts +22 -0
- package/components/wd-form-item/wd-form-item.vue +65 -0
- package/components/wd-gap/index.scss +9 -0
- package/components/wd-gap/types.ts +23 -0
- package/components/wd-gap/wd-gap.vue +39 -0
- package/components/wd-grid/index.scss +9 -0
- package/components/wd-grid/types.ts +54 -0
- package/components/wd-grid/wd-grid.vue +107 -0
- package/components/wd-grid-item/index.scss +137 -0
- package/components/wd-grid-item/types.ts +74 -0
- package/components/wd-grid-item/wd-grid-item.vue +181 -0
- package/components/wd-icon/index.scss +1222 -0
- package/components/wd-icon/types.ts +21 -0
- package/components/wd-icon/wd-icon.vue +53 -0
- package/components/wd-icon/wd-icons.ttf +0 -0
- package/components/wd-img/index.scss +19 -0
- package/components/wd-img/types.ts +53 -0
- package/components/wd-img/wd-img.vue +76 -0
- package/components/wd-img-cropper/index.scss +227 -0
- package/components/wd-img-cropper/types.ts +87 -0
- package/components/wd-img-cropper/wd-img-cropper.vue +659 -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 +57 -0
- package/components/wd-index-bar/index.scss +39 -0
- package/components/wd-index-bar/type.ts +28 -0
- package/components/wd-index-bar/wd-index-bar.vue +158 -0
- package/components/wd-input/index.scss +326 -0
- package/components/wd-input/types.ts +182 -0
- package/components/wd-input/wd-input.vue +327 -0
- package/components/wd-input-number/index.scss +132 -0
- package/components/wd-input-number/types.ts +78 -0
- package/components/wd-input-number/wd-input-number.vue +221 -0
- package/components/wd-loading/index.scss +34 -0
- package/components/wd-loading/types.ts +31 -0
- package/components/wd-loading/wd-loading.vue +90 -0
- package/components/wd-loadmore/index.scss +39 -0
- package/components/wd-loadmore/types.ts +24 -0
- package/components/wd-loadmore/wd-loadmore.vue +53 -0
- package/components/wd-message-box/index.scss +121 -0
- package/components/wd-message-box/index.ts +95 -0
- package/components/wd-message-box/types.ts +116 -0
- package/components/wd-message-box/wd-message-box.vue +326 -0
- package/components/wd-navbar/index.scss +103 -0
- package/components/wd-navbar/types.ts +52 -0
- package/components/wd-navbar/wd-navbar.vue +142 -0
- package/components/wd-navbar-capsule/index.scss +65 -0
- package/components/wd-navbar-capsule/types.ts +0 -0
- package/components/wd-navbar-capsule/wd-navbar-capsule.vue +31 -0
- package/components/wd-notice-bar/index.scss +86 -0
- package/components/wd-notice-bar/types.ts +56 -0
- package/components/wd-notice-bar/wd-notice-bar.vue +223 -0
- package/components/wd-notify/index.scss +34 -0
- package/components/wd-notify/index.ts +59 -0
- package/components/wd-notify/types.ts +62 -0
- package/components/wd-notify/wd-notify.vue +83 -0
- package/components/wd-number-keyboard/index.scss +78 -0
- package/components/wd-number-keyboard/key/index.scss +79 -0
- package/components/wd-number-keyboard/key/index.vue +76 -0
- package/components/wd-number-keyboard/key/types.ts +11 -0
- package/components/wd-number-keyboard/types.ts +79 -0
- package/components/wd-number-keyboard/wd-number-keyboard.vue +173 -0
- package/components/wd-overlay/index.scss +17 -0
- package/components/wd-overlay/types.ts +25 -0
- package/components/wd-overlay/wd-overlay.vue +46 -0
- package/components/wd-pagination/index.scss +57 -0
- package/components/wd-pagination/types.ts +41 -0
- package/components/wd-pagination/wd-pagination.vue +121 -0
- package/components/wd-password-input/index.scss +123 -0
- package/components/wd-password-input/types.ts +48 -0
- package/components/wd-password-input/wd-password-input.vue +58 -0
- package/components/wd-picker/index.scss +216 -0
- package/components/wd-picker/types.ts +186 -0
- package/components/wd-picker/wd-picker.vue +409 -0
- package/components/wd-picker-view/index.scss +91 -0
- package/components/wd-picker-view/types.ts +162 -0
- package/components/wd-picker-view/wd-picker-view.vue +361 -0
- package/components/wd-popover/index.scss +123 -0
- package/components/wd-popover/types.ts +69 -0
- package/components/wd-popover/wd-popover.vue +216 -0
- package/components/wd-popup/index.scss +112 -0
- package/components/wd-popup/types.ts +68 -0
- package/components/wd-popup/wd-popup.vue +227 -0
- package/components/wd-progress/index.scss +62 -0
- package/components/wd-progress/types.ts +40 -0
- package/components/wd-progress/wd-progress.vue +201 -0
- package/components/wd-radio/index.scss +300 -0
- package/components/wd-radio/types.ts +42 -0
- package/components/wd-radio/wd-radio.vue +136 -0
- package/components/wd-radio-group/index.scss +23 -0
- package/components/wd-radio-group/types.ts +36 -0
- package/components/wd-radio-group/wd-radio-group.vue +54 -0
- package/components/wd-rate/index.scss +24 -0
- package/components/wd-rate/types.ts +91 -0
- package/components/wd-rate/wd-rate.vue +131 -0
- package/components/wd-resize/index.scss +26 -0
- package/components/wd-resize/types.ts +6 -0
- package/components/wd-resize/wd-resize.vue +155 -0
- package/components/wd-row/index.scss +10 -0
- package/components/wd-row/types.ts +16 -0
- package/components/wd-row/wd-row.vue +63 -0
- package/components/wd-search/index.scss +148 -0
- package/components/wd-search/types.ts +83 -0
- package/components/wd-search/wd-search.vue +237 -0
- package/components/wd-segmented/index.scss +97 -0
- package/components/wd-segmented/types.ts +68 -0
- package/components/wd-segmented/wd-segmented.vue +143 -0
- package/components/wd-select-picker/index.scss +177 -0
- package/components/wd-select-picker/types.ts +116 -0
- package/components/wd-select-picker/wd-select-picker.vue +486 -0
- package/components/wd-sidebar/index.scss +25 -0
- package/components/wd-sidebar/types.ts +28 -0
- package/components/wd-sidebar/wd-sidebar.vue +41 -0
- package/components/wd-sidebar-item/index.scss +93 -0
- package/components/wd-sidebar-item/types.ts +31 -0
- package/components/wd-sidebar-item/wd-sidebar-item.vue +114 -0
- package/components/wd-skeleton/index.scss +101 -0
- package/components/wd-skeleton/index.ts +1 -0
- package/components/wd-skeleton/types.ts +69 -0
- package/components/wd-skeleton/wd-skeleton.vue +135 -0
- package/components/wd-slider/index.scss +91 -0
- package/components/wd-slider/types.ts +104 -0
- package/components/wd-slider/wd-slider.vue +377 -0
- package/components/wd-sort-button/index.scss +86 -0
- package/components/wd-sort-button/types.ts +43 -0
- package/components/wd-sort-button/wd-sort-button.vue +76 -0
- package/components/wd-status-tip/index.scss +37 -0
- package/components/wd-status-tip/types.ts +59 -0
- package/components/wd-status-tip/wd-status-tip.vue +94 -0
- package/components/wd-step/index.scss +236 -0
- package/components/wd-step/types.ts +33 -0
- package/components/wd-step/wd-step.vue +151 -0
- package/components/wd-steps/index.scss +10 -0
- package/components/wd-steps/types.ts +59 -0
- package/components/wd-steps/wd-steps.vue +37 -0
- package/components/wd-sticky/index.scss +9 -0
- package/components/wd-sticky/types.ts +13 -0
- package/components/wd-sticky/wd-sticky.vue +190 -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 +154 -0
- package/components/wd-swipe-action/index.scss +22 -0
- package/components/wd-swipe-action/types.ts +43 -0
- package/components/wd-swipe-action/wd-swipe-action.vue +307 -0
- package/components/wd-swiper/index.scss +23 -0
- package/components/wd-swiper/types.ts +189 -0
- package/components/wd-swiper/wd-swiper.vue +202 -0
- package/components/wd-swiper-nav/index.scss +153 -0
- package/components/wd-swiper-nav/types.ts +42 -0
- package/components/wd-swiper-nav/wd-swiper-nav.vue +37 -0
- package/components/wd-switch/index.scss +58 -0
- package/components/wd-switch/types.ts +56 -0
- package/components/wd-switch/wd-switch.vue +83 -0
- package/components/wd-tab/index.scss +8 -0
- package/components/wd-tab/types.ts +20 -0
- package/components/wd-tab/wd-tab.vue +100 -0
- package/components/wd-tabbar/index.scss +57 -0
- package/components/wd-tabbar/types.ts +88 -0
- package/components/wd-tabbar/wd-tabbar.vue +104 -0
- package/components/wd-tabbar-item/index.scss +52 -0
- package/components/wd-tabbar-item/types.ts +51 -0
- package/components/wd-tabbar-item/wd-tabbar-item.vue +101 -0
- package/components/wd-table/index.scss +132 -0
- package/components/wd-table/types.ts +69 -0
- package/components/wd-table/wd-table.vue +255 -0
- package/components/wd-table-col/index.scss +44 -0
- package/components/wd-table-col/types.ts +54 -0
- package/components/wd-table-col/wd-table-col.vue +149 -0
- package/components/wd-tabs/index.scss +280 -0
- package/components/wd-tabs/types.ts +71 -0
- package/components/wd-tabs/wd-tabs.vue +528 -0
- package/components/wd-tag/index.scss +115 -0
- package/components/wd-tag/types.ts +81 -0
- package/components/wd-tag/wd-tag.vue +154 -0
- package/components/wd-text/index.scss +34 -0
- package/components/wd-text/types.ts +98 -0
- package/components/wd-text/wd-text.vue +138 -0
- package/components/wd-textarea/index.scss +343 -0
- package/components/wd-textarea/types.ts +298 -0
- package/components/wd-textarea/wd-textarea.vue +303 -0
- package/components/wd-toast/index.scss +66 -0
- package/components/wd-toast/index.ts +109 -0
- package/components/wd-toast/types.ts +76 -0
- package/components/wd-toast/wd-toast.vue +212 -0
- package/components/wd-tooltip/index.scss +61 -0
- package/components/wd-tooltip/types.ts +102 -0
- package/components/wd-tooltip/wd-tooltip.vue +167 -0
- package/components/wd-transition/index.scss +91 -0
- package/components/wd-transition/types.ts +89 -0
- package/components/wd-transition/wd-transition.vue +221 -0
- package/components/wd-upload/index.scss +173 -0
- package/components/wd-upload/types.ts +378 -0
- package/components/wd-upload/utils.ts +152 -0
- package/components/wd-upload/wd-upload.vue +737 -0
- package/components/wd-video-preview/index.scss +34 -0
- package/components/wd-video-preview/types.ts +32 -0
- package/components/wd-video-preview/wd-video-preview.vue +76 -0
- package/components/wd-watermark/index.scss +18 -0
- package/components/wd-watermark/types.ts +82 -0
- package/components/wd-watermark/wd-watermark.vue +592 -0
- package/components/wot-design-uni/wot-design-uni.vue +14 -0
- package/global.d.ts +108 -0
- package/index.ts +30 -0
- package/locale/index.ts +41 -0
- package/locale/lang/en-US.ts +128 -0
- package/locale/lang/th-TH.ts +127 -0
- package/locale/lang/vi-VN.ts +89 -0
- package/locale/lang/zh-CN.ts +127 -0
- package/locale/lang/zh-HK.ts +84 -0
- package/locale/lang/zh-TW.ts +84 -0
- package/package.json +20 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
:id="buttonId"
|
|
4
|
+
:hover-class="`${disabled || loading ? '' : 'wd-button--active'}`"
|
|
5
|
+
:style="customStyle"
|
|
6
|
+
:class="[
|
|
7
|
+
'wd-button',
|
|
8
|
+
'is-' + type,
|
|
9
|
+
'is-' + size,
|
|
10
|
+
plain ? 'is-plain' : '',
|
|
11
|
+
disabled ? 'is-disabled' : '',
|
|
12
|
+
round ? 'is-round' : '',
|
|
13
|
+
hairline ? 'is-hairline' : '',
|
|
14
|
+
block ? 'is-block' : '',
|
|
15
|
+
loading ? 'is-loading' : '',
|
|
16
|
+
customClass,
|
|
17
|
+
]"
|
|
18
|
+
:hover-start-time="hoverStartTime"
|
|
19
|
+
:hover-stay-time="hoverStayTime"
|
|
20
|
+
:open-type="disabled || loading ? '' : openType"
|
|
21
|
+
:send-message-title="sendMessageTitle"
|
|
22
|
+
:send-message-path="sendMessagePath"
|
|
23
|
+
:send-message-img="sendMessageImg"
|
|
24
|
+
:app-parameter="appParameter"
|
|
25
|
+
:show-message-card="showMessageCard"
|
|
26
|
+
:session-from="sessionFrom"
|
|
27
|
+
:lang="lang"
|
|
28
|
+
:hover-stop-propagation="hoverStopPropagation"
|
|
29
|
+
@click="handleClick"
|
|
30
|
+
@getuserinfo="handleGetuserinfo"
|
|
31
|
+
@contact="handleConcat"
|
|
32
|
+
@getphonenumber="handleGetphonenumber"
|
|
33
|
+
@error="handleError"
|
|
34
|
+
@launchapp="handleLaunchapp"
|
|
35
|
+
@opensetting="handleOpensetting"
|
|
36
|
+
@chooseavatar="handleChooseavatar"
|
|
37
|
+
@agreeprivacyauthorization="handleAgreePrivacyAuthorization"
|
|
38
|
+
>
|
|
39
|
+
<view v-if="loading" class="wd-button__loading">
|
|
40
|
+
<view class="wd-button__loading-svg" :style="loadingStyle"></view>
|
|
41
|
+
</view>
|
|
42
|
+
<wd-icon
|
|
43
|
+
v-else-if="icon"
|
|
44
|
+
custom-class="wd-button__icon"
|
|
45
|
+
:name="icon"
|
|
46
|
+
:classPrefix="classPrefix"
|
|
47
|
+
></wd-icon>
|
|
48
|
+
<view class="wd-button__text"><slot /></view>
|
|
49
|
+
</button>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script lang="ts">
|
|
53
|
+
export default {
|
|
54
|
+
name: 'wd-button',
|
|
55
|
+
options: {
|
|
56
|
+
addGlobalClass: true,
|
|
57
|
+
virtualHost: true,
|
|
58
|
+
styleIsolation: 'shared',
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<script lang="ts" setup>
|
|
64
|
+
import { debounce } from '../common/util'
|
|
65
|
+
import { computed, watch, ref } from 'vue'
|
|
66
|
+
import base64 from '../common/base64'
|
|
67
|
+
import { buttonProps } from './types'
|
|
68
|
+
|
|
69
|
+
const loadingIcon = (color = '#4D80F0', reverse = true) => {
|
|
70
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42"><defs><linearGradient x1="100%" y1="0%" x2="0%" y2="0%" id="a"><stop stop-color="${
|
|
71
|
+
reverse ? color : '#fff'
|
|
72
|
+
}" offset="0%" stop-opacity="0"/><stop stop-color="${
|
|
73
|
+
reverse ? color : '#fff'
|
|
74
|
+
}" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M21 1c11.046 0 20 8.954 20 20s-8.954 20-20 20S1 32.046 1 21 9.954 1 21 1zm0 7C13.82 8 8 13.82 8 21s5.82 13 13 13 13-5.82 13-13S28.18 8 21 8z" fill="${
|
|
75
|
+
reverse ? '#fff' : color
|
|
76
|
+
}"/><path d="M4.599 21c0 9.044 7.332 16.376 16.376 16.376 9.045 0 16.376-7.332 16.376-16.376" stroke="url(#a)" stroke-width="3.5" stroke-linecap="round"/></g></svg>`
|
|
77
|
+
}
|
|
78
|
+
const props = defineProps(buttonProps)
|
|
79
|
+
const emit = defineEmits([
|
|
80
|
+
'click',
|
|
81
|
+
'getuserinfo',
|
|
82
|
+
'contact',
|
|
83
|
+
'getphonenumber',
|
|
84
|
+
'error',
|
|
85
|
+
'launchapp',
|
|
86
|
+
'opensetting',
|
|
87
|
+
'chooseavatar',
|
|
88
|
+
'agreeprivacyauthorization',
|
|
89
|
+
])
|
|
90
|
+
|
|
91
|
+
const hoverStartTime = ref<number>(20)
|
|
92
|
+
const hoverStayTime = ref<number>(70)
|
|
93
|
+
const loadingIconSvg = ref<string>('')
|
|
94
|
+
|
|
95
|
+
const loadingStyle = computed(() => {
|
|
96
|
+
return `background-image: url(${loadingIconSvg.value});`
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
watch(
|
|
100
|
+
() => props.loading,
|
|
101
|
+
() => {
|
|
102
|
+
buildLoadingSvg()
|
|
103
|
+
},
|
|
104
|
+
{ deep: true, immediate: true },
|
|
105
|
+
)
|
|
106
|
+
const handleClick = debounce((event: any) => {
|
|
107
|
+
if (!props.disabled && !props.loading) {
|
|
108
|
+
emit('click', event)
|
|
109
|
+
}
|
|
110
|
+
}, 200)
|
|
111
|
+
|
|
112
|
+
function handleGetuserinfo(event: any) {
|
|
113
|
+
emit('getuserinfo', event.detail)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function handleConcat(event: any) {
|
|
117
|
+
emit('contact', event.detail)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function handleGetphonenumber(event: any) {
|
|
121
|
+
emit('getphonenumber', event.detail)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function handleError(event: any) {
|
|
125
|
+
emit('error', event.detail)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function handleLaunchapp(event: any) {
|
|
129
|
+
emit('launchapp', event.detail)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function handleOpensetting(event: any) {
|
|
133
|
+
emit('opensetting', event.detail)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function handleChooseavatar(event: any) {
|
|
137
|
+
emit('chooseavatar', event.detail)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function handleAgreePrivacyAuthorization(event: any) {
|
|
141
|
+
emit('agreeprivacyauthorization', event.detail)
|
|
142
|
+
}
|
|
143
|
+
function buildLoadingSvg() {
|
|
144
|
+
const { loadingColor, type, plain } = props
|
|
145
|
+
let color = loadingColor
|
|
146
|
+
if (!color) {
|
|
147
|
+
switch (type) {
|
|
148
|
+
case 'primary':
|
|
149
|
+
color = '#4D80F0'
|
|
150
|
+
break
|
|
151
|
+
case 'success':
|
|
152
|
+
color = '#34d19d'
|
|
153
|
+
break
|
|
154
|
+
case 'info':
|
|
155
|
+
color = '#333'
|
|
156
|
+
break
|
|
157
|
+
case 'warning':
|
|
158
|
+
color = '#f0883a'
|
|
159
|
+
break
|
|
160
|
+
case 'error':
|
|
161
|
+
color = '#fa4350'
|
|
162
|
+
break
|
|
163
|
+
case 'default':
|
|
164
|
+
color = '#333'
|
|
165
|
+
break
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const svg = loadingIcon(color, !plain)
|
|
170
|
+
loadingIconSvg.value = `"data:image/svg+xml;base64,${base64(svg)}"`
|
|
171
|
+
}
|
|
172
|
+
</script>
|
|
173
|
+
|
|
174
|
+
<style lang="scss" scoped>
|
|
175
|
+
@import './index';
|
|
176
|
+
</style>
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
@import '../common/abstracts/variable';
|
|
2
|
+
@import '../common/abstracts/mixin';
|
|
3
|
+
|
|
4
|
+
.wot-theme-dark {
|
|
5
|
+
@include b(calendar) {
|
|
6
|
+
@include e(cell) {
|
|
7
|
+
color: $-dark-color;
|
|
8
|
+
background-color: $-dark-background2;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@include e(label) {
|
|
12
|
+
color: $-dark-color;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@include e(value) {
|
|
16
|
+
color: $-dark-color;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@include e(title) {
|
|
20
|
+
color: $-dark-color;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:deep(.wd-calendar__arrow),
|
|
24
|
+
:deep(.wd-calendar__close) {
|
|
25
|
+
color: $-dark-color;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@include when(border) {
|
|
29
|
+
.wd-calendar__cell {
|
|
30
|
+
@include halfPixelBorder('top', $-cell-padding, $-dark-border-color);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@include e(range-label-item) {
|
|
35
|
+
color: $-dark-color;
|
|
36
|
+
|
|
37
|
+
@include when(placeholder) {
|
|
38
|
+
color: $-dark-color-gray;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@include e(range-sperator) {
|
|
43
|
+
color: $-dark-color-gray;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@include b(calendar) {
|
|
49
|
+
@include when(border) {
|
|
50
|
+
.wd-calendar__cell {
|
|
51
|
+
@include halfPixelBorder('top', $-cell-padding);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@include e(cell) {
|
|
56
|
+
position: relative;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: flex-start;
|
|
59
|
+
padding: $-cell-wrapper-padding $-cell-padding;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
font-size: $-cell-title-fs;
|
|
62
|
+
line-height: $-cell-line-height;
|
|
63
|
+
color: $-cell-title-color;
|
|
64
|
+
text-decoration: none;
|
|
65
|
+
background-color: $-color-white;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@include e(cell) {
|
|
69
|
+
@include when(disabled) {
|
|
70
|
+
.wd-calendar__value {
|
|
71
|
+
color: $-input-disabled-color;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@include when(align-right) {
|
|
76
|
+
.wd-calendar__value {
|
|
77
|
+
text-align: right;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@include when(error) {
|
|
82
|
+
.wd-calendar__value {
|
|
83
|
+
color: $-input-error-color;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:deep(.wd-calendar__arrow) {
|
|
87
|
+
color: $-input-error-color;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@include when(large) {
|
|
92
|
+
font-size: $-cell-title-fs-large;
|
|
93
|
+
|
|
94
|
+
:deep(.wd-calendar__arrow) {
|
|
95
|
+
font-size: $-cell-icon-size-large;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@include when(center) {
|
|
100
|
+
align-items: center;
|
|
101
|
+
|
|
102
|
+
:deep(.wd-calendar__arrow) {
|
|
103
|
+
margin-top: 0;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@include e(error-message) {
|
|
109
|
+
font-size: $-form-item-error-message-font-size;
|
|
110
|
+
line-height: $-form-item-error-message-line-height;
|
|
111
|
+
color: $-form-item-error-message-color;
|
|
112
|
+
text-align: left;
|
|
113
|
+
vertical-align: middle;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@include e(label) {
|
|
117
|
+
position: relative;
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
width: $-input-cell-label-width;
|
|
120
|
+
margin-right: $-cell-padding;
|
|
121
|
+
color: $-cell-title-color;
|
|
122
|
+
|
|
123
|
+
@include when(required) {
|
|
124
|
+
padding-left: 12px;
|
|
125
|
+
|
|
126
|
+
&::after {
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 2px;
|
|
129
|
+
left: 0;
|
|
130
|
+
font-size: $-cell-required-size;
|
|
131
|
+
line-height: 1.1;
|
|
132
|
+
color: $-cell-required-color;
|
|
133
|
+
content: '*';
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@include e(value-wraper) {
|
|
139
|
+
display: flex;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@include e(value) {
|
|
143
|
+
flex: 1;
|
|
144
|
+
margin-right: 10px;
|
|
145
|
+
color: $-cell-value-color;
|
|
146
|
+
|
|
147
|
+
@include when(ellipsis) {
|
|
148
|
+
@include lineEllipsis;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@include m(placeholder) {
|
|
152
|
+
color: $-input-placeholder-color;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@include e(body) {
|
|
157
|
+
flex: 1;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@include edeep(arrow) {
|
|
161
|
+
display: block;
|
|
162
|
+
font-size: $-cell-icon-size;
|
|
163
|
+
line-height: $-cell-line-height;
|
|
164
|
+
color: $-cell-arrow-color;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@include e(header) {
|
|
168
|
+
position: relative;
|
|
169
|
+
overflow: hidden;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@include e(title) {
|
|
173
|
+
height: $-action-sheet-title-height;
|
|
174
|
+
font-size: $-action-sheet-title-fs;
|
|
175
|
+
font-weight: $-action-sheet-weight;
|
|
176
|
+
line-height: $-action-sheet-title-height;
|
|
177
|
+
color: $-action-sheet-color;
|
|
178
|
+
text-align: center;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@include edeep(close) {
|
|
182
|
+
position: absolute;
|
|
183
|
+
top: $-action-sheet-close-top;
|
|
184
|
+
right: $-action-sheet-close-right;
|
|
185
|
+
font-size: $-action-sheet-close-fs;
|
|
186
|
+
line-height: 1.1;
|
|
187
|
+
color: $-action-sheet-close-color;
|
|
188
|
+
transform: rotate(-45deg);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@include e(tabs) {
|
|
192
|
+
width: 222px;
|
|
193
|
+
margin: 10px auto 12px;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@include e(shortcuts) {
|
|
197
|
+
padding: 20px 0;
|
|
198
|
+
text-align: center;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@include edeep(tag) {
|
|
202
|
+
margin-right: 8px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@include e(view) {
|
|
206
|
+
@include when(show-confirm) {
|
|
207
|
+
height: 394px;
|
|
208
|
+
|
|
209
|
+
@include when(range) {
|
|
210
|
+
height: 384px;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@include e(range-label) {
|
|
216
|
+
display: flex;
|
|
217
|
+
align-items: center;
|
|
218
|
+
justify-content: center;
|
|
219
|
+
font-size: 14px;
|
|
220
|
+
|
|
221
|
+
@include when(monthrange) {
|
|
222
|
+
padding-bottom: 10px;
|
|
223
|
+
box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.02);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@include e(range-label-item) {
|
|
228
|
+
flex: 1;
|
|
229
|
+
color: rgba(0, 0, 0, 0.85);
|
|
230
|
+
|
|
231
|
+
@include when(placeholder) {
|
|
232
|
+
color: rgba(0, 0, 0, 0.25);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@include e(range-sperator) {
|
|
237
|
+
margin: 0 24px;
|
|
238
|
+
color: rgba(0, 0, 0, 0.25);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@include e(confirm) {
|
|
242
|
+
padding: 12px 25px 14px;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: weisheng
|
|
3
|
+
* @Date: 2024-03-15 20:40:34
|
|
4
|
+
* @LastEditTime: 2024-06-09 14:38:57
|
|
5
|
+
* @LastEditors: weisheng
|
|
6
|
+
* @Description:
|
|
7
|
+
* @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-calendar/types.ts
|
|
8
|
+
* 记得注释
|
|
9
|
+
*/
|
|
10
|
+
import type { PropType } from 'vue'
|
|
11
|
+
import {
|
|
12
|
+
baseProps,
|
|
13
|
+
makeArrayProp,
|
|
14
|
+
makeBooleanProp,
|
|
15
|
+
makeNumberProp,
|
|
16
|
+
makeRequiredProp,
|
|
17
|
+
makeStringProp,
|
|
18
|
+
} from '../common/props'
|
|
19
|
+
import type { CalendarFormatter, CalendarTimeFilter, CalendarType } from '../wd-calendar-view/types'
|
|
20
|
+
import type { FormItemRule } from '../wd-form/types'
|
|
21
|
+
|
|
22
|
+
export const calendarProps = {
|
|
23
|
+
...baseProps,
|
|
24
|
+
/**
|
|
25
|
+
* 选中值,为 13 位时间戳或时间戳数组
|
|
26
|
+
*/
|
|
27
|
+
modelValue: makeRequiredProp([Number, Array, null] as PropType<number | number[] | null>),
|
|
28
|
+
/**
|
|
29
|
+
* 日期类型,可选值:date / dates / datetime / week / month / daterange / datetimerange / weekrange / monthrange
|
|
30
|
+
*/
|
|
31
|
+
type: makeStringProp<CalendarType>('date'),
|
|
32
|
+
/**
|
|
33
|
+
* 最小日期,为 13 位时间戳
|
|
34
|
+
*/
|
|
35
|
+
minDate: makeNumberProp(
|
|
36
|
+
new Date(new Date().getFullYear(), new Date().getMonth() - 6, new Date().getDate()).getTime(),
|
|
37
|
+
),
|
|
38
|
+
/**
|
|
39
|
+
* 最大日期,为 13 位时间戳
|
|
40
|
+
*/
|
|
41
|
+
maxDate: makeNumberProp(
|
|
42
|
+
new Date(
|
|
43
|
+
new Date().getFullYear(),
|
|
44
|
+
new Date().getMonth() + 6,
|
|
45
|
+
new Date().getDate(),
|
|
46
|
+
23,
|
|
47
|
+
59,
|
|
48
|
+
59,
|
|
49
|
+
).getTime(),
|
|
50
|
+
),
|
|
51
|
+
/**
|
|
52
|
+
* 周起始天
|
|
53
|
+
*/
|
|
54
|
+
firstDayOfWeek: makeNumberProp(0),
|
|
55
|
+
/**
|
|
56
|
+
* 日期格式化函数
|
|
57
|
+
*/
|
|
58
|
+
formatter: Function as PropType<CalendarFormatter>,
|
|
59
|
+
/**
|
|
60
|
+
* type 为范围选择时有效,最大日期范围
|
|
61
|
+
*/
|
|
62
|
+
maxRange: Number,
|
|
63
|
+
/**
|
|
64
|
+
* type 为范围选择时有效,选择超出最大日期范围时的错误提示文案
|
|
65
|
+
*/
|
|
66
|
+
rangePrompt: String,
|
|
67
|
+
/**
|
|
68
|
+
* type 为范围选择时有效,是否允许选择同一天
|
|
69
|
+
*/
|
|
70
|
+
allowSameDay: makeBooleanProp(false),
|
|
71
|
+
/**
|
|
72
|
+
* 选中日期所使用的当日内具体时刻
|
|
73
|
+
*/
|
|
74
|
+
defaultTime: {
|
|
75
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* type 为 'datetime' 或 'datetimerange' 时有效,用于过滤时间选择器的数据
|
|
79
|
+
*/
|
|
80
|
+
timeFilter: Function as PropType<CalendarTimeFilter>,
|
|
81
|
+
/**
|
|
82
|
+
* type 为 'datetime' 或 'datetimerange' 时有效,是否不展示秒修改
|
|
83
|
+
*/
|
|
84
|
+
hideSecond: makeBooleanProp(false),
|
|
85
|
+
/**
|
|
86
|
+
* 选择器左侧文案
|
|
87
|
+
*/
|
|
88
|
+
label: String,
|
|
89
|
+
/**
|
|
90
|
+
* 设置左侧标题宽度
|
|
91
|
+
*/
|
|
92
|
+
labelWidth: String,
|
|
93
|
+
/**
|
|
94
|
+
* 使用 label 插槽时设置该选项
|
|
95
|
+
*/
|
|
96
|
+
useLabelSlot: makeBooleanProp(false),
|
|
97
|
+
/**
|
|
98
|
+
* 使用默认插槽时设置该选项
|
|
99
|
+
*/
|
|
100
|
+
useDefaultSlot: makeBooleanProp(false),
|
|
101
|
+
/**
|
|
102
|
+
* 禁用
|
|
103
|
+
*/
|
|
104
|
+
disabled: makeBooleanProp(false),
|
|
105
|
+
/**
|
|
106
|
+
* 只读
|
|
107
|
+
*/
|
|
108
|
+
readonly: makeBooleanProp(false),
|
|
109
|
+
/**
|
|
110
|
+
* 选择器占位符
|
|
111
|
+
*/
|
|
112
|
+
placeholder: String,
|
|
113
|
+
/**
|
|
114
|
+
* 弹出层标题
|
|
115
|
+
*/
|
|
116
|
+
title: String,
|
|
117
|
+
/**
|
|
118
|
+
* 选择器的值靠右展示
|
|
119
|
+
*/
|
|
120
|
+
alignRight: makeBooleanProp(false),
|
|
121
|
+
/**
|
|
122
|
+
* 是否为错误状态,错误状态时右侧内容为红色
|
|
123
|
+
*/
|
|
124
|
+
error: makeBooleanProp(false),
|
|
125
|
+
/**
|
|
126
|
+
* 是否必填
|
|
127
|
+
*/
|
|
128
|
+
required: makeBooleanProp(false),
|
|
129
|
+
/**
|
|
130
|
+
* 设置选择器大小,可选值:large
|
|
131
|
+
*/
|
|
132
|
+
size: String,
|
|
133
|
+
/**
|
|
134
|
+
* 是否垂直居中
|
|
135
|
+
*/
|
|
136
|
+
center: makeBooleanProp(false),
|
|
137
|
+
/**
|
|
138
|
+
* 点击遮罩是否关闭
|
|
139
|
+
*/
|
|
140
|
+
closeOnClickModal: makeBooleanProp(true),
|
|
141
|
+
/**
|
|
142
|
+
* 弹框层级
|
|
143
|
+
*/
|
|
144
|
+
zIndex: makeNumberProp(15),
|
|
145
|
+
/**
|
|
146
|
+
* 是否显示确定按钮
|
|
147
|
+
*/
|
|
148
|
+
showConfirm: makeBooleanProp(true),
|
|
149
|
+
/**
|
|
150
|
+
* 确定按钮文字
|
|
151
|
+
*/
|
|
152
|
+
confirmText: String,
|
|
153
|
+
/**
|
|
154
|
+
* 自定义展示文案的格式化函数,返回一个字符串
|
|
155
|
+
*/
|
|
156
|
+
displayFormat: Function as PropType<CalendarDisplayFormat>,
|
|
157
|
+
/**
|
|
158
|
+
* 自定义范围选择类型的面板内部回显,返回一个字符串
|
|
159
|
+
*/
|
|
160
|
+
innerDisplayFormat: Function as PropType<CalendarInnerDisplayFormat>,
|
|
161
|
+
/**
|
|
162
|
+
* 是否超出隐藏
|
|
163
|
+
*/
|
|
164
|
+
ellipsis: makeBooleanProp(false),
|
|
165
|
+
/**
|
|
166
|
+
* 是否显示类型切换功能
|
|
167
|
+
*/
|
|
168
|
+
showTypeSwitch: makeBooleanProp(false),
|
|
169
|
+
/**
|
|
170
|
+
* 快捷选项,为对象数组,其中对象的 text 必传
|
|
171
|
+
*/
|
|
172
|
+
shortcuts: makeArrayProp<Record<string, any>>(),
|
|
173
|
+
/**
|
|
174
|
+
* 快捷操作点击回调
|
|
175
|
+
*/
|
|
176
|
+
onShortcutsClick: Function as PropType<CalendarOnShortcutsClick>,
|
|
177
|
+
/**
|
|
178
|
+
* 弹出面板是否设置底部安全距离(iphone X 类型的机型)
|
|
179
|
+
*/
|
|
180
|
+
safeAreaInsetBottom: makeBooleanProp(true),
|
|
181
|
+
/**
|
|
182
|
+
* 确定前校验函数,接收 { value, resolve } 参数,通过 resolve 继续执行,resolve 接收 1 个 boolean 参数
|
|
183
|
+
*/
|
|
184
|
+
beforeConfirm: Function as PropType<CalendarBeforeConfirm>,
|
|
185
|
+
/**
|
|
186
|
+
* 表单域 model 字段名,在使用表单校验功能的情况下,该属性是必填的
|
|
187
|
+
*/
|
|
188
|
+
prop: String,
|
|
189
|
+
/**
|
|
190
|
+
* 表单验证规则,结合wd-form组件使用
|
|
191
|
+
*/
|
|
192
|
+
rules: makeArrayProp<FormItemRule>(),
|
|
193
|
+
customViewClass: makeStringProp(''),
|
|
194
|
+
/**
|
|
195
|
+
* label 外部自定义样式
|
|
196
|
+
*/
|
|
197
|
+
customLabelClass: makeStringProp(''),
|
|
198
|
+
/**
|
|
199
|
+
* value 外部自定义样式
|
|
200
|
+
*/
|
|
201
|
+
customValueClass: makeStringProp(''),
|
|
202
|
+
/**
|
|
203
|
+
* 是否在手指松开时立即触发picker-view的 change 事件。若不开启则会在滚动动画结束后触发 change 事件,1.2.25版本起提供,仅微信小程序和支付宝小程序支持。
|
|
204
|
+
*/
|
|
205
|
+
immediateChange: makeBooleanProp(false),
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export type CalendarDisplayFormat = (value: number | number[], type: CalendarType) => string
|
|
209
|
+
|
|
210
|
+
export type CalendarInnerDisplayFormat = (
|
|
211
|
+
value: number,
|
|
212
|
+
rangeType: 'start' | 'end',
|
|
213
|
+
type: CalendarType,
|
|
214
|
+
) => string
|
|
215
|
+
|
|
216
|
+
export type CalendarBeforeConfirmOption = {
|
|
217
|
+
value: number | number[] | null
|
|
218
|
+
resolve: (isPass: boolean) => void
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type CalendarBeforeConfirm = (option: CalendarBeforeConfirmOption) => void
|
|
222
|
+
|
|
223
|
+
export type CalendarOnShortcutsClickOption = {
|
|
224
|
+
item: Record<string, any>
|
|
225
|
+
index: number
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export type CalendarOnShortcutsClick = (option: CalendarOnShortcutsClickOption) => number | number[]
|
|
229
|
+
|
|
230
|
+
export type CalendarExpose = {
|
|
231
|
+
/** 关闭时间选择器弹窗 */
|
|
232
|
+
close: () => void
|
|
233
|
+
/** 打开时间选择器弹窗 */
|
|
234
|
+
open: () => void
|
|
235
|
+
}
|