oxy-uni-ui 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/components/common/AbortablePromise.ts +4 -0
- package/components/common/abstracts/variable.scss +172 -66
- package/components/common/base64.ts +6 -0
- package/components/common/clickoutside.ts +5 -0
- package/components/common/interceptor.ts +9 -0
- package/components/common/path.ts +4 -0
- package/components/common/props.ts +23 -0
- package/components/common/util.ts +18 -1
- package/components/composables/index.ts +2 -0
- package/components/composables/useCell.ts +8 -1
- package/components/composables/useChildren.ts +27 -1
- package/components/composables/useCountDown.ts +10 -1
- package/components/composables/useDynamicVirtualScroll.ts +9 -0
- package/components/composables/useGlobalLoading.ts +6 -0
- package/components/composables/useGlobalMessage.ts +6 -0
- package/components/composables/useGlobalToast.ts +6 -0
- package/components/composables/useLockScroll.ts +9 -0
- package/components/composables/useParent.ts +65 -14
- package/components/composables/usePopover.ts +9 -0
- package/components/composables/useQueue.ts +8 -0
- package/components/composables/useRaf.ts +10 -0
- package/components/composables/useSharedState.ts +284 -0
- package/components/composables/useTouch.ts +8 -0
- package/components/composables/useTranslate.ts +9 -0
- package/components/composables/useUpload.ts +83 -11
- package/components/composables/useVirtualScroll.ts +7 -0
- package/components/composables/useWindowResize.ts +9 -0
- package/components/oxy-action-sheet/index.scss +5 -5
- package/components/oxy-action-sheet/oxy-action-sheet.vue +11 -0
- package/components/oxy-backtop/index.scss +2 -2
- package/components/oxy-backtop/oxy-backtop.vue +2 -0
- package/components/oxy-badge/oxy-badge.vue +2 -0
- package/components/oxy-badge/types.ts +3 -0
- package/components/oxy-button/index.scss +13 -13
- package/components/oxy-button/oxy-button.vue +11 -0
- package/components/oxy-button/types.ts +3 -3
- package/components/oxy-calendar/index.scss +17 -17
- package/components/oxy-calendar/oxy-calendar.vue +31 -0
- package/components/oxy-calendar/types.ts +3 -0
- package/components/oxy-calendar-view/month/month.vue +2 -0
- package/components/oxy-calendar-view/monthPanel/month-panel.vue +3 -1
- package/components/oxy-calendar-view/monthPanel/types.ts +10 -7
- package/components/oxy-calendar-view/oxy-calendar-view.vue +2 -0
- package/components/oxy-calendar-view/types.ts +3 -1
- package/components/oxy-calendar-view/year/types.ts +33 -1
- package/components/oxy-calendar-view/year/year.vue +2 -0
- package/components/oxy-calendar-view/yearPanel/year-panel.vue +2 -0
- package/components/oxy-card/index.scss +1 -1
- package/components/oxy-card/oxy-card.vue +2 -0
- package/components/oxy-cell/index.scss +3 -1
- package/components/oxy-cell/oxy-cell.vue +6 -4
- package/components/oxy-cell-group/oxy-cell-group.vue +2 -0
- package/components/oxy-checkbox/index.scss +7 -7
- package/components/oxy-checkbox/oxy-checkbox.vue +22 -16
- package/components/oxy-checkbox/types.ts +9 -0
- package/components/oxy-checkbox-group/index.scss +1 -1
- package/components/oxy-checkbox-group/oxy-checkbox-group.vue +2 -0
- package/components/oxy-circle/oxy-circle.vue +2 -0
- package/components/oxy-col/oxy-col.vue +3 -1
- package/components/oxy-col-picker/index.scss +3 -3
- package/components/oxy-col-picker/oxy-col-picker.vue +17 -1
- package/components/oxy-col-picker/types.ts +3 -0
- package/components/oxy-collapse/index.scss +2 -2
- package/components/oxy-collapse/oxy-collapse.vue +9 -0
- package/components/oxy-collapse-item/oxy-collapse-item.vue +4 -2
- package/components/oxy-config-provider/oxy-config-provider.vue +18 -0
- package/components/oxy-config-provider/types.ts +18 -0
- package/components/oxy-corner/index.scss +50 -32
- package/components/oxy-corner/oxy-corner.vue +2 -0
- package/components/oxy-count-down/oxy-count-down.vue +2 -0
- package/components/oxy-count-to/oxy-count-to.vue +12 -1
- package/components/oxy-count-to/types.ts +14 -4
- package/components/oxy-curtain/index.scss +10 -9
- package/components/oxy-curtain/oxy-curtain.vue +2 -0
- package/components/oxy-date-strip/oxy-date-strip.vue +22 -1
- package/components/oxy-date-strip-item/index.scss +4 -4
- package/components/oxy-date-strip-item/oxy-date-strip-item.vue +2 -0
- package/components/oxy-datetime-picker/index.scss +3 -3
- package/components/oxy-datetime-picker/oxy-datetime-picker.vue +11 -1
- package/components/oxy-datetime-picker-view/oxy-datetime-picker-view.vue +2 -0
- package/components/oxy-divider/oxy-divider.vue +2 -0
- package/components/oxy-drop-menu/index.scss +2 -2
- package/components/oxy-drop-menu/oxy-drop-menu.vue +3 -0
- package/components/oxy-drop-menu-item/index.scss +1 -1
- package/components/oxy-drop-menu-item/oxy-drop-menu-item.vue +17 -9
- package/components/oxy-echarts/oxy-echarts.vue +2 -0
- package/components/oxy-fab/index.scss +1 -1
- package/components/oxy-fab/oxy-fab.vue +27 -0
- package/components/oxy-file-list/index.scss +9 -9
- package/components/oxy-file-list/oxy-file-list.vue +29 -17
- package/components/oxy-floating-panel/oxy-floating-panel.vue +34 -10
- package/components/oxy-footer/index.scss +7 -0
- package/components/oxy-footer/oxy-footer.vue +4 -2
- package/components/oxy-footer/types.ts +9 -6
- package/components/oxy-form/oxy-form.vue +13 -1
- package/components/oxy-form-item/oxy-form-item.vue +5 -3
- package/components/oxy-gap/oxy-gap.vue +2 -0
- package/components/oxy-global-loading/oxy-global-loading.vue +18 -5
- package/components/oxy-global-message/oxy-global-message.vue +30 -17
- package/components/oxy-global-toast/oxy-global-toast.vue +18 -5
- package/components/oxy-grid/oxy-grid.vue +6 -0
- package/components/oxy-grid-item/index.scss +1 -1
- package/components/oxy-grid-item/oxy-grid-item.vue +22 -20
- package/components/oxy-guidance/index.scss +9 -9
- package/components/oxy-guidance/oxy-guidance.vue +22 -16
- package/components/oxy-icon/oxy-icon.vue +2 -0
- package/components/oxy-icon/types.ts +3 -0
- package/components/oxy-image-preview/index.scss +75 -0
- package/components/oxy-image-preview/index.ts +56 -0
- package/components/oxy-image-preview/oxy-image-preview.vue +221 -0
- package/components/oxy-image-preview/types.ts +164 -0
- package/components/oxy-img/oxy-img.vue +2 -0
- package/components/oxy-img-cropper/index.scss +2 -2
- package/components/oxy-img-cropper/oxy-img-cropper.vue +6 -0
- package/components/oxy-img-lazy/oxy-img-lazy.vue +9 -0
- package/components/oxy-index-anchor/index.scss +1 -1
- package/components/oxy-index-anchor/oxy-index-anchor.vue +2 -2
- package/components/oxy-index-bar/index.scss +1 -1
- package/components/oxy-index-bar/oxy-index-bar.vue +18 -0
- package/components/oxy-input/index.scss +2 -1
- package/components/oxy-input/oxy-input.vue +18 -4
- package/components/oxy-input/types.ts +6 -0
- package/components/oxy-input-number/index.scss +3 -1
- package/components/oxy-input-number/oxy-input-number.vue +2 -0
- package/components/oxy-keyboard/index.scss +3 -3
- package/components/oxy-keyboard/key/index.vue +2 -0
- package/components/oxy-keyboard/oxy-keyboard.vue +11 -2
- package/components/oxy-link/index.scss +8 -4
- package/components/oxy-link/oxy-link.vue +9 -3
- package/components/oxy-link/types.ts +2 -2
- package/components/oxy-list/oxy-list.vue +2 -0
- package/components/oxy-list/types.ts +7 -0
- package/components/oxy-loading/oxy-loading.vue +6 -0
- package/components/oxy-loadmore/index.scss +1 -1
- package/components/oxy-loadmore/oxy-loadmore.vue +2 -0
- package/components/oxy-long-press-menu/index.scss +1 -1
- package/components/oxy-long-press-menu/oxy-long-press-menu.vue +42 -13
- package/components/oxy-message-box/index.scss +223 -36
- package/components/oxy-message-box/index.ts +49 -23
- package/components/oxy-message-box/oxy-message-box.vue +181 -56
- package/components/oxy-message-box/types.ts +60 -2
- package/components/oxy-navbar/index.scss +1 -1
- package/components/oxy-navbar/oxy-navbar.vue +9 -6
- package/components/oxy-navbar-capsule/oxy-navbar-capsule.vue +2 -0
- package/components/oxy-notice-bar/index.scss +1 -1
- package/components/oxy-notice-bar/oxy-notice-bar.vue +29 -0
- package/components/oxy-notify/index.ts +16 -12
- package/components/oxy-notify/oxy-notify.vue +11 -4
- package/components/oxy-overlay/oxy-overlay.vue +34 -2
- package/components/oxy-pagination/oxy-pagination.vue +2 -0
- package/components/oxy-password-input/oxy-password-input.vue +2 -0
- package/components/oxy-picker/index.scss +7 -7
- package/components/oxy-picker/oxy-picker.vue +11 -0
- package/components/oxy-picker-view/index.scss +1 -1
- package/components/oxy-picker-view/oxy-picker-view.vue +2 -0
- package/components/oxy-popover/index.scss +2 -2
- package/components/oxy-popover/oxy-popover.vue +4 -1
- package/components/oxy-popup/oxy-popup.vue +8 -0
- package/components/oxy-progress/index.scss +2 -2
- package/components/oxy-progress/oxy-progress.vue +7 -0
- package/components/oxy-qrcode/draw.ts +15 -1
- package/components/oxy-qrcode/oxy-qrcode.vue +10 -3
- package/components/oxy-radio/index.scss +8 -8
- package/components/oxy-radio/oxy-radio.vue +13 -11
- package/components/oxy-radio-group/index.scss +1 -1
- package/components/oxy-radio-group/oxy-radio-group.vue +2 -0
- package/components/oxy-rate/oxy-rate.vue +5 -0
- package/components/oxy-rate/types.ts +2 -2
- package/components/oxy-resize/oxy-resize.vue +12 -0
- package/components/oxy-rich-text/index.scss +9 -9
- package/components/oxy-rich-text/oxy-rich-text.vue +6 -0
- package/components/oxy-rich-text/types.ts +15 -0
- package/components/oxy-root-portal/oxy-root-portal.vue +23 -15
- package/components/oxy-row/oxy-row.vue +2 -0
- package/components/oxy-search/index.scss +3 -3
- package/components/oxy-search/oxy-search.vue +19 -0
- package/components/oxy-segmented/index.scss +4 -4
- package/components/oxy-segmented/oxy-segmented.vue +2 -0
- package/components/oxy-select/index.scss +25 -25
- package/components/oxy-select/oxy-select.vue +27 -0
- package/components/oxy-select/types.ts +3 -0
- package/components/oxy-select-picker/index.scss +5 -5
- package/components/oxy-select-picker/oxy-select-picker.vue +7 -0
- package/components/oxy-sidebar/oxy-sidebar.vue +2 -0
- package/components/oxy-sidebar-item/index.scss +3 -3
- package/components/oxy-sidebar-item/oxy-sidebar-item.vue +17 -31
- package/components/oxy-signature/oxy-signature.vue +17 -0
- package/components/oxy-skeleton/oxy-skeleton.vue +7 -1
- package/components/oxy-slide-verify/index.scss +95 -0
- package/components/oxy-slide-verify/oxy-slide-verify.vue +244 -0
- package/components/oxy-slide-verify/types.ts +98 -0
- package/components/oxy-slider/oxy-slider.vue +3 -0
- package/components/oxy-sort-button/index.scss +10 -8
- package/components/oxy-sort-button/oxy-sort-button.vue +6 -0
- package/components/oxy-splitter/index.scss +9 -0
- package/components/oxy-splitter/oxy-splitter.vue +23 -2
- package/components/oxy-splitter-panel/index.scss +7 -5
- package/components/oxy-splitter-panel/oxy-splitter-panel.vue +93 -89
- package/components/oxy-status-tip/index.scss +3 -3
- package/components/oxy-status-tip/oxy-status-tip.vue +2 -0
- package/components/oxy-step/index.scss +4 -4
- package/components/oxy-step/oxy-step.vue +15 -13
- package/components/oxy-steps/oxy-steps.vue +2 -0
- package/components/oxy-sticky/oxy-sticky.vue +5 -3
- package/components/oxy-stream-render/oxy-stream-render.vue +29 -0
- package/components/oxy-swipe-action/oxy-swipe-action.vue +8 -0
- package/components/oxy-swiper/oxy-swiper.vue +6 -0
- package/components/oxy-swiper-nav/index.scss +4 -4
- package/components/oxy-switch/index.scss +6 -3
- package/components/oxy-switch/oxy-switch.vue +10 -0
- package/components/oxy-tab/index.scss +1 -7
- package/components/oxy-tab/oxy-tab.vue +12 -10
- package/components/oxy-tabbar/oxy-tabbar.vue +5 -0
- package/components/oxy-tabbar-item/oxy-tabbar-item.vue +11 -9
- package/components/oxy-table/index.scss +1 -1
- package/components/oxy-table/oxy-table.vue +8 -0
- package/components/oxy-table/types.ts +3 -0
- package/components/oxy-table-col/oxy-table-col.vue +21 -19
- package/components/oxy-tabs/index.scss +11 -11
- package/components/oxy-tabs/oxy-tabs.vue +17 -0
- package/components/oxy-tag/index.scss +24 -5
- package/components/oxy-tag/oxy-tag.vue +17 -2
- package/components/oxy-tag/types.ts +7 -0
- package/components/oxy-text/oxy-text.vue +12 -1
- package/components/oxy-textarea/index.scss +3 -2
- package/components/oxy-textarea/oxy-textarea.vue +10 -4
- package/components/oxy-toast/index.ts +21 -20
- package/components/oxy-toast/oxy-toast.vue +30 -5
- package/components/oxy-toast/types.ts +20 -9
- package/components/oxy-tooltip/index.scss +1 -1
- package/components/oxy-tooltip/oxy-tooltip.vue +2 -0
- package/components/oxy-transition/index.scss +3 -1
- package/components/oxy-transition/oxy-transition.vue +14 -0
- package/components/oxy-tree/index.scss +3 -3
- package/components/oxy-tree/oxy-tree.vue +28 -5
- package/components/oxy-tree/types.ts +57 -1
- package/components/oxy-upload/index.scss +9 -9
- package/components/oxy-upload/oxy-upload.vue +5 -3
- package/components/oxy-verification-code/oxy-verification-code.vue +24 -0
- package/components/oxy-video-preview/index.scss +12 -7
- package/components/oxy-video-preview/index.ts +64 -0
- package/components/oxy-video-preview/oxy-video-preview.vue +102 -31
- package/components/oxy-video-preview/types.ts +54 -8
- package/components/oxy-virtual-scroll/index.scss +1 -1
- package/components/oxy-virtual-scroll/oxy-virtual-scroll.vue +2 -0
- package/components/oxy-voice-player/index.scss +64 -64
- package/components/oxy-voice-player/oxy-voice-player.vue +38 -10
- package/components/oxy-waterfall/oxy-waterfall.vue +13 -0
- package/components/oxy-waterfall/types.ts +7 -0
- package/components/oxy-waterfall-item/oxy-waterfall-item.vue +9 -0
- package/components/oxy-watermark/oxy-watermark.vue +2 -0
- package/global.d.ts +2 -0
- package/index.ts +2 -0
- package/locale/lang/en-US.ts +51 -2
- package/locale/lang/zh-CN.ts +51 -2
- package/package.json +2 -2
- package/styles/all.scss +125 -0
- package/tags.json +1 -1
- package/vite-plugins/vite-plugin-host-class.ts +166 -0
- package/web-types.json +1 -1
|
@@ -19,7 +19,7 @@ $-voice-player-cover-center-shadow: var(--oxy-voice-player-cover-center-shadow,
|
|
|
19
19
|
$-voice-player-cover-center-dot-shadow: var(--oxy-voice-player-cover-center-dot-shadow, inset 0 1rpx 3rpx rgba(0, 0, 0, 0.3)) !default;
|
|
20
20
|
|
|
21
21
|
$-voice-player-title-fs: var(--oxy-voice-player-title-fs, 40rpx) !default;
|
|
22
|
-
$-voice-player-title-color: var(--oxy-voice-player-title-color,
|
|
22
|
+
$-voice-player-title-color: var(--oxy-voice-player-title-color, $-color-white) !default;
|
|
23
23
|
$-voice-player-title-shadow: var(--oxy-voice-player-title-shadow, 0 2rpx 8rpx rgba(0, 0, 0, 0.2)) !default;
|
|
24
24
|
$-voice-player-artist-fs: var(--oxy-voice-player-artist-fs, 30rpx) !default;
|
|
25
25
|
$-voice-player-artist-color: var(--oxy-voice-player-artist-color, rgba(255, 255, 255, 0.9)) !default;
|
|
@@ -32,7 +32,7 @@ $-voice-player-lyric-expanded-height: var(--oxy-voice-player-lyric-expanded-heig
|
|
|
32
32
|
$-voice-player-lyric-fs: var(--oxy-voice-player-lyric-fs, 32rpx) !default;
|
|
33
33
|
$-voice-player-lyric-color: var(--oxy-voice-player-lyric-color, rgba(255, 255, 255, 0.7)) !default;
|
|
34
34
|
$-voice-player-lyric-active-fs: var(--oxy-voice-player-lyric-active-fs, 36rpx) !default;
|
|
35
|
-
$-voice-player-lyric-active-color: var(--oxy-voice-player-lyric-active-color,
|
|
35
|
+
$-voice-player-lyric-active-color: var(--oxy-voice-player-lyric-active-color, $-color-white) !default;
|
|
36
36
|
$-voice-player-lyric-active-shadow: var(--oxy-voice-player-lyric-active-shadow, 0 2rpx 8rpx rgba(0, 0, 0, 0.3)) !default;
|
|
37
37
|
$-voice-player-lyric-translation-fs: var(--oxy-voice-player-lyric-translation-fs, 26rpx) !default;
|
|
38
38
|
$-voice-player-lyric-translation-color: var(--oxy-voice-player-lyric-translation-color, rgba(255, 255, 255, 0.5)) !default;
|
|
@@ -49,7 +49,7 @@ $-voice-player-progress-buffered-bg: var(--oxy-voice-player-progress-buffered-bg
|
|
|
49
49
|
$-voice-player-progress-filled-bg: var(--oxy-voice-player-progress-filled-bg, linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%)) !default;
|
|
50
50
|
$-voice-player-progress-shadow: var(--oxy-voice-player-progress-shadow, 0 0 8rpx rgba(255, 255, 255, 0.3)) !default;
|
|
51
51
|
$-voice-player-progress-dot-size: var(--oxy-voice-player-progress-dot-size, 24rpx) !default;
|
|
52
|
-
$-voice-player-progress-dot-bg: var(--oxy-voice-player-progress-dot-bg,
|
|
52
|
+
$-voice-player-progress-dot-bg: var(--oxy-voice-player-progress-dot-bg, $-color-white) !default;
|
|
53
53
|
$-voice-player-progress-dot-shadow: var(--oxy-voice-player-progress-dot-shadow, 0 2rpx 8rpx rgba(0, 0, 0, 0.2), 0 0 0 4rpx rgba(255, 255, 255, 0.2)) !default;
|
|
54
54
|
$-voice-player-progress-dot-active-shadow: var(--oxy-voice-player-progress-dot-active-shadow, 0 4rpx 16rpx rgba(0, 0, 0, 0.3), 0 0 0 6rpx rgba(255, 255, 255, 0.15)) !default;
|
|
55
55
|
|
|
@@ -60,10 +60,10 @@ $-voice-player-control-btn-active-shadow: var(--oxy-voice-player-control-btn-act
|
|
|
60
60
|
$-voice-player-control-btn-play-size: var(--oxy-voice-player-control-btn-play-size, 100rpx) !default;
|
|
61
61
|
$-voice-player-control-btn-play-bg: var(--oxy-voice-player-control-btn-play-bg, resultColor(135deg, $-color-theme, 'dark' 'light', #667eea #764ba2, 0% 100%)) !default;
|
|
62
62
|
$-voice-player-control-icon-fs: var(--oxy-voice-player-control-icon-fs, 60rpx) !default;
|
|
63
|
-
$-voice-player-control-icon-color: var(--oxy-voice-player-control-icon-color,
|
|
63
|
+
$-voice-player-control-icon-color: var(--oxy-voice-player-control-icon-color, $-color-white) !default;
|
|
64
64
|
$-voice-player-control-icon-shadow: var(--oxy-voice-player-control-icon-shadow, 0 2rpx 4rpx rgba(0, 0, 0, 0.2)) !default;
|
|
65
65
|
$-voice-player-control-btn-icon-fs: var(--oxy-voice-player-control-btn-icon-fs, 80rpx) !default;
|
|
66
|
-
$-voice-player-control-btn-icon-color: var(--oxy-voice-player-control-btn-icon-color,
|
|
66
|
+
$-voice-player-control-btn-icon-color: var(--oxy-voice-player-control-btn-icon-color, $-color-white) !default;
|
|
67
67
|
$-voice-player-control-btn-icon-shadow: var(--oxy-voice-player-control-btn-icon-shadow, 0 2rpx 4rpx rgba(0, 0, 0, 0.2)) !default;
|
|
68
68
|
|
|
69
69
|
$-voice-player-extra-btn-size: var(--oxy-voice-player-extra-btn-size, 72rpx) !default;
|
|
@@ -71,7 +71,7 @@ $-voice-player-extra-btn-bg: var(--oxy-voice-player-extra-btn-bg, rgba(255, 255,
|
|
|
71
71
|
$-voice-player-extra-btn-shadow: var(--oxy-voice-player-extra-btn-shadow, 0 2rpx 8rpx rgba(0, 0, 0, 0.1)) !default;
|
|
72
72
|
$-voice-player-extra-btn-active-shadow: var(--oxy-voice-player-extra-btn-active-shadow, 0 1rpx 4rpx rgba(0, 0, 0, 0.15)) !default;
|
|
73
73
|
$-voice-player-extra-btn-icon-fs: var(--oxy-voice-player-extra-btn-icon-fs, 40rpx) !default;
|
|
74
|
-
$-voice-player-extra-btn-icon-color: var(--oxy-voice-player-extra-btn-icon-color,
|
|
74
|
+
$-voice-player-extra-btn-icon-color: var(--oxy-voice-player-extra-btn-icon-color, $-color-white) !default;
|
|
75
75
|
$-voice-player-extra-btn-icon-shadow: var(--oxy-voice-player-extra-btn-icon-shadow, 0 1rpx 2rpx rgba(0, 0, 0, 0.2)) !default;
|
|
76
76
|
$-voice-player-extra-btn-favorite-color: var(--oxy-voice-player-extra-btn-favorite-color, #ff4757) !default;
|
|
77
77
|
|
|
@@ -84,13 +84,13 @@ $-voice-player-volume-track-bg: var(--oxy-voice-player-volume-track-bg, rgba(255
|
|
|
84
84
|
$-voice-player-volume-filled-bg: var(--oxy-voice-player-volume-filled-bg, linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%)) !default;
|
|
85
85
|
$-voice-player-volume-shadow: var(--oxy-voice-player-volume-shadow, 0 0 6rpx rgba(255, 255, 255, 0.3)) !default;
|
|
86
86
|
$-voice-player-volume-dot-size: var(--oxy-voice-player-volume-dot-size, 20rpx) !default;
|
|
87
|
-
$-voice-player-volume-dot-bg: var(--oxy-voice-player-volume-dot-bg,
|
|
87
|
+
$-voice-player-volume-dot-bg: var(--oxy-voice-player-volume-dot-bg, $-color-white) !default;
|
|
88
88
|
$-voice-player-volume-dot-shadow: var(--oxy-voice-player-volume-dot-shadow, 0 2rpx 6rpx rgba(0, 0, 0, 0.15), 0 0 0 3rpx rgba(255, 255, 255, 0.2)) !default;
|
|
89
89
|
$-voice-player-volume-text-fs: var(--oxy-voice-player-volume-text-fs, 26rpx) !default;
|
|
90
90
|
$-voice-player-volume-text-color: var(--oxy-voice-player-volume-text-color, rgba(255, 255, 255, 0.9)) !default;
|
|
91
91
|
$-voice-player-volume-text-shadow: var(--oxy-voice-player-volume-text-shadow, 0 1rpx 2rpx rgba(0, 0, 0, 0.1)) !default;
|
|
92
92
|
|
|
93
|
-
$-voice-player-mini-padding: var(--oxy-voice-player-mini-padding,
|
|
93
|
+
$-voice-player-mini-padding: var(--oxy-voice-player-mini-padding, $-spacing-20 $-spacing-24) !default;
|
|
94
94
|
$-voice-player-mini-bg: var(--oxy-voice-player-mini-bg, linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%)) !default;
|
|
95
95
|
$-voice-player-mini-shadow: var(--oxy-voice-player-mini-shadow, 0 -4rpx 20rpx rgba(0, 0, 0, 0.1)) !default;
|
|
96
96
|
$-voice-player-mini-cover-size: var(--oxy-voice-player-mini-cover-size, 100rpx) !default;
|
|
@@ -101,7 +101,7 @@ $-voice-player-mini-cover-center-bg: var(--oxy-voice-player-mini-cover-center-bg
|
|
|
101
101
|
$-voice-player-mini-cover-center-shadow: var(--oxy-voice-player-mini-cover-center-shadow, inset 0 1rpx 4rpx rgba(0, 0, 0, 0.2), 0 1rpx 4rpx rgba(0, 0, 0, 0.15)) !default;
|
|
102
102
|
$-voice-player-mini-cover-center-dot-shadow: var(--oxy-voice-player-mini-cover-center-dot-shadow, inset 0 1rpx 2rpx rgba(0, 0, 0, 0.3)) !default;
|
|
103
103
|
$-voice-player-mini-title-fs: var(--oxy-voice-player-mini-title-fs, 28rpx) !default;
|
|
104
|
-
$-voice-player-mini-title-color: var(--oxy-voice-player-mini-title-color,
|
|
104
|
+
$-voice-player-mini-title-color: var(--oxy-voice-player-mini-title-color, $-color-white) !default;
|
|
105
105
|
$-voice-player-mini-title-shadow: var(--oxy-voice-player-mini-title-shadow, 0 1rpx 2rpx rgba(0, 0, 0, 0.1)) !default;
|
|
106
106
|
$-voice-player-mini-artist-fs: var(--oxy-voice-player-mini-artist-fs, 24rpx) !default;
|
|
107
107
|
$-voice-player-mini-artist-color: var(--oxy-voice-player-mini-artist-color, rgba(255, 255, 255, 0.8)) !default;
|
|
@@ -110,17 +110,17 @@ $-voice-player-mini-control-btn-play-size: var(--oxy-voice-player-mini-control-b
|
|
|
110
110
|
$-voice-player-mini-control-btn-play-bg: var(--oxy-voice-player-mini-control-btn-play-bg, rgba(255, 255, 255, 0.3)) !default;
|
|
111
111
|
$-voice-player-mini-control-btn-play-shadow: var(--oxy-voice-player-mini-control-btn-play-shadow, 0 4rpx 12rpx rgba(0, 0, 0, 0.2)) !default;
|
|
112
112
|
$-voice-player-mini-btn-icon-fs: var(--oxy-voice-player-mini-btn-icon-fs, 32rpx) !default;
|
|
113
|
-
$-voice-player-mini-btn-icon-color: var(--oxy-voice-player-mini-btn-icon-color,
|
|
113
|
+
$-voice-player-mini-btn-icon-color: var(--oxy-voice-player-mini-btn-icon-color, $-color-white) !default;
|
|
114
114
|
$-voice-player-mini-btn-icon-shadow: var(--oxy-voice-player-mini-btn-icon-shadow, 0 1rpx 2rpx rgba(0, 0, 0, 0.2)) !default;
|
|
115
115
|
$-voice-player-mini-progress-height: var(--oxy-voice-player-mini-progress-height, 3rpx) !default;
|
|
116
116
|
$-voice-player-mini-progress-bg: var(--oxy-voice-player-mini-progress-bg, rgba(255, 255, 255, 0.12)) !default;
|
|
117
117
|
$-voice-player-mini-progress-bar-bg: var(--oxy-voice-player-mini-progress-bar-bg, linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%)) !default;
|
|
118
118
|
$-voice-player-mini-progress-shadow: var(--oxy-voice-player-mini-progress-shadow, 0 0 8rpx rgba(255, 255, 255, 0.4)) !default;
|
|
119
119
|
$-voice-player-mini-progress-dot-size: var(--oxy-voice-player-mini-progress-dot-size, 12rpx) !default;
|
|
120
|
-
$-voice-player-mini-progress-dot-bg: var(--oxy-voice-player-mini-progress-dot-bg,
|
|
120
|
+
$-voice-player-mini-progress-dot-bg: var(--oxy-voice-player-mini-progress-dot-bg, $-color-white) !default;
|
|
121
121
|
$-voice-player-mini-progress-dot-shadow: var(--oxy-voice-player-mini-progress-dot-shadow, 0 2rpx 6rpx rgba(0, 0, 0, 0.2), 0 0 0 2rpx rgba(255, 255, 255, 0.3)) !default;
|
|
122
122
|
|
|
123
|
-
$-voice-player-simple-padding: var(--oxy-voice-player-simple-padding,
|
|
123
|
+
$-voice-player-simple-padding: var(--oxy-voice-player-simple-padding, $-spacing-16 $-spacing-20) !default;
|
|
124
124
|
$-voice-player-simple-bg: var(--oxy-voice-player-simple-bg, transparent) !default;
|
|
125
125
|
$-voice-player-simple-radius: var(--oxy-voice-player-simple-radius, 12rpx) !default;
|
|
126
126
|
$-voice-player-simple-time-fs: var(--oxy-voice-player-simple-time-fs, 24rpx) !default;
|
|
@@ -131,7 +131,7 @@ $-voice-player-simple-progress-bg: var(--oxy-voice-player-simple-progress-bg, rg
|
|
|
131
131
|
$-voice-player-simple-progress-filled-bg: var(--oxy-voice-player-simple-progress-filled-bg, linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%)) !default;
|
|
132
132
|
$-voice-player-simple-progress-shadow: var(--oxy-voice-player-simple-progress-shadow, 0 0 6rpx rgba(0, 0, 0, 0.2)) !default;
|
|
133
133
|
$-voice-player-simple-progress-dot-size: var(--oxy-voice-player-simple-progress-dot-size, 16rpx) !default;
|
|
134
|
-
$-voice-player-simple-progress-dot-bg: var(--oxy-voice-player-simple-progress-dot-bg,
|
|
134
|
+
$-voice-player-simple-progress-dot-bg: var(--oxy-voice-player-simple-progress-dot-bg, $-color-white) !default;
|
|
135
135
|
$-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progress-dot-shadow, 0 2rpx 6rpx rgba(0, 0, 0, 0.2), 0 0 0 3rpx rgba(0, 0, 0, 0.1)) !default;
|
|
136
136
|
|
|
137
137
|
@include b(voice-player) {
|
|
@@ -140,7 +140,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
140
140
|
overflow: hidden;
|
|
141
141
|
position: relative;
|
|
142
142
|
box-shadow: $-voice-player-shadow;
|
|
143
|
-
transition: all
|
|
143
|
+
transition: all $-transition-duration-slow $-transition-timing-function-base;
|
|
144
144
|
--oxy-slider-handle-radius: 18rpx;
|
|
145
145
|
--oxy-slider-axie-height: 6rpx;
|
|
146
146
|
&::before {
|
|
@@ -200,14 +200,14 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
200
200
|
overflow: hidden;
|
|
201
201
|
width: 100%;
|
|
202
202
|
min-height: 200rpx;
|
|
203
|
-
padding:
|
|
203
|
+
padding: $-spacing-40;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
@include e(cover-section) {
|
|
207
207
|
display: flex;
|
|
208
208
|
justify-content: center;
|
|
209
|
-
margin-bottom:
|
|
210
|
-
transition: all
|
|
209
|
+
margin-bottom: $-spacing-40;
|
|
210
|
+
transition: all $-transition-duration-slow $-transition-timing-function-base;
|
|
211
211
|
opacity: 1;
|
|
212
212
|
transform: translateX(0);
|
|
213
213
|
max-height: 500rpx;
|
|
@@ -241,7 +241,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
241
241
|
position: relative;
|
|
242
242
|
overflow: hidden;
|
|
243
243
|
box-shadow: $-voice-player-cover-shadow;
|
|
244
|
-
transition: all
|
|
244
|
+
transition: all $-transition-duration-slow $-transition-timing-function-base;
|
|
245
245
|
transform-origin: center center;
|
|
246
246
|
|
|
247
247
|
@include when(rotating) {
|
|
@@ -272,7 +272,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
272
272
|
border-radius: $-radius-circle;
|
|
273
273
|
background: $-voice-player-cover-center-bg;
|
|
274
274
|
box-shadow: $-voice-player-cover-center-shadow;
|
|
275
|
-
z-index:
|
|
275
|
+
z-index: $-z-index-sticky;
|
|
276
276
|
|
|
277
277
|
&::before {
|
|
278
278
|
content: '';
|
|
@@ -290,8 +290,8 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
290
290
|
|
|
291
291
|
@include e(info) {
|
|
292
292
|
text-align: center;
|
|
293
|
-
margin-bottom:
|
|
294
|
-
transition: all
|
|
293
|
+
margin-bottom: $-spacing-40;
|
|
294
|
+
transition: all $-transition-duration-slow $-transition-timing-function-base;
|
|
295
295
|
opacity: 1;
|
|
296
296
|
transform: translateX(0);
|
|
297
297
|
max-height: 200rpx;
|
|
@@ -313,7 +313,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
313
313
|
font-size: $-voice-player-title-fs;
|
|
314
314
|
font-weight: $-fw-semibold;
|
|
315
315
|
color: $-voice-player-title-color;
|
|
316
|
-
margin-bottom:
|
|
316
|
+
margin-bottom: $-spacing-20;
|
|
317
317
|
text-shadow: $-voice-player-title-shadow;
|
|
318
318
|
letter-spacing: 1rpx;
|
|
319
319
|
}
|
|
@@ -322,7 +322,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
322
322
|
display: block;
|
|
323
323
|
font-size: $-voice-player-artist-fs;
|
|
324
324
|
color: $-voice-player-artist-color;
|
|
325
|
-
margin-bottom:
|
|
325
|
+
margin-bottom: $-spacing-12;
|
|
326
326
|
text-shadow: $-voice-player-artist-shadow;
|
|
327
327
|
}
|
|
328
328
|
|
|
@@ -334,14 +334,14 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
334
334
|
|
|
335
335
|
@include e(lyrics) {
|
|
336
336
|
height: $-voice-player-lyric-height;
|
|
337
|
-
margin-bottom:
|
|
338
|
-
transition: all
|
|
337
|
+
margin-bottom: $-spacing-32;
|
|
338
|
+
transition: all $-transition-duration-slow $-transition-timing-function-base;
|
|
339
339
|
background: transparent;
|
|
340
340
|
overflow: hidden;
|
|
341
341
|
|
|
342
342
|
@include when(expanded) {
|
|
343
343
|
height: $-voice-player-lyric-expanded-height;
|
|
344
|
-
margin-bottom:
|
|
344
|
+
margin-bottom: $-spacing-40;
|
|
345
345
|
background: transparent;
|
|
346
346
|
}
|
|
347
347
|
}
|
|
@@ -349,14 +349,14 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
349
349
|
@include e(lyrics-container) {
|
|
350
350
|
height: 100%;
|
|
351
351
|
overflow-y: auto;
|
|
352
|
-
padding:
|
|
352
|
+
padding: $-spacing-20 0;
|
|
353
353
|
background: transparent;
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
@include e(lyric-line) {
|
|
357
|
-
padding:
|
|
357
|
+
padding: $-spacing-16 $-spacing-32;
|
|
358
358
|
text-align: center;
|
|
359
|
-
transition: all
|
|
359
|
+
transition: all $-transition-duration-slow $-transition-timing-function-base;
|
|
360
360
|
|
|
361
361
|
@include when(active) {
|
|
362
362
|
.oxy-voice-player__lyric-text {
|
|
@@ -369,7 +369,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
369
369
|
.oxy-voice-player__lyric-translation {
|
|
370
370
|
font-size: $-voice-player-lyric-translation-fs;
|
|
371
371
|
color: $-voice-player-lyric-translation-active-color;
|
|
372
|
-
margin-top:
|
|
372
|
+
margin-top: $-spacing-8;
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
}
|
|
@@ -379,7 +379,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
379
379
|
font-size: $-voice-player-lyric-fs;
|
|
380
380
|
color: $-voice-player-lyric-color;
|
|
381
381
|
line-height: 1.6;
|
|
382
|
-
transition: all
|
|
382
|
+
transition: all $-transition-duration-slow $-transition-timing-function-base;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
@include e(lyric-translation) {
|
|
@@ -387,19 +387,19 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
387
387
|
font-size: $-voice-player-lyric-translation-fs;
|
|
388
388
|
color: $-voice-player-lyric-translation-color;
|
|
389
389
|
line-height: 1.5;
|
|
390
|
-
margin-top:
|
|
391
|
-
transition: all
|
|
390
|
+
margin-top: $-spacing-8;
|
|
391
|
+
transition: all $-transition-duration-slow $-transition-timing-function-base;
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
@include e(progress-section) {
|
|
395
|
-
margin-bottom:
|
|
395
|
+
margin-bottom: $-spacing-12;
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
@include e(time-info) {
|
|
399
399
|
display: flex;
|
|
400
400
|
justify-content: space-between;
|
|
401
401
|
align-items: center;
|
|
402
|
-
margin-bottom:
|
|
402
|
+
margin-bottom: $-spacing-20;
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
@include e(current-time) {
|
|
@@ -419,7 +419,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
419
419
|
@include e(slider-wrapper) {
|
|
420
420
|
position: relative;
|
|
421
421
|
width: 100%;
|
|
422
|
-
padding:
|
|
422
|
+
padding: $-spacing-32 0;
|
|
423
423
|
// #ifdef H5
|
|
424
424
|
touch-action: none;
|
|
425
425
|
// #endif
|
|
@@ -441,8 +441,8 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
441
441
|
height: 6rpx;
|
|
442
442
|
background: $-voice-player-progress-buffered-bg;
|
|
443
443
|
border-radius: $-voice-player-progress-radius;
|
|
444
|
-
transition: width
|
|
445
|
-
z-index:
|
|
444
|
+
transition: width $-transition-duration-slow $-transition-timing-function-base;
|
|
445
|
+
z-index: $-z-index-sticky;
|
|
446
446
|
transform: translateY(-50%);
|
|
447
447
|
}
|
|
448
448
|
|
|
@@ -453,8 +453,8 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
453
453
|
height: 100%;
|
|
454
454
|
background: $-voice-player-progress-filled-bg;
|
|
455
455
|
border-radius: $-voice-player-progress-radius;
|
|
456
|
-
transition: width
|
|
457
|
-
z-index:
|
|
456
|
+
transition: width $-transition-duration-fast linear;
|
|
457
|
+
z-index: $-z-index-sticky;
|
|
458
458
|
box-shadow: $-voice-player-progress-shadow;
|
|
459
459
|
}
|
|
460
460
|
|
|
@@ -485,7 +485,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
485
485
|
width: 100%;
|
|
486
486
|
height: 100%;
|
|
487
487
|
opacity: 0;
|
|
488
|
-
z-index:
|
|
488
|
+
z-index: $-z-index-sticky;
|
|
489
489
|
margin: 0;
|
|
490
490
|
}
|
|
491
491
|
|
|
@@ -494,7 +494,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
494
494
|
display: flex;
|
|
495
495
|
justify-content: center;
|
|
496
496
|
align-items: center;
|
|
497
|
-
gap:
|
|
497
|
+
gap: $-spacing-40;
|
|
498
498
|
|
|
499
499
|
}
|
|
500
500
|
|
|
@@ -502,8 +502,8 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
502
502
|
display: flex;
|
|
503
503
|
justify-content: center;
|
|
504
504
|
align-items: center;
|
|
505
|
-
gap:
|
|
506
|
-
margin-top:
|
|
505
|
+
gap: $-spacing-32;
|
|
506
|
+
margin-top: $-spacing-32;
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
509
|
|
|
@@ -583,9 +583,9 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
583
583
|
@include e(volume-panel) {
|
|
584
584
|
display: flex;
|
|
585
585
|
align-items: center;
|
|
586
|
-
gap:
|
|
587
|
-
margin-top:
|
|
588
|
-
padding: 0
|
|
586
|
+
gap: $-spacing-20;
|
|
587
|
+
margin-top: $-spacing-24;
|
|
588
|
+
padding: 0 $-spacing-32;
|
|
589
589
|
background: $-voice-player-volume-panel-bg;
|
|
590
590
|
border-radius: $-voice-player-volume-panel-radius;
|
|
591
591
|
box-shadow: $-voice-player-volume-panel-shadow;
|
|
@@ -594,7 +594,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
594
594
|
@include e(volume-slider-wrapper) {
|
|
595
595
|
flex: 1;
|
|
596
596
|
position: relative;
|
|
597
|
-
padding:
|
|
597
|
+
padding: $-spacing-24 0;
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
@include e(volume-track) {
|
|
@@ -612,7 +612,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
612
612
|
height: 100%;
|
|
613
613
|
background: $-voice-player-volume-filled-bg;
|
|
614
614
|
border-radius: $-voice-player-volume-track-radius;
|
|
615
|
-
transition: width
|
|
615
|
+
transition: width $-transition-duration-base $-transition-timing-function-base;
|
|
616
616
|
box-shadow: $-voice-player-volume-shadow;
|
|
617
617
|
}
|
|
618
618
|
|
|
@@ -637,7 +637,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
637
637
|
width: 100%;
|
|
638
638
|
height: 100%;
|
|
639
639
|
opacity: 0;
|
|
640
|
-
z-index:
|
|
640
|
+
z-index: $-z-index-sticky;
|
|
641
641
|
}
|
|
642
642
|
|
|
643
643
|
@include e(volume-text) {
|
|
@@ -667,7 +667,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
667
667
|
min-width: $-voice-player-mini-cover-size;
|
|
668
668
|
min-height: $-voice-player-mini-cover-size;
|
|
669
669
|
flex-shrink: 0;
|
|
670
|
-
margin-right:
|
|
670
|
+
margin-right: $-spacing-16;
|
|
671
671
|
}
|
|
672
672
|
|
|
673
673
|
@include e(mini-cover-disc) {
|
|
@@ -706,7 +706,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
706
706
|
border-radius: $-radius-circle;
|
|
707
707
|
background: $-voice-player-mini-cover-center-bg;
|
|
708
708
|
box-shadow: $-voice-player-mini-cover-center-shadow;
|
|
709
|
-
z-index:
|
|
709
|
+
z-index: $-z-index-sticky;
|
|
710
710
|
|
|
711
711
|
&::before {
|
|
712
712
|
content: '';
|
|
@@ -725,7 +725,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
725
725
|
@include e(mini-info) {
|
|
726
726
|
flex: 1;
|
|
727
727
|
min-width: 0;
|
|
728
|
-
margin-right:
|
|
728
|
+
margin-right: $-spacing-16;
|
|
729
729
|
overflow: hidden;
|
|
730
730
|
}
|
|
731
731
|
|
|
@@ -734,7 +734,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
734
734
|
font-size: $-voice-player-mini-title-fs;
|
|
735
735
|
font-weight: $-fw-semibold;
|
|
736
736
|
color: $-voice-player-mini-title-color;
|
|
737
|
-
margin-bottom:
|
|
737
|
+
margin-bottom: $-spacing-8;
|
|
738
738
|
overflow: hidden;
|
|
739
739
|
text-overflow: ellipsis;
|
|
740
740
|
white-space: nowrap;
|
|
@@ -753,7 +753,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
753
753
|
@include e(mini-controls) {
|
|
754
754
|
display: flex;
|
|
755
755
|
align-items: center;
|
|
756
|
-
gap:
|
|
756
|
+
gap: $-spacing-12;
|
|
757
757
|
}
|
|
758
758
|
|
|
759
759
|
@include e(mini-control-btn) {
|
|
@@ -803,7 +803,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
803
803
|
@include e(mini-progress-bar) {
|
|
804
804
|
height: 100%;
|
|
805
805
|
background: $-voice-player-mini-progress-bar-bg;
|
|
806
|
-
transition: width
|
|
806
|
+
transition: width $-transition-duration-fast linear;
|
|
807
807
|
box-shadow: $-voice-player-mini-progress-shadow;
|
|
808
808
|
position: relative;
|
|
809
809
|
|
|
@@ -819,7 +819,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
819
819
|
border-radius: $-radius-circle;
|
|
820
820
|
box-shadow: $-voice-player-mini-progress-dot-shadow;
|
|
821
821
|
opacity: 0;
|
|
822
|
-
transition: opacity
|
|
822
|
+
transition: opacity $-transition-duration-base $-transition-timing-function-base;
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
825
|
|
|
@@ -833,7 +833,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
833
833
|
display: flex;
|
|
834
834
|
justify-content: space-between;
|
|
835
835
|
align-items: center;
|
|
836
|
-
margin-bottom:
|
|
836
|
+
margin-bottom: $-spacing-12;
|
|
837
837
|
}
|
|
838
838
|
|
|
839
839
|
@include e(simple-current-time) {
|
|
@@ -856,7 +856,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
856
856
|
@include e(simple-slider-wrapper) {
|
|
857
857
|
position: relative;
|
|
858
858
|
width: 100%;
|
|
859
|
-
padding:
|
|
859
|
+
padding: $-spacing-32 0;
|
|
860
860
|
}
|
|
861
861
|
|
|
862
862
|
@include e(simple-progress-track) {
|
|
@@ -875,8 +875,8 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
875
875
|
height: 100%;
|
|
876
876
|
background: $-voice-player-simple-progress-filled-bg;
|
|
877
877
|
border-radius: $-voice-player-simple-progress-radius;
|
|
878
|
-
transition: width
|
|
879
|
-
z-index:
|
|
878
|
+
transition: width $-transition-duration-fast linear;
|
|
879
|
+
z-index: $-z-index-sticky;
|
|
880
880
|
box-shadow: $-voice-player-simple-progress-shadow;
|
|
881
881
|
|
|
882
882
|
&::after {
|
|
@@ -891,7 +891,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
891
891
|
border-radius: $-radius-circle;
|
|
892
892
|
box-shadow: $-voice-player-simple-progress-dot-shadow;
|
|
893
893
|
opacity: 0;
|
|
894
|
-
transition: opacity
|
|
894
|
+
transition: opacity $-transition-duration-base $-transition-timing-function-base;
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
897
|
|
|
@@ -902,7 +902,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
902
902
|
width: 100%;
|
|
903
903
|
height: 100%;
|
|
904
904
|
opacity: 0;
|
|
905
|
-
z-index:
|
|
905
|
+
z-index: $-z-index-sticky;
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
908
|
|
|
@@ -922,7 +922,7 @@ $-voice-player-simple-progress-dot-shadow: var(--oxy-voice-player-simple-progres
|
|
|
922
922
|
}
|
|
923
923
|
|
|
924
924
|
.oxy-voice-player__main-controls {
|
|
925
|
-
gap:
|
|
925
|
+
gap: $-spacing-24;
|
|
926
926
|
|
|
927
927
|
.oxy-voice-player__control-btn {
|
|
928
928
|
width: 72rpx;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</view>
|
|
28
28
|
|
|
29
29
|
<view v-if="showInfo" class="oxy-voice-player__info" :class="{ 'is-hidden': isCoverHidden }">
|
|
30
|
-
<text class="oxy-voice-player__song-title">{{ currentSong.title || '
|
|
30
|
+
<text class="oxy-voice-player__song-title">{{ currentSong.title || translate('unknownSong') }}</text>
|
|
31
31
|
<text v-if="currentSong.artist" class="oxy-voice-player__song-artist">{{ currentSong.artist }}</text>
|
|
32
32
|
<text v-if="currentSong.album" class="oxy-voice-player__song-album">{{ currentSong.album }}</text>
|
|
33
33
|
</view>
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
</view>
|
|
137
137
|
|
|
138
138
|
<view class="oxy-voice-player__mini-info">
|
|
139
|
-
<text class="oxy-voice-player__mini-title">{{ currentSong.title || '
|
|
139
|
+
<text class="oxy-voice-player__mini-title">{{ currentSong.title || translate('unknownSong') }}</text>
|
|
140
140
|
<text v-if="currentSong.artist" class="oxy-voice-player__mini-artist">{{ currentSong.artist }}</text>
|
|
141
141
|
</view>
|
|
142
142
|
|
|
@@ -194,7 +194,9 @@ export default {
|
|
|
194
194
|
name: 'oxy-voice-player',
|
|
195
195
|
options: {
|
|
196
196
|
addGlobalClass: true,
|
|
197
|
+
// #ifndef MP-TOUTIAO
|
|
197
198
|
virtualHost: true,
|
|
199
|
+
// #endif
|
|
198
200
|
styleIsolation: 'shared'
|
|
199
201
|
}
|
|
200
202
|
}
|
|
@@ -214,8 +216,10 @@ import {
|
|
|
214
216
|
type TouchEvent,
|
|
215
217
|
type TouchPoint
|
|
216
218
|
} from './types'
|
|
219
|
+
import { useTranslate } from '../composables/useTranslate'
|
|
217
220
|
const props = defineProps(voicePlayerProps)
|
|
218
221
|
const emit = defineEmits<VoicePlayerEmits>()
|
|
222
|
+
const { translate } = useTranslate('voicePlayer')
|
|
219
223
|
|
|
220
224
|
const isPlaying = ref(false)
|
|
221
225
|
const currentTime = ref(0)
|
|
@@ -374,6 +378,10 @@ function validateCurrentIndex() {
|
|
|
374
378
|
}
|
|
375
379
|
}
|
|
376
380
|
|
|
381
|
+
/**
|
|
382
|
+
* 获取缓冲时间:优先读取 buffered 属性,兼容不同平台的 TimeRanges 格式
|
|
383
|
+
* @param context - InnerAudioContext 实例
|
|
384
|
+
*/
|
|
377
385
|
function getBufferedTime(context: InnerAudioContext): number {
|
|
378
386
|
const bufferedValue = (context as InnerAudioContext & { buffered?: unknown }).buffered
|
|
379
387
|
if (typeof bufferedValue === 'number') {
|
|
@@ -389,6 +397,10 @@ function getBufferedTime(context: InnerAudioContext): number {
|
|
|
389
397
|
return 0
|
|
390
398
|
}
|
|
391
399
|
|
|
400
|
+
/**
|
|
401
|
+
* 初始化音频上下文:创建 InnerAudioContext,绑定播放/暂停/结束/错误等事件
|
|
402
|
+
* 同时处理 H5/App 端的缓冲进度获取
|
|
403
|
+
*/
|
|
392
404
|
function initializeAudio() {
|
|
393
405
|
try {
|
|
394
406
|
cleanup()
|
|
@@ -401,7 +413,7 @@ function initializeAudio() {
|
|
|
401
413
|
}
|
|
402
414
|
|
|
403
415
|
if (!audioContext.value) {
|
|
404
|
-
throw new Error('
|
|
416
|
+
throw new Error(translate('initAudioError'))
|
|
405
417
|
}
|
|
406
418
|
|
|
407
419
|
audioContext.value.src = currentSong.value.src || props.src
|
|
@@ -448,13 +460,14 @@ function initializeAudio() {
|
|
|
448
460
|
})
|
|
449
461
|
|
|
450
462
|
audioContext.value.onError((error: { errMsg: string; errCode: number }) => {
|
|
451
|
-
|
|
452
|
-
|
|
463
|
+
const msg = translate('audioError')
|
|
464
|
+
handleError(msg, error)
|
|
465
|
+
emit('error', { message: msg, error })
|
|
453
466
|
})
|
|
454
467
|
|
|
455
468
|
isInitialized.value = true
|
|
456
469
|
} catch (error) {
|
|
457
|
-
handleError('
|
|
470
|
+
handleError(translate('initAudioError'), error)
|
|
458
471
|
}
|
|
459
472
|
}
|
|
460
473
|
const onTimeUpdate = () => {
|
|
@@ -485,7 +498,7 @@ function play() {
|
|
|
485
498
|
try {
|
|
486
499
|
audioContext.value.play()
|
|
487
500
|
} catch (error) {
|
|
488
|
-
handleError('
|
|
501
|
+
handleError(translate('playError'), error)
|
|
489
502
|
}
|
|
490
503
|
}
|
|
491
504
|
}
|
|
@@ -495,7 +508,7 @@ function pause() {
|
|
|
495
508
|
try {
|
|
496
509
|
audioContext.value.pause()
|
|
497
510
|
} catch (error) {
|
|
498
|
-
handleError('
|
|
511
|
+
handleError(translate('pauseError'), error)
|
|
499
512
|
}
|
|
500
513
|
}
|
|
501
514
|
}
|
|
@@ -506,7 +519,7 @@ function stop() {
|
|
|
506
519
|
audioContext.value.stop()
|
|
507
520
|
currentTime.value = 0
|
|
508
521
|
} catch (error) {
|
|
509
|
-
handleError('
|
|
522
|
+
handleError(translate('stopError'), error)
|
|
510
523
|
}
|
|
511
524
|
}
|
|
512
525
|
}
|
|
@@ -523,7 +536,7 @@ function seek(time: number) {
|
|
|
523
536
|
// #endif
|
|
524
537
|
// currentTime.value = time
|
|
525
538
|
} catch (error) {
|
|
526
|
-
handleError('
|
|
539
|
+
handleError(translate('seekError'), error)
|
|
527
540
|
}
|
|
528
541
|
}
|
|
529
542
|
}
|
|
@@ -556,6 +569,11 @@ function handleNext() {
|
|
|
556
569
|
switchSong(internalPlaylist.value.length === 0 ? -1 : (internalCurrentIndex.value + 1) % internalPlaylist.value.length, 'next')
|
|
557
570
|
}
|
|
558
571
|
|
|
572
|
+
/**
|
|
573
|
+
* 切换歌曲:更新索引,重置进度,重新初始化音频并恢复播放状态
|
|
574
|
+
* @param index - 目标歌曲在播放列表中的索引
|
|
575
|
+
* @param eventType - 事件类型('prev'/'next')
|
|
576
|
+
*/
|
|
559
577
|
function switchSong(index: number, eventType?: string) {
|
|
560
578
|
if (index < 0 || index >= internalPlaylist.value.length) {
|
|
561
579
|
if (eventType) {
|
|
@@ -584,6 +602,9 @@ function switchSong(index: number, eventType?: string) {
|
|
|
584
602
|
})
|
|
585
603
|
}
|
|
586
604
|
|
|
605
|
+
/**
|
|
606
|
+
* 自动切歌逻辑:根据播放模式(列表循环/单曲循环/随机播放)自动播放下一首
|
|
607
|
+
*/
|
|
587
608
|
function handleAutoNext() {
|
|
588
609
|
switch (internalPlayMode.value) {
|
|
589
610
|
case 'single':
|
|
@@ -681,6 +702,9 @@ function handleTouchMove(e: TouchEvent) {
|
|
|
681
702
|
}
|
|
682
703
|
}
|
|
683
704
|
|
|
705
|
+
/**
|
|
706
|
+
* 触摸结束:检测水平滑动方向,切换封面/歌词面板显隐
|
|
707
|
+
*/
|
|
684
708
|
function handleTouchEnd(e: TouchEvent) {
|
|
685
709
|
if (!isTouching.value || props.viewMode === 'mini' || props.viewMode === 'hideView') {
|
|
686
710
|
isTouching.value = false
|
|
@@ -719,6 +743,10 @@ function handleCoverError() {
|
|
|
719
743
|
isCoverHidden.value = false
|
|
720
744
|
}
|
|
721
745
|
|
|
746
|
+
/**
|
|
747
|
+
* 根据当前播放时间匹配对应歌词行
|
|
748
|
+
* @param time - 当前播放时间(秒)
|
|
749
|
+
*/
|
|
722
750
|
function updateCurrentLyric(time: number) {
|
|
723
751
|
if (!currentLyrics.value.length) return
|
|
724
752
|
|
|
@@ -43,7 +43,9 @@ export default {
|
|
|
43
43
|
name: 'oxy-waterfall',
|
|
44
44
|
options: {
|
|
45
45
|
addGlobalClass: true,
|
|
46
|
+
// #ifndef MP-TOUTIAO
|
|
46
47
|
virtualHost: true,
|
|
48
|
+
// #endif
|
|
47
49
|
styleIsolation: 'shared'
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -86,6 +88,9 @@ watch(
|
|
|
86
88
|
}
|
|
87
89
|
)
|
|
88
90
|
|
|
91
|
+
/**
|
|
92
|
+
* 加载列数据。首次加载时初始化列数组和高度数组,然后逐条渲染数据。
|
|
93
|
+
*/
|
|
89
94
|
function loadColumn() {
|
|
90
95
|
if (!loadedIndex.value || !columns.value.length) {
|
|
91
96
|
clearColumn()
|
|
@@ -116,6 +121,10 @@ function pushRender(data: Record<string, any>) {
|
|
|
116
121
|
})
|
|
117
122
|
}
|
|
118
123
|
|
|
124
|
+
/**
|
|
125
|
+
* 找到当前高度最小的列索引,用于瀑布流分配新数据项到最矮列(最短列优先算法)。
|
|
126
|
+
* @returns 高度最小的列索引
|
|
127
|
+
*/
|
|
119
128
|
function findSmallColIndex() {
|
|
120
129
|
let col = 0
|
|
121
130
|
let size = columnHeights.value[col]
|
|
@@ -128,6 +137,10 @@ function findSmallColIndex() {
|
|
|
128
137
|
return col
|
|
129
138
|
}
|
|
130
139
|
|
|
140
|
+
/**
|
|
141
|
+
* 子项高度上报回调。累加对应列高度,若非高度变化导致的重复上报,则继续加载下一条数据。
|
|
142
|
+
* @param params - 含 colIndex、height、reportHeightTimeChange
|
|
143
|
+
*/
|
|
131
144
|
function reportHeight(params: any) {
|
|
132
145
|
const { colIndex, height, reportHeightTimeChange } = params
|
|
133
146
|
columnHeights.value[colIndex] += height
|
|
@@ -66,6 +66,13 @@ export const waterfallProps = {
|
|
|
66
66
|
*/
|
|
67
67
|
triggered: makeBooleanProp(false),
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* 加载更多状态,对应 oxy-loadmore 的 loadmoreState
|
|
71
|
+
* - `'loading'`:加载中
|
|
72
|
+
* - `'finished'`:全部加载完成
|
|
73
|
+
* - `'error'`:加载失败
|
|
74
|
+
* - `''`:不显示加载更多
|
|
75
|
+
*/
|
|
69
76
|
loadmoreState: String as PropType<LoadMoreState | ''>,
|
|
70
77
|
|
|
71
78
|
/**
|