@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,221 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
:class="`wd-input-number ${customClass} ${disabled ? 'is-disabled' : ''} ${withoutInput ? 'is-without-input' : ''}`"
|
|
4
|
+
:style="customStyle"
|
|
5
|
+
>
|
|
6
|
+
<view
|
|
7
|
+
:class="`wd-input-number__action ${minDisabled || disableMinus ? 'is-disabled' : ''}`"
|
|
8
|
+
@click="sub"
|
|
9
|
+
>
|
|
10
|
+
<wd-icon name="decrease" custom-class="wd-input-number__action-icon"></wd-icon>
|
|
11
|
+
</view>
|
|
12
|
+
<view v-if="!withoutInput" class="wd-input-number__inner" @click.stop="">
|
|
13
|
+
<input
|
|
14
|
+
class="wd-input-number__input"
|
|
15
|
+
:style="`${inputWidth ? 'width: ' + inputWidth : ''}`"
|
|
16
|
+
type="digit"
|
|
17
|
+
:disabled="disabled || disableInput"
|
|
18
|
+
v-model="inputValue"
|
|
19
|
+
:placeholder="placeholder"
|
|
20
|
+
@input="handleInput"
|
|
21
|
+
@focus="handleFocus"
|
|
22
|
+
@blur="handleBlur"
|
|
23
|
+
/>
|
|
24
|
+
<view class="wd-input-number__input-border"></view>
|
|
25
|
+
</view>
|
|
26
|
+
<view
|
|
27
|
+
:class="`wd-input-number__action ${maxDisabled || disablePlus ? 'is-disabled' : ''}`"
|
|
28
|
+
@click="add"
|
|
29
|
+
>
|
|
30
|
+
<wd-icon name="add" custom-class="wd-input-number__action-icon"></wd-icon>
|
|
31
|
+
</view>
|
|
32
|
+
</view>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script lang="ts">
|
|
36
|
+
export default {
|
|
37
|
+
name: 'wd-input-number',
|
|
38
|
+
options: {
|
|
39
|
+
virtualHost: true,
|
|
40
|
+
addGlobalClass: true,
|
|
41
|
+
styleIsolation: 'shared',
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<script lang="ts" setup>
|
|
47
|
+
import { ref, watch } from 'vue'
|
|
48
|
+
import { debounce, isDef, isEqual } from '../common/util'
|
|
49
|
+
import { inputNumberProps } from './types'
|
|
50
|
+
|
|
51
|
+
const props = defineProps(inputNumberProps)
|
|
52
|
+
const emit = defineEmits(['focus', 'blur', 'change', 'update:modelValue'])
|
|
53
|
+
|
|
54
|
+
const minDisabled = ref<boolean>(false)
|
|
55
|
+
const maxDisabled = ref<boolean>(false)
|
|
56
|
+
const inputValue = ref<string | number>('') // 输入框的值
|
|
57
|
+
|
|
58
|
+
watch(
|
|
59
|
+
() => props.modelValue,
|
|
60
|
+
(newValue) => {
|
|
61
|
+
inputValue.value = newValue
|
|
62
|
+
splitDisabled(newValue)
|
|
63
|
+
},
|
|
64
|
+
{ immediate: true, deep: true },
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
watch(
|
|
68
|
+
[() => props.max, () => props.min],
|
|
69
|
+
() => {
|
|
70
|
+
updateBoundary()
|
|
71
|
+
},
|
|
72
|
+
{ immediate: true, deep: true },
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
watch(
|
|
76
|
+
() => props.disabled,
|
|
77
|
+
(newValue) => {
|
|
78
|
+
minDisabled.value = newValue
|
|
79
|
+
maxDisabled.value = newValue
|
|
80
|
+
},
|
|
81
|
+
{ immediate: true, deep: true },
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
function updateBoundary() {
|
|
85
|
+
debounce(() => {
|
|
86
|
+
const value = formatValue(inputValue.value)
|
|
87
|
+
if (!isEqual(inputValue.value, value)) {
|
|
88
|
+
setValue(value)
|
|
89
|
+
}
|
|
90
|
+
splitDisabled(value)
|
|
91
|
+
}, 30)()
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function splitDisabled(value: number | string) {
|
|
95
|
+
const { disabled, min, max, step } = props
|
|
96
|
+
minDisabled.value = disabled || Number(value) <= min || changeStep(value, -step) < min
|
|
97
|
+
maxDisabled.value = disabled || Number(value) >= max || changeStep(value, step) > max
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function toPrecision(value: number) {
|
|
101
|
+
return Number(
|
|
102
|
+
parseFloat(
|
|
103
|
+
`${Math.round(value * Math.pow(10, props.precision)) / Math.pow(10, props.precision)}`,
|
|
104
|
+
).toFixed(props.precision),
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function getPrecision(value?: number) {
|
|
109
|
+
if (value === undefined) return 0
|
|
110
|
+
const valueString = value.toString()
|
|
111
|
+
const dotPosition = valueString.indexOf('.')
|
|
112
|
+
let precision = 0
|
|
113
|
+
if (dotPosition !== -1) {
|
|
114
|
+
precision = valueString.length - dotPosition - 1
|
|
115
|
+
}
|
|
116
|
+
return precision
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function toStrictlyStep(value: number | string) {
|
|
120
|
+
const stepPrecision = getPrecision(props.step)
|
|
121
|
+
const precisionFactory = Math.pow(10, stepPrecision)
|
|
122
|
+
return (Math.round(Number(value) / props.step) * precisionFactory * props.step) / precisionFactory
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function setValue(value: string | number, change: boolean = true) {
|
|
126
|
+
if (props.allowNull && (!isDef(value) || value === '')) {
|
|
127
|
+
dispatchChangeEvent(value, change)
|
|
128
|
+
return
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (props.stepStrictly) {
|
|
132
|
+
value = toStrictlyStep(value)
|
|
133
|
+
}
|
|
134
|
+
if ((value || value === 0) && props.precision !== undefined) {
|
|
135
|
+
value = toPrecision(Number(value))
|
|
136
|
+
}
|
|
137
|
+
if (Number(value) > props.max) value = toPrecision(props.max)
|
|
138
|
+
if (Number(value) < props.min) value = toPrecision(props.min)
|
|
139
|
+
|
|
140
|
+
dispatchChangeEvent(value, change)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function changeStep(val: string | number, step: number) {
|
|
144
|
+
val = Number(val)
|
|
145
|
+
|
|
146
|
+
if (isNaN(val)) {
|
|
147
|
+
return props.min
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const precisionFactory = Math.pow(10, props.precision)
|
|
151
|
+
return toPrecision((val * precisionFactory + step * precisionFactory) / precisionFactory)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function sub() {
|
|
155
|
+
if (minDisabled.value || props.disableMinus) return
|
|
156
|
+
|
|
157
|
+
const newValue = changeStep(inputValue.value, -props.step)
|
|
158
|
+
dispatchChangeEvent(newValue)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function add() {
|
|
162
|
+
if (maxDisabled.value || props.disablePlus) return
|
|
163
|
+
|
|
164
|
+
const newValue = changeStep(inputValue.value, props.step)
|
|
165
|
+
dispatchChangeEvent(newValue)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function handleInput(event: any) {
|
|
169
|
+
const value = event.detail.value || ''
|
|
170
|
+
dispatchChangeEvent(value)
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function handleFocus(event: any) {
|
|
174
|
+
emit('focus', event.detail)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function handleBlur() {
|
|
178
|
+
const value = formatValue(inputValue.value)
|
|
179
|
+
if (!isEqual(inputValue.value, value)) {
|
|
180
|
+
setValue(value)
|
|
181
|
+
}
|
|
182
|
+
emit('blur', {
|
|
183
|
+
value,
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function dispatchChangeEvent(value: string | number, change: boolean = true) {
|
|
188
|
+
if (isEqual(inputValue.value, value)) {
|
|
189
|
+
return
|
|
190
|
+
}
|
|
191
|
+
inputValue.value = value
|
|
192
|
+
change && emit('update:modelValue', inputValue.value)
|
|
193
|
+
change && emit('change', { value })
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function formatValue(value: string | number) {
|
|
197
|
+
if (props.allowNull && (!isDef(value) || value === '')) {
|
|
198
|
+
return ''
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
value = Number(value)
|
|
202
|
+
|
|
203
|
+
if (isNaN(value)) {
|
|
204
|
+
value = props.min
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (props.stepStrictly) {
|
|
208
|
+
value = toStrictlyStep(value)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (props.precision !== undefined) {
|
|
212
|
+
value = value.toFixed(props.precision)
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return Number(value)
|
|
216
|
+
}
|
|
217
|
+
</script>
|
|
218
|
+
|
|
219
|
+
<style lang="scss" scoped>
|
|
220
|
+
@import './index';
|
|
221
|
+
</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@import '../common/abstracts/_mixin';
|
|
2
|
+
@import '../common/abstracts/variable';
|
|
3
|
+
|
|
4
|
+
@include b(loading) {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
width: $-loading-size;
|
|
7
|
+
height: $-loading-size;
|
|
8
|
+
font-size: 0;
|
|
9
|
+
line-height: 0;
|
|
10
|
+
vertical-align: middle;
|
|
11
|
+
|
|
12
|
+
@include e(body) {
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
animation: wd-rotate 0.8s linear infinite;
|
|
16
|
+
animation-duration: 2s;
|
|
17
|
+
}
|
|
18
|
+
@include e(svg) {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
background-repeat: no-repeat;
|
|
22
|
+
background-size: cover;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes wd-rotate {
|
|
27
|
+
from {
|
|
28
|
+
transform: rotate(0deg);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
to {
|
|
32
|
+
transform: rotate(360deg);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: weisheng
|
|
3
|
+
* @Date: 2024-03-15 20:40:34
|
|
4
|
+
* @LastEditTime: 2024-07-18 22:09:12
|
|
5
|
+
* @LastEditors: weisheng
|
|
6
|
+
* @Description:
|
|
7
|
+
* @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-loading/types.ts
|
|
8
|
+
* 记得注释
|
|
9
|
+
*/
|
|
10
|
+
import type { ExtractPropTypes } from 'vue'
|
|
11
|
+
import { baseProps, makeNumericProp, makeStringProp } from '../common/props'
|
|
12
|
+
|
|
13
|
+
export type LoadingType = 'outline' | 'ring' // 提示信息加载状态类型
|
|
14
|
+
|
|
15
|
+
export const loadingProps = {
|
|
16
|
+
...baseProps,
|
|
17
|
+
/**
|
|
18
|
+
* 加载指示器类型,可选值:'outline' | 'ring'
|
|
19
|
+
*/
|
|
20
|
+
type: makeStringProp<LoadingType>('ring'),
|
|
21
|
+
/**
|
|
22
|
+
* 设置加载指示器颜色
|
|
23
|
+
*/
|
|
24
|
+
color: makeStringProp('#4D80F0'),
|
|
25
|
+
/**
|
|
26
|
+
* 设置加载指示器大小
|
|
27
|
+
*/
|
|
28
|
+
size: makeNumericProp(''),
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type LoadingProps = ExtractPropTypes<typeof loadingProps>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view :class="`wd-loading ${props.customClass}`" :style="rootStyle">
|
|
3
|
+
<view class="wd-loading__body">
|
|
4
|
+
<view class="wd-loading__svg" :style="`background-image: url(${svg});`"></view>
|
|
5
|
+
</view>
|
|
6
|
+
</view>
|
|
7
|
+
</template>
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
export default {
|
|
10
|
+
name: 'wd-loading',
|
|
11
|
+
options: {
|
|
12
|
+
virtualHost: true,
|
|
13
|
+
addGlobalClass: true,
|
|
14
|
+
styleIsolation: 'shared',
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { computed, onBeforeMount, ref, watch, type CSSProperties } from 'vue'
|
|
21
|
+
import base64 from '../common/base64'
|
|
22
|
+
import { gradient, context, objToStyle, addUnit, isDef } from '../common/util'
|
|
23
|
+
import { loadingProps } from './types'
|
|
24
|
+
|
|
25
|
+
const svgDefineId = context.id++
|
|
26
|
+
const svgDefineId1 = context.id++
|
|
27
|
+
const svgDefineId2 = context.id++
|
|
28
|
+
|
|
29
|
+
const icon = {
|
|
30
|
+
outline(color = '#4D80F0') {
|
|
31
|
+
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="${svgDefineId}"><stop stop-color="#FFF" offset="0%" stop-opacity="0"/><stop stop-color="#FFF" 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="${color}"/><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(#${svgDefineId}) " stroke-width="3.5" stroke-linecap="round"/></g></svg>`
|
|
32
|
+
},
|
|
33
|
+
ring(color = '#4D80F0', intermediateColor = '#a6bff7') {
|
|
34
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><linearGradient id="${svgDefineId1}" gradientUnits="userSpaceOnUse" x1="50" x2="50" y2="180"><stop offset="0" stop-color="${color}"></stop> <stop offset="1" stop-color="${intermediateColor}"></stop></linearGradient> <path fill="url(#${svgDefineId1})" d="M20 100c0-44.1 35.9-80 80-80V0C44.8 0 0 44.8 0 100s44.8 100 100 100v-20c-44.1 0-80-35.9-80-80z"></path> <linearGradient id="${svgDefineId2}" gradientUnits="userSpaceOnUse" x1="150" y1="20" x2="150" y2="180"><stop offset="0" stop-color="#fff" stop-opacity="0"></stop> <stop offset="1" stop-color="${intermediateColor}"></stop></linearGradient> <path fill="url(#${svgDefineId2})" d="M100 0v20c44.1 0 80 35.9 80 80s-35.9 80-80 80v20c55.2 0 100-44.8 100-100S155.2 0 100 0z"></path> <circle cx="100" cy="10" r="10" fill="${color}"></circle></svg>`
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const props = defineProps(loadingProps)
|
|
39
|
+
|
|
40
|
+
const svg = ref<string>('')
|
|
41
|
+
const intermediateColor = ref<string>('')
|
|
42
|
+
const iconSize = ref<string | number | null>(null)
|
|
43
|
+
|
|
44
|
+
watch(
|
|
45
|
+
() => props.size,
|
|
46
|
+
(newVal) => {
|
|
47
|
+
iconSize.value = addUnit(newVal)
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
deep: true,
|
|
51
|
+
immediate: true,
|
|
52
|
+
},
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
watch(
|
|
56
|
+
() => props.type,
|
|
57
|
+
() => {
|
|
58
|
+
buildSvg()
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
deep: true,
|
|
62
|
+
immediate: true,
|
|
63
|
+
},
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
const rootStyle = computed(() => {
|
|
67
|
+
const style: CSSProperties = {}
|
|
68
|
+
if (isDef(iconSize.value)) {
|
|
69
|
+
style.height = addUnit(iconSize.value)
|
|
70
|
+
style.width = addUnit(iconSize.value)
|
|
71
|
+
}
|
|
72
|
+
return `${objToStyle(style)}; ${props.customStyle}`
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
onBeforeMount(() => {
|
|
76
|
+
intermediateColor.value = gradient(props.color, '#ffffff', 2)[1]
|
|
77
|
+
buildSvg()
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
function buildSvg() {
|
|
81
|
+
const { type, color } = props
|
|
82
|
+
const ringType: 'outline' | 'ring' = isDef(type) ? type : 'ring'
|
|
83
|
+
const svgStr = `"data:image/svg+xml;base64,${base64(ringType === 'ring' ? icon[ringType](color, intermediateColor.value) : icon[ringType](color))}"`
|
|
84
|
+
svg.value = svgStr
|
|
85
|
+
}
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<style lang="scss" scoped>
|
|
89
|
+
@import './index.scss';
|
|
90
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@import '../common/abstracts/variable';
|
|
2
|
+
@import '../common/abstracts/mixin';
|
|
3
|
+
.wot-theme-dark {
|
|
4
|
+
@include b(loadmore) {
|
|
5
|
+
color: $-dark-color;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@include b(loadmore) {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: $-loadmore-height;
|
|
12
|
+
line-height: $-loadmore-height;
|
|
13
|
+
color: $-loadmore-color;
|
|
14
|
+
text-align: center;
|
|
15
|
+
|
|
16
|
+
@include edeep(loading) {
|
|
17
|
+
display: inline-block;
|
|
18
|
+
width: $-loadmore-loading-size;
|
|
19
|
+
height: $-loadmore-loading-size;
|
|
20
|
+
margin-right: 8px;
|
|
21
|
+
vertical-align: middle;
|
|
22
|
+
}
|
|
23
|
+
@include e(text) {
|
|
24
|
+
display: inline-block;
|
|
25
|
+
font-size: $-loadmore-fs;
|
|
26
|
+
vertical-align: middle;
|
|
27
|
+
|
|
28
|
+
@include when(light) {
|
|
29
|
+
margin: 0 6px;
|
|
30
|
+
color: $-loadmore-error-color;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
@include edeep(refresh) {
|
|
34
|
+
display: inline-block;
|
|
35
|
+
font-size: $-loadmore-refresh-fs;
|
|
36
|
+
color: $-loadmore-error-color;
|
|
37
|
+
vertical-align: middle;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PropType } from 'vue'
|
|
2
|
+
import { baseProps, makeStringProp } from '../common/props'
|
|
3
|
+
|
|
4
|
+
export type LoadMoreState = 'loading' | 'error' | 'finished'
|
|
5
|
+
|
|
6
|
+
export const loadmoreProps = {
|
|
7
|
+
...baseProps,
|
|
8
|
+
/**
|
|
9
|
+
* 加载状态,可选值:'loading' | 'error' | 'finished'
|
|
10
|
+
*/
|
|
11
|
+
state: String as PropType<LoadMoreState>,
|
|
12
|
+
/**
|
|
13
|
+
* 加载提示文案
|
|
14
|
+
*/
|
|
15
|
+
loadingText: String,
|
|
16
|
+
/**
|
|
17
|
+
* 全部加载完的提示文案
|
|
18
|
+
*/
|
|
19
|
+
finishedText: String,
|
|
20
|
+
/**
|
|
21
|
+
* 加载失败的提示文案
|
|
22
|
+
*/
|
|
23
|
+
errorText: makeStringProp('加载失败,点击重试'),
|
|
24
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view :class="['wd-loadmore', customClass]" :style="customStyle" @click="reload">
|
|
3
|
+
<wd-divider v-if="state === 'finished'">{{ finishedText || translate('finished') }}</wd-divider>
|
|
4
|
+
<block v-if="state === 'error'">
|
|
5
|
+
<block v-if="errorText">
|
|
6
|
+
{{ errorText }}
|
|
7
|
+
</block>
|
|
8
|
+
<block v-else>
|
|
9
|
+
<text class="wd-loadmore__text">{{ translate('error') }}</text>
|
|
10
|
+
<text class="wd-loadmore__text is-light">{{ translate('retry') }}</text>
|
|
11
|
+
<wd-icon name="refresh" custom-class="wd-loadmore__refresh" />
|
|
12
|
+
</block>
|
|
13
|
+
</block>
|
|
14
|
+
<block v-if="state === 'loading'">
|
|
15
|
+
<wd-loading custom-class="wd-loadmore__loading" />
|
|
16
|
+
<text class="wd-loadmore__text">{{ loadingText || translate('loading') }}</text>
|
|
17
|
+
</block>
|
|
18
|
+
</view>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
export default {
|
|
23
|
+
name: 'wd-loadmore',
|
|
24
|
+
options: {
|
|
25
|
+
virtualHost: true,
|
|
26
|
+
addGlobalClass: true,
|
|
27
|
+
styleIsolation: 'shared',
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<script lang="ts" setup>
|
|
33
|
+
import { ref } from 'vue'
|
|
34
|
+
import { useTranslate } from '../composables/useTranslate'
|
|
35
|
+
import { loadmoreProps, type LoadMoreState } from './types'
|
|
36
|
+
|
|
37
|
+
const props = defineProps(loadmoreProps)
|
|
38
|
+
const emit = defineEmits(['reload'])
|
|
39
|
+
|
|
40
|
+
const { translate } = useTranslate('loadmore')
|
|
41
|
+
|
|
42
|
+
const currentState = ref<LoadMoreState | null>(null)
|
|
43
|
+
|
|
44
|
+
function reload() {
|
|
45
|
+
if (props.state !== 'error') return
|
|
46
|
+
currentState.value = 'loading'
|
|
47
|
+
emit('reload')
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<style lang="scss" scoped>
|
|
52
|
+
@import './index';
|
|
53
|
+
</style>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
@import '../common/abstracts/variable';
|
|
2
|
+
@import '../common/abstracts/_mixin';
|
|
3
|
+
|
|
4
|
+
.wot-theme-dark {
|
|
5
|
+
@include b(message-box) {
|
|
6
|
+
@include e(body) {
|
|
7
|
+
background-color: $-dark-background2;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@include e(title) {
|
|
11
|
+
color: $-dark-color;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@include e(content) {
|
|
15
|
+
color: $-dark-color3;
|
|
16
|
+
|
|
17
|
+
&::-webkit-scrollbar-thumb {
|
|
18
|
+
background: $-dark-border-color;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:deep(.wd-message-box) {
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
border-radius: $-message-box-radius;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@include b(message-box) {
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
border-radius: $-message-box-radius;
|
|
32
|
+
|
|
33
|
+
@include e(container) {
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
width: $-message-box-width;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@include e(body) {
|
|
39
|
+
padding: $-message-box-padding;
|
|
40
|
+
background-color: $-message-box-bg;
|
|
41
|
+
|
|
42
|
+
@include when(no-title) {
|
|
43
|
+
padding: 25px 24px 0px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@include e(title) {
|
|
48
|
+
padding-top: 5px;
|
|
49
|
+
padding-bottom: 10px;
|
|
50
|
+
font-size: $-message-box-title-fs;
|
|
51
|
+
font-weight: 500;
|
|
52
|
+
line-height: 20px;
|
|
53
|
+
color: $-message-box-title-color;
|
|
54
|
+
text-align: center;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@include e(content) {
|
|
58
|
+
max-height: $-message-box-content-max-height;
|
|
59
|
+
overflow: auto;
|
|
60
|
+
font-size: $-message-box-content-fs;
|
|
61
|
+
line-height: 20px;
|
|
62
|
+
color: $-message-box-content-color;
|
|
63
|
+
text-align: center;
|
|
64
|
+
|
|
65
|
+
&::-webkit-scrollbar {
|
|
66
|
+
width: $-message-box-content-scrollbar-width;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&::-webkit-scrollbar-thumb {
|
|
70
|
+
width: $-message-box-content-scrollbar-width;
|
|
71
|
+
background: $-message-box-content-scrollbar-color;
|
|
72
|
+
border-radius: calc($-message-box-content-scrollbar-width / 2);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include e(input-error) {
|
|
77
|
+
min-height: 18px;
|
|
78
|
+
margin-top: 2px;
|
|
79
|
+
color: $-message-box-input-error-color;
|
|
80
|
+
text-align: left;
|
|
81
|
+
|
|
82
|
+
@include when(hidden) {
|
|
83
|
+
visibility: hidden;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@include e(actions) {
|
|
88
|
+
padding: 24px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@include e(flex) {
|
|
92
|
+
display: flex;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@include e(block) {
|
|
96
|
+
display: block;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@include e(cancel) {
|
|
100
|
+
margin-right: 16px;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.zoomIn-enter-active,
|
|
105
|
+
.zoomIn-leave-active {
|
|
106
|
+
opacity: 1;
|
|
107
|
+
transition: all 0.2s;
|
|
108
|
+
transform: translate3d(-50%, -50%, 0) scale(1);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.zoomIn-enter {
|
|
112
|
+
opacity: 0;
|
|
113
|
+
transition: all 0.2s ease-out;
|
|
114
|
+
transform: translate3d(-50%, -50%, 0) scale(0.7);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.zoomIn-leave-to {
|
|
118
|
+
opacity: 0;
|
|
119
|
+
transition: all 0.2s ease-out;
|
|
120
|
+
transform: translate3d(-50%, -50%, 0) scale(0.9);
|
|
121
|
+
}
|