2021-07-21 15:01:39 +08:00
|
|
|
|
<template>
|
2024-09-12 15:00:00 +08:00
|
|
|
|
<div
|
|
|
|
|
|
class="music-play-bar"
|
2025-01-18 03:25:21 +08:00
|
|
|
|
:class="[
|
|
|
|
|
|
setAnimationClass('animate__bounceInUp'),
|
|
|
|
|
|
musicFullVisible ? 'play-bar-opcity' : '',
|
|
|
|
|
|
musicFullVisible && MusicFullRef?.config?.hidePlayBar
|
|
|
|
|
|
? 'animate__animated animate__slideOutDown'
|
|
|
|
|
|
: ''
|
|
|
|
|
|
]"
|
2024-12-28 16:43:52 +08:00
|
|
|
|
:style="{
|
|
|
|
|
|
color: musicFullVisible
|
|
|
|
|
|
? textColors.theme === 'dark'
|
|
|
|
|
|
? '#000000'
|
|
|
|
|
|
: '#ffffff'
|
2025-03-19 22:48:28 +08:00
|
|
|
|
: settingsStore.theme === 'dark'
|
2024-12-28 16:43:52 +08:00
|
|
|
|
? '#ffffff'
|
2025-01-01 02:25:18 +08:00
|
|
|
|
: '#000000'
|
2024-12-28 16:43:52 +08:00
|
|
|
|
}"
|
2024-09-12 15:00:00 +08:00
|
|
|
|
>
|
2024-12-15 01:40:13 +08:00
|
|
|
|
<div class="music-time custom-slider">
|
2025-01-01 02:25:18 +08:00
|
|
|
|
<n-slider
|
|
|
|
|
|
v-model:value="timeSlider"
|
|
|
|
|
|
:step="1"
|
|
|
|
|
|
:max="allTime"
|
|
|
|
|
|
:min="0"
|
|
|
|
|
|
:format-tooltip="formatTooltip"
|
2025-03-30 12:56:42 +08:00
|
|
|
|
:show-tooltip="showSliderTooltip"
|
|
|
|
|
|
@mouseenter="showSliderTooltip = true"
|
|
|
|
|
|
@mouseleave="showSliderTooltip = false"
|
2025-03-31 22:57:00 +08:00
|
|
|
|
@dragstart="handleSliderDragStart"
|
|
|
|
|
|
@dragend="handleSliderDragEnd"
|
2025-01-01 02:25:18 +08:00
|
|
|
|
></n-slider>
|
2024-12-15 01:40:13 +08:00
|
|
|
|
</div>
|
2024-12-09 20:51:40 +08:00
|
|
|
|
<div class="play-bar-img-wrapper" @click="setMusicFull">
|
2025-01-01 02:25:18 +08:00
|
|
|
|
<n-image
|
2025-01-18 03:25:21 +08:00
|
|
|
|
:src="getImgUrl(playMusic?.picUrl, '100y100')"
|
2025-01-01 02:25:18 +08:00
|
|
|
|
class="play-bar-img"
|
|
|
|
|
|
lazy
|
|
|
|
|
|
preview-disabled
|
|
|
|
|
|
/>
|
2025-05-10 20:12:10 +08:00
|
|
|
|
<div v-if="playMusic?.playLoading" class="loading-overlay">
|
|
|
|
|
|
<i class="ri-loader-4-line loading-icon"></i>
|
|
|
|
|
|
</div>
|
2024-12-09 20:51:40 +08:00
|
|
|
|
<div class="hover-arrow">
|
|
|
|
|
|
<div class="hover-content">
|
|
|
|
|
|
<!-- <i class="ri-arrow-up-s-line text-3xl" :class="{ 'ri-arrow-down-s-line': musicFullVisible }"></i> -->
|
2025-01-01 02:25:18 +08:00
|
|
|
|
<i
|
|
|
|
|
|
class="text-3xl"
|
|
|
|
|
|
:class="musicFullVisible ? 'ri-arrow-down-s-line' : 'ri-arrow-up-s-line'"
|
|
|
|
|
|
></i>
|
2025-02-19 01:01:43 +08:00
|
|
|
|
<span class="hover-text">{{
|
|
|
|
|
|
musicFullVisible ? t('player.playBar.collapse') : t('player.playBar.expand')
|
|
|
|
|
|
}}</span>
|
2024-12-09 20:51:40 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2023-12-11 16:22:05 +08:00
|
|
|
|
<div class="music-content">
|
|
|
|
|
|
<div class="music-content-title">
|
2023-12-16 13:42:52 +08:00
|
|
|
|
<n-ellipsis class="text-ellipsis" line-clamp="1">
|
2023-12-17 14:48:21 +08:00
|
|
|
|
{{ playMusic.name }}
|
2023-12-16 13:42:52 +08:00
|
|
|
|
</n-ellipsis>
|
2023-12-11 16:22:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="music-content-name">
|
2025-01-13 22:55:46 +08:00
|
|
|
|
<n-ellipsis
|
|
|
|
|
|
class="text-ellipsis"
|
|
|
|
|
|
line-clamp="1"
|
|
|
|
|
|
:tooltip="{
|
|
|
|
|
|
contentStyle: { maxWidth: '600px' },
|
|
|
|
|
|
zIndex: 99999
|
|
|
|
|
|
}"
|
|
|
|
|
|
>
|
2025-01-01 02:25:18 +08:00
|
|
|
|
<span
|
2025-01-16 23:19:16 +08:00
|
|
|
|
v-for="(artists, artistsindex) in artistList"
|
2025-01-01 02:25:18 +08:00
|
|
|
|
:key="artistsindex"
|
2025-01-13 22:13:46 +08:00
|
|
|
|
class="cursor-pointer hover:text-green-500"
|
|
|
|
|
|
@click="handleArtistClick(artists.id)"
|
2024-12-05 21:29:13 +08:00
|
|
|
|
>
|
2025-01-16 23:19:16 +08:00
|
|
|
|
{{ artists.name }}{{ artistsindex < artistList.length - 1 ? ' / ' : '' }}
|
2025-01-13 22:13:46 +08:00
|
|
|
|
</span>
|
2023-12-11 16:22:05 +08:00
|
|
|
|
</n-ellipsis>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="music-buttons">
|
2024-05-23 17:12:35 +08:00
|
|
|
|
<div class="music-buttons-prev" @click="handlePrev">
|
2023-12-11 16:22:05 +08:00
|
|
|
|
<i class="iconfont icon-prev"></i>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="music-buttons-play" @click="playMusicEvent">
|
|
|
|
|
|
<i class="iconfont icon" :class="play ? 'icon-stop' : 'icon-play'"></i>
|
|
|
|
|
|
</div>
|
2024-12-15 01:40:13 +08:00
|
|
|
|
<div class="music-buttons-next" @click="handleNext">
|
2023-12-11 16:22:05 +08:00
|
|
|
|
<i class="iconfont icon-next"></i>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="audio-button">
|
2024-12-15 01:40:13 +08:00
|
|
|
|
<div class="audio-volume custom-slider">
|
|
|
|
|
|
<div class="volume-icon" @click="mute">
|
|
|
|
|
|
<i class="iconfont" :class="getVolumeIcon"></i>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="volume-slider">
|
|
|
|
|
|
<n-slider v-model:value="volumeSlider" :step="0.01" :tooltip="false" vertical></n-slider>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2024-12-30 11:20:23 +08:00
|
|
|
|
<n-tooltip v-if="!isMobile" trigger="hover" :z-index="9999999">
|
2024-12-15 01:40:13 +08:00
|
|
|
|
<template #trigger>
|
|
|
|
|
|
<i class="iconfont" :class="playModeIcon" @click="togglePlayMode"></i>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
{{ playModeText }}
|
|
|
|
|
|
</n-tooltip>
|
2024-12-30 11:20:23 +08:00
|
|
|
|
<n-tooltip v-if="!isMobile" trigger="hover" :z-index="9999999">
|
2023-12-11 16:22:05 +08:00
|
|
|
|
<template #trigger>
|
2025-01-01 02:25:18 +08:00
|
|
|
|
<i
|
|
|
|
|
|
class="iconfont icon-likefill"
|
|
|
|
|
|
:class="{ 'like-active': isFavorite }"
|
|
|
|
|
|
@click="toggleFavorite"
|
|
|
|
|
|
></i>
|
2023-12-11 16:22:05 +08:00
|
|
|
|
</template>
|
2025-02-19 01:01:43 +08:00
|
|
|
|
{{ t('player.playBar.like') }}
|
2024-12-14 13:49:32 +08:00
|
|
|
|
</n-tooltip>
|
2024-09-12 16:44:42 +08:00
|
|
|
|
<n-tooltip v-if="isElectron" class="music-lyric" trigger="hover" :z-index="9999999">
|
2023-12-11 16:22:05 +08:00
|
|
|
|
<template #trigger>
|
2024-12-16 22:12:28 +08:00
|
|
|
|
<i
|
|
|
|
|
|
class="iconfont ri-netease-cloud-music-line"
|
2025-03-08 19:00:50 +08:00
|
|
|
|
:class="{ 'text-green-500': isLyricWindowOpen, 'disabled-icon': !playMusic.id }"
|
|
|
|
|
|
@click="playMusic.id && openLyricWindow()"
|
2024-12-16 22:12:28 +08:00
|
|
|
|
></i>
|
2023-12-11 16:22:05 +08:00
|
|
|
|
</template>
|
2025-03-08 19:00:50 +08:00
|
|
|
|
{{ playMusic.id ? t('player.playBar.lyric') : t('player.playBar.noSongPlaying') }}
|
2024-05-16 18:54:30 +08:00
|
|
|
|
</n-tooltip>
|
2025-05-11 15:09:56 +08:00
|
|
|
|
<n-tooltip v-if="playMusic.id && isElectron" trigger="hover" :z-index="9999999">
|
|
|
|
|
|
<template #trigger>
|
|
|
|
|
|
<reparse-popover v-if="playMusic.id" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
{{ t('player.playBar.reparse') }}
|
|
|
|
|
|
</n-tooltip>
|
2025-03-07 01:14:35 +08:00
|
|
|
|
<n-popover
|
2025-03-08 21:27:05 +08:00
|
|
|
|
v-if="isElectron"
|
2025-03-07 01:14:35 +08:00
|
|
|
|
trigger="click"
|
|
|
|
|
|
:z-index="99999999"
|
|
|
|
|
|
content-class="music-eq"
|
|
|
|
|
|
raw
|
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
|
:delay="200"
|
|
|
|
|
|
placement="top"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #trigger>
|
|
|
|
|
|
<n-tooltip trigger="hover" :z-index="9999999">
|
|
|
|
|
|
<template #trigger>
|
|
|
|
|
|
<i class="iconfont ri-equalizer-line" :class="{ 'text-green-500': isEQVisible }"></i>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
{{ t('player.playBar.eq') }}
|
|
|
|
|
|
</n-tooltip>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<eq-control />
|
|
|
|
|
|
</n-popover>
|
2025-05-03 23:46:28 +08:00
|
|
|
|
<!-- 定时关闭功能 -->
|
|
|
|
|
|
<sleep-timer-popover mode="desktop" />
|
2025-05-17 13:27:50 +08:00
|
|
|
|
<n-tooltip trigger="hover" :z-index="9999999">
|
2023-12-27 14:39:52 +08:00
|
|
|
|
<template #trigger>
|
2025-05-17 13:27:50 +08:00
|
|
|
|
<i class="iconfont icon-list text-2xl hover:text-green-500 transition-colors cursor-pointer" @click="openPlayListDrawer"></i>
|
2023-12-27 14:39:52 +08:00
|
|
|
|
</template>
|
2025-05-17 13:27:50 +08:00
|
|
|
|
{{ t('player.playBar.playList') }}
|
|
|
|
|
|
</n-tooltip>
|
2025-05-19 17:59:20 +08:00
|
|
|
|
<!-- 添加播放速度控制按钮 -->
|
|
|
|
|
|
<n-dropdown
|
|
|
|
|
|
v-if="!isMobile"
|
|
|
|
|
|
:options="playbackRateOptions"
|
|
|
|
|
|
@select="handlePlaybackRateChange"
|
|
|
|
|
|
trigger="click"
|
|
|
|
|
|
:z-index="9999999"
|
|
|
|
|
|
>
|
|
|
|
|
|
<n-tooltip trigger="hover" :z-index="9999999">
|
|
|
|
|
|
<template #trigger>
|
|
|
|
|
|
<div class="play-speed">
|
|
|
|
|
|
<span class="speed-button">{{ playbackRate }}x</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
{{ t('player.playBar.playbackSpeed') }}
|
|
|
|
|
|
</n-tooltip>
|
|
|
|
|
|
</n-dropdown>
|
2023-12-11 16:22:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<!-- 播放音乐 -->
|
2025-01-13 22:55:46 +08:00
|
|
|
|
<music-full ref="MusicFullRef" v-model="musicFullVisible" :background="background" />
|
2023-12-11 16:22:05 +08:00
|
|
|
|
</div>
|
2021-07-21 15:01:39 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2024-12-12 22:18:52 +08:00
|
|
|
|
import { useThrottleFn } from '@vueuse/core';
|
2025-03-30 01:20:28 +08:00
|
|
|
|
import { useMessage } from 'naive-ui';
|
2025-05-17 13:27:50 +08:00
|
|
|
|
import { computed, ref, watch } from 'vue';
|
2025-02-19 01:01:43 +08:00
|
|
|
|
import { useI18n } from 'vue-i18n';
|
2024-05-16 18:54:30 +08:00
|
|
|
|
|
2025-03-07 01:14:35 +08:00
|
|
|
|
import EqControl from '@/components/EQControl.vue';
|
2025-05-03 23:46:28 +08:00
|
|
|
|
import SleepTimerPopover from '@/components/player/SleepTimerPopover.vue';
|
2025-05-11 15:09:56 +08:00
|
|
|
|
import ReparsePopover from '@/components/player/ReparsePopover.vue';
|
2025-01-01 02:25:18 +08:00
|
|
|
|
import {
|
|
|
|
|
|
allTime,
|
2025-01-16 23:19:16 +08:00
|
|
|
|
artistList,
|
2025-01-01 02:25:18 +08:00
|
|
|
|
isLyricWindowOpen,
|
|
|
|
|
|
nowTime,
|
|
|
|
|
|
openLyric,
|
2025-01-16 23:19:16 +08:00
|
|
|
|
playMusic,
|
2025-01-01 02:25:18 +08:00
|
|
|
|
textColors
|
|
|
|
|
|
} from '@/hooks/MusicHook';
|
2025-03-29 20:52:50 +08:00
|
|
|
|
import { useArtist } from '@/hooks/useArtist';
|
2025-04-01 23:22:26 +08:00
|
|
|
|
import MusicFull from '@/layout/components/MusicFull.vue';
|
2025-01-18 03:25:21 +08:00
|
|
|
|
import { audioService } from '@/services/audioService';
|
2025-05-03 23:46:28 +08:00
|
|
|
|
import {
|
|
|
|
|
|
isBilibiliIdMatch,
|
|
|
|
|
|
usePlayerStore
|
|
|
|
|
|
} from '@/store/modules/player';
|
2025-03-19 22:48:28 +08:00
|
|
|
|
import { useSettingsStore } from '@/store/modules/settings';
|
2025-01-10 22:49:55 +08:00
|
|
|
|
import { getImgUrl, isElectron, isMobile, secondToMinute, setAnimationClass } from '@/utils';
|
2024-05-16 18:54:30 +08:00
|
|
|
|
|
2025-03-19 22:48:28 +08:00
|
|
|
|
const playerStore = usePlayerStore();
|
|
|
|
|
|
const settingsStore = useSettingsStore();
|
2025-02-19 01:01:43 +08:00
|
|
|
|
const { t } = useI18n();
|
2025-03-30 01:20:28 +08:00
|
|
|
|
const message = useMessage();
|
2021-07-21 22:29:44 +08:00
|
|
|
|
// 是否播放
|
2025-03-19 22:48:28 +08:00
|
|
|
|
const play = computed(() => playerStore.isPlay);
|
2025-01-16 23:19:16 +08:00
|
|
|
|
// 背景颜色
|
2024-09-14 18:22:56 +08:00
|
|
|
|
const background = ref('#000');
|
2023-12-21 18:09:12 +08:00
|
|
|
|
|
2023-12-11 16:22:05 +08:00
|
|
|
|
watch(
|
2025-03-19 22:48:28 +08:00
|
|
|
|
() => playerStore.playMusic,
|
2024-09-14 18:22:56 +08:00
|
|
|
|
async () => {
|
2024-09-18 15:11:20 +08:00
|
|
|
|
background.value = playMusic.value.backgroundColor as string;
|
2023-12-11 16:22:05 +08:00
|
|
|
|
},
|
2025-01-01 02:25:18 +08:00
|
|
|
|
{ immediate: true, deep: true }
|
2024-05-16 18:54:30 +08:00
|
|
|
|
);
|
2023-12-17 14:48:21 +08:00
|
|
|
|
|
2025-01-16 23:19:16 +08:00
|
|
|
|
// 节流版本的 seek 函数
|
2024-12-12 22:18:52 +08:00
|
|
|
|
const throttledSeek = useThrottleFn((value: number) => {
|
2025-03-31 22:57:00 +08:00
|
|
|
|
audioService.seek(value);
|
2024-12-15 01:40:13 +08:00
|
|
|
|
nowTime.value = value;
|
2024-12-12 22:18:52 +08:00
|
|
|
|
}, 50); // 50ms 的节流延迟
|
2023-12-16 13:42:52 +08:00
|
|
|
|
|
2025-03-31 22:57:00 +08:00
|
|
|
|
// 拖动时的临时值,避免频繁更新 nowTime 触发重渲染
|
|
|
|
|
|
const dragValue = ref(0);
|
|
|
|
|
|
|
|
|
|
|
|
// 为滑块拖动添加状态跟踪
|
|
|
|
|
|
const isDragging = ref(false);
|
|
|
|
|
|
|
2024-12-12 22:18:52 +08:00
|
|
|
|
// 修改 timeSlider 计算属性
|
2021-07-21 22:29:44 +08:00
|
|
|
|
const timeSlider = computed({
|
2025-03-31 22:57:00 +08:00
|
|
|
|
get: () => (isDragging.value ? dragValue.value : nowTime.value),
|
|
|
|
|
|
set: (value) => {
|
|
|
|
|
|
if (isDragging.value) {
|
|
|
|
|
|
// 拖动中只更新临时值,不触发 nowTime 更新和 seek 操作
|
|
|
|
|
|
dragValue.value = value;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 点击操作 (非拖动),可以直接 seek
|
|
|
|
|
|
throttledSeek(value);
|
|
|
|
|
|
}
|
2024-05-16 18:54:30 +08:00
|
|
|
|
});
|
2021-07-22 11:32:38 +08:00
|
|
|
|
|
2025-03-31 22:57:00 +08:00
|
|
|
|
// 添加滑块拖动开始和结束事件处理
|
|
|
|
|
|
const handleSliderDragStart = () => {
|
|
|
|
|
|
isDragging.value = true;
|
|
|
|
|
|
// 初始化拖动值为当前时间
|
|
|
|
|
|
dragValue.value = nowTime.value;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const handleSliderDragEnd = () => {
|
|
|
|
|
|
isDragging.value = false;
|
|
|
|
|
|
|
|
|
|
|
|
// 直接应用最终的拖动值
|
|
|
|
|
|
audioService.seek(dragValue.value);
|
|
|
|
|
|
nowTime.value = dragValue.value;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 格式化提示文本,根据拖动状态显示不同的时间
|
2024-12-15 01:40:13 +08:00
|
|
|
|
const formatTooltip = (value: number) => {
|
|
|
|
|
|
return `${secondToMinute(value)} / ${secondToMinute(allTime.value)}`;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2021-07-22 11:32:38 +08:00
|
|
|
|
// 音量条
|
2025-01-01 02:25:18 +08:00
|
|
|
|
const audioVolume = ref(
|
|
|
|
|
|
localStorage.getItem('volume') ? parseFloat(localStorage.getItem('volume') as string) : 1
|
|
|
|
|
|
);
|
2024-12-15 01:40:13 +08:00
|
|
|
|
const getVolumeIcon = computed(() => {
|
|
|
|
|
|
// 0 静音 ri-volume-mute-line 0.5 ri-volume-down-line 1 ri-volume-up-line
|
|
|
|
|
|
if (audioVolume.value === 0) {
|
|
|
|
|
|
return 'ri-volume-mute-line';
|
|
|
|
|
|
}
|
|
|
|
|
|
if (audioVolume.value <= 0.5) {
|
|
|
|
|
|
return 'ri-volume-down-line';
|
|
|
|
|
|
}
|
|
|
|
|
|
return 'ri-volume-up-line';
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2021-07-22 11:32:38 +08:00
|
|
|
|
const volumeSlider = computed({
|
2023-12-11 16:22:05 +08:00
|
|
|
|
get: () => audioVolume.value * 100,
|
|
|
|
|
|
set: (value) => {
|
2024-12-12 22:18:52 +08:00
|
|
|
|
localStorage.setItem('volume', (value / 100).toString());
|
2025-03-31 22:57:00 +08:00
|
|
|
|
audioService.setVolume(value / 100);
|
2024-12-12 22:18:52 +08:00
|
|
|
|
audioVolume.value = value / 100;
|
2025-01-01 02:25:18 +08:00
|
|
|
|
}
|
2024-05-16 18:54:30 +08:00
|
|
|
|
});
|
2021-07-21 15:01:39 +08:00
|
|
|
|
|
2024-12-15 01:40:13 +08:00
|
|
|
|
// 静音
|
|
|
|
|
|
const mute = () => {
|
|
|
|
|
|
if (volumeSlider.value === 0) {
|
|
|
|
|
|
volumeSlider.value = 30;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
volumeSlider.value = 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 播放模式
|
2025-03-19 22:48:28 +08:00
|
|
|
|
const playMode = computed(() => playerStore.playMode);
|
2024-12-15 01:40:13 +08:00
|
|
|
|
const playModeIcon = computed(() => {
|
2024-12-29 00:43:39 +08:00
|
|
|
|
switch (playMode.value) {
|
|
|
|
|
|
case 0:
|
|
|
|
|
|
return 'ri-repeat-2-line';
|
|
|
|
|
|
case 1:
|
|
|
|
|
|
return 'ri-repeat-one-line';
|
|
|
|
|
|
case 2:
|
|
|
|
|
|
return 'ri-shuffle-line';
|
|
|
|
|
|
default:
|
|
|
|
|
|
return 'ri-repeat-2-line';
|
|
|
|
|
|
}
|
2024-05-16 18:54:30 +08:00
|
|
|
|
});
|
2024-12-15 01:40:13 +08:00
|
|
|
|
const playModeText = computed(() => {
|
2024-12-29 00:43:39 +08:00
|
|
|
|
switch (playMode.value) {
|
|
|
|
|
|
case 0:
|
2025-02-19 01:01:43 +08:00
|
|
|
|
return t('player.playBar.playMode.sequence');
|
2024-12-29 00:43:39 +08:00
|
|
|
|
case 1:
|
2025-02-19 01:01:43 +08:00
|
|
|
|
return t('player.playBar.playMode.loop');
|
2024-12-29 00:43:39 +08:00
|
|
|
|
case 2:
|
2025-02-19 01:01:43 +08:00
|
|
|
|
return t('player.playBar.playMode.random');
|
2024-12-29 00:43:39 +08:00
|
|
|
|
default:
|
2025-02-19 01:01:43 +08:00
|
|
|
|
return t('player.playBar.playMode.sequence');
|
2024-12-29 00:43:39 +08:00
|
|
|
|
}
|
2024-12-15 01:40:13 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
2025-05-19 17:59:20 +08:00
|
|
|
|
// 播放速度控制
|
|
|
|
|
|
const playbackRate = ref(1.0);
|
|
|
|
|
|
const playbackRateOptions = [
|
|
|
|
|
|
{ label: '0.5x', key: 0.5 },
|
|
|
|
|
|
{ label: '0.75x', key: 0.75 },
|
|
|
|
|
|
{ label: '1.0x', key: 1.0 },
|
|
|
|
|
|
{ label: '1.25x', key: 1.25 },
|
|
|
|
|
|
{ label: '1.5x', key: 1.5 },
|
|
|
|
|
|
{ label: '2.0x', key: 2.0 }
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handlePlaybackRateChange = (rate: number) => {
|
|
|
|
|
|
playbackRate.value = rate;
|
|
|
|
|
|
audioService.setPlaybackRate(rate);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2024-12-15 01:40:13 +08:00
|
|
|
|
// 切换播放模式
|
|
|
|
|
|
const togglePlayMode = () => {
|
2025-03-19 22:48:28 +08:00
|
|
|
|
playerStore.togglePlayMode();
|
2024-12-15 01:40:13 +08:00
|
|
|
|
};
|
2021-09-28 22:40:44 +08:00
|
|
|
|
|
2024-12-15 01:40:13 +08:00
|
|
|
|
function handleNext() {
|
2025-03-19 22:48:28 +08:00
|
|
|
|
playerStore.nextPlay();
|
2023-12-11 16:22:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-16 13:42:52 +08:00
|
|
|
|
function handlePrev() {
|
2025-03-19 22:48:28 +08:00
|
|
|
|
playerStore.prevPlay();
|
2023-12-11 16:22:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-16 18:54:30 +08:00
|
|
|
|
const MusicFullRef = ref<any>(null);
|
2025-03-30 12:56:42 +08:00
|
|
|
|
const showSliderTooltip = ref(false);
|
2023-12-17 14:48:21 +08:00
|
|
|
|
|
2021-07-21 22:29:44 +08:00
|
|
|
|
// 播放暂停按钮事件
|
2021-07-21 17:45:21 +08:00
|
|
|
|
const playMusicEvent = async () => {
|
2025-01-17 22:34:49 +08:00
|
|
|
|
try {
|
2025-05-17 13:27:50 +08:00
|
|
|
|
const result = await playerStore.setPlay({ ...playMusic.value});
|
|
|
|
|
|
if (result) {
|
2025-03-19 22:48:28 +08:00
|
|
|
|
playerStore.setPlayMusic(true);
|
2024-12-12 22:18:52 +08:00
|
|
|
|
}
|
2025-01-17 22:34:49 +08:00
|
|
|
|
} catch (error) {
|
2025-05-17 13:27:50 +08:00
|
|
|
|
console.error('重新获取播放链接失败:', error);
|
2025-03-30 01:20:28 +08:00
|
|
|
|
message.error(t('player.playFailed'));
|
2023-12-11 16:22:05 +08:00
|
|
|
|
}
|
2024-05-16 18:54:30 +08:00
|
|
|
|
};
|
2021-07-21 15:01:39 +08:00
|
|
|
|
|
2024-09-12 16:44:42 +08:00
|
|
|
|
const musicFullVisible = ref(false);
|
2021-07-25 15:08:02 +08:00
|
|
|
|
|
|
|
|
|
|
// 设置musicFull
|
|
|
|
|
|
const setMusicFull = () => {
|
2024-09-12 16:44:42 +08:00
|
|
|
|
musicFullVisible.value = !musicFullVisible.value;
|
2025-03-19 22:48:28 +08:00
|
|
|
|
playerStore.setMusicFull(musicFullVisible.value);
|
2025-01-13 22:13:46 +08:00
|
|
|
|
if (musicFullVisible.value) {
|
2025-03-19 22:48:28 +08:00
|
|
|
|
settingsStore.showArtistDrawer = false;
|
2025-01-13 22:13:46 +08:00
|
|
|
|
}
|
2024-05-16 18:54:30 +08:00
|
|
|
|
};
|
2024-09-18 17:05:36 +08:00
|
|
|
|
|
2024-12-14 13:49:32 +08:00
|
|
|
|
const isFavorite = computed(() => {
|
2025-05-02 22:39:47 +08:00
|
|
|
|
// 对于B站视频,使用ID匹配函数
|
|
|
|
|
|
if (playMusic.value.source === 'bilibili' && playMusic.value.bilibiliData?.bvid) {
|
|
|
|
|
|
return playerStore.favoriteList.some(id => isBilibiliIdMatch(id, playMusic.value.id));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 非B站视频直接比较ID
|
|
|
|
|
|
return playerStore.favoriteList.includes(playMusic.value.id);
|
2024-12-14 13:49:32 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const toggleFavorite = async (e: Event) => {
|
2025-05-02 22:39:47 +08:00
|
|
|
|
console.log('playMusic.value', playMusic.value);
|
2024-12-14 13:49:32 +08:00
|
|
|
|
e.stopPropagation();
|
2025-05-02 22:39:47 +08:00
|
|
|
|
|
|
|
|
|
|
// 处理B站视频的收藏ID
|
|
|
|
|
|
let favoriteId = playMusic.value.id;
|
|
|
|
|
|
if (playMusic.value.source === 'bilibili' && playMusic.value.bilibiliData?.bvid) {
|
|
|
|
|
|
// 如果当前播放的是B站视频,且已有ID不包含--格式,则需要构造完整ID
|
|
|
|
|
|
if (!String(favoriteId).includes('--')) {
|
|
|
|
|
|
favoriteId = `${playMusic.value.bilibiliData.bvid}--${playMusic.value.song?.ar?.[0]?.id || 0}--${playMusic.value.bilibiliData.cid}`;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-14 13:49:32 +08:00
|
|
|
|
if (isFavorite.value) {
|
2025-05-02 22:39:47 +08:00
|
|
|
|
playerStore.removeFromFavorite(favoriteId);
|
2024-12-14 13:49:32 +08:00
|
|
|
|
} else {
|
2025-05-02 22:39:47 +08:00
|
|
|
|
playerStore.addToFavorite(favoriteId);
|
2024-12-14 13:49:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
2024-12-16 22:12:28 +08:00
|
|
|
|
|
|
|
|
|
|
const openLyricWindow = () => {
|
|
|
|
|
|
openLyric();
|
|
|
|
|
|
};
|
2025-01-13 22:13:46 +08:00
|
|
|
|
|
2025-03-29 20:52:50 +08:00
|
|
|
|
const { navigateToArtist } = useArtist();
|
|
|
|
|
|
|
2025-01-13 22:13:46 +08:00
|
|
|
|
const handleArtistClick = (id: number) => {
|
|
|
|
|
|
musicFullVisible.value = false;
|
2025-03-29 20:52:50 +08:00
|
|
|
|
navigateToArtist(id);
|
2025-01-13 22:13:46 +08:00
|
|
|
|
};
|
2025-01-15 00:30:00 +08:00
|
|
|
|
|
2025-03-07 01:14:35 +08:00
|
|
|
|
const isEQVisible = ref(false);
|
2025-03-29 23:26:26 +08:00
|
|
|
|
|
2025-05-17 13:27:50 +08:00
|
|
|
|
// 打开播放列表抽屉
|
|
|
|
|
|
const openPlayListDrawer = () => {
|
|
|
|
|
|
playerStore.setPlayListDrawerVisible(true);
|
2025-03-29 23:26:26 +08:00
|
|
|
|
};
|
2021-07-21 15:01:39 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2021-07-21 17:45:21 +08:00
|
|
|
|
.text-ellipsis {
|
2023-12-11 16:22:05 +08:00
|
|
|
|
width: 100%;
|
2021-07-21 17:45:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-07-21 15:01:39 +08:00
|
|
|
|
.music-play-bar {
|
2024-12-15 01:40:13 +08:00
|
|
|
|
@apply h-20 w-full absolute bottom-0 left-0 flex items-center box-border px-6 py-2 pt-3;
|
2024-12-28 16:43:52 +08:00
|
|
|
|
@apply bg-light dark:bg-dark shadow-2xl shadow-gray-300;
|
2023-12-27 14:39:52 +08:00
|
|
|
|
z-index: 9999;
|
2024-05-16 18:54:30 +08:00
|
|
|
|
animation-duration: 0.5s !important;
|
2024-12-28 16:43:52 +08:00
|
|
|
|
|
2025-01-18 03:25:21 +08:00
|
|
|
|
&.play-bar-opcity {
|
|
|
|
|
|
@apply bg-transparent !important;
|
|
|
|
|
|
box-shadow: 0 0 20px 5px #0000001d;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&.animate__slideOutDown {
|
|
|
|
|
|
animation-duration: 0.3s !important;
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-16 18:54:30 +08:00
|
|
|
|
.music-content {
|
2024-12-15 01:40:13 +08:00
|
|
|
|
width: 160px;
|
2023-12-11 16:22:05 +08:00
|
|
|
|
@apply ml-4;
|
|
|
|
|
|
|
|
|
|
|
|
&-title {
|
2024-12-28 16:43:52 +08:00
|
|
|
|
@apply text-base;
|
2023-12-11 16:22:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&-name {
|
2024-12-28 16:43:52 +08:00
|
|
|
|
@apply text-xs mt-1 opacity-80;
|
2021-07-25 15:08:02 +08:00
|
|
|
|
}
|
2023-12-11 16:22:05 +08:00
|
|
|
|
}
|
2021-07-21 15:01:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.play-bar-img {
|
2023-12-11 16:22:05 +08:00
|
|
|
|
@apply w-14 h-14 rounded-2xl;
|
2021-07-21 15:01:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-07-21 17:45:21 +08:00
|
|
|
|
.music-buttons {
|
2024-12-15 01:40:13 +08:00
|
|
|
|
@apply mx-6 flex-1 flex justify-center;
|
2023-12-11 16:22:05 +08:00
|
|
|
|
|
|
|
|
|
|
.iconfont {
|
2024-12-28 16:43:52 +08:00
|
|
|
|
@apply text-2xl transition;
|
|
|
|
|
|
@apply hover:text-green-500;
|
2023-12-11 16:22:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.icon {
|
2024-12-28 16:43:52 +08:00
|
|
|
|
@apply text-3xl;
|
|
|
|
|
|
@apply hover:text-green-500;
|
2023-12-11 16:22:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@apply flex items-center;
|
|
|
|
|
|
|
2023-12-16 13:42:52 +08:00
|
|
|
|
> div {
|
2023-12-11 16:22:05 +08:00
|
|
|
|
@apply cursor-pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&-play {
|
2024-12-28 16:43:52 +08:00
|
|
|
|
@apply flex justify-center items-center w-20 h-12 rounded-full mx-4 transition text-gray-500;
|
2025-01-15 00:26:42 +08:00
|
|
|
|
@apply bg-gray-100 bg-opacity-60 dark:bg-gray-800 dark:bg-opacity-60 hover:bg-gray-200;
|
2023-12-11 16:22:05 +08:00
|
|
|
|
}
|
2021-07-21 17:45:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-15 01:40:13 +08:00
|
|
|
|
.audio-volume {
|
|
|
|
|
|
@apply flex items-center relative;
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
.volume-slider {
|
|
|
|
|
|
@apply opacity-100 visible;
|
|
|
|
|
|
}
|
2023-12-11 16:22:05 +08:00
|
|
|
|
}
|
2024-12-15 01:40:13 +08:00
|
|
|
|
.volume-icon {
|
|
|
|
|
|
@apply cursor-pointer;
|
2024-12-28 16:43:52 +08:00
|
|
|
|
}
|
2021-07-22 11:32:38 +08:00
|
|
|
|
|
2024-12-28 16:43:52 +08:00
|
|
|
|
.iconfont {
|
|
|
|
|
|
@apply text-2xl transition;
|
|
|
|
|
|
@apply hover:text-green-500;
|
2024-12-15 01:40:13 +08:00
|
|
|
|
}
|
2023-12-11 16:22:05 +08:00
|
|
|
|
|
2024-12-15 01:40:13 +08:00
|
|
|
|
.volume-slider {
|
2024-12-28 16:43:52 +08:00
|
|
|
|
@apply absolute opacity-0 invisible transition-all duration-300 bottom-[30px] left-1/2 -translate-x-1/2 h-[180px] px-2 py-4 rounded-xl;
|
|
|
|
|
|
@apply bg-light dark:bg-gray-800;
|
|
|
|
|
|
@apply border border-gray-200 dark:border-gray-700;
|
2023-12-11 16:22:05 +08:00
|
|
|
|
}
|
2021-07-21 17:45:21 +08:00
|
|
|
|
}
|
2021-07-22 17:31:43 +08:00
|
|
|
|
|
|
|
|
|
|
.audio-button {
|
2025-05-11 15:09:56 +08:00
|
|
|
|
@apply flex items-center;
|
2023-12-11 16:22:05 +08:00
|
|
|
|
|
|
|
|
|
|
.iconfont {
|
2025-05-11 15:09:56 +08:00
|
|
|
|
@apply text-2xl transition cursor-pointer mx-3;
|
2024-12-28 16:43:52 +08:00
|
|
|
|
@apply hover:text-green-500;
|
2023-12-11 16:22:05 +08:00
|
|
|
|
}
|
2021-07-22 17:31:43 +08:00
|
|
|
|
}
|
2023-12-27 14:39:52 +08:00
|
|
|
|
|
2024-05-16 18:54:30 +08:00
|
|
|
|
.music-play {
|
|
|
|
|
|
&-list {
|
2023-12-27 14:39:52 +08:00
|
|
|
|
height: 50vh;
|
2024-09-13 09:08:57 +08:00
|
|
|
|
width: 300px;
|
|
|
|
|
|
@apply relative rounded-3xl overflow-hidden py-2;
|
2024-05-16 18:54:30 +08:00
|
|
|
|
&-back {
|
2023-12-27 14:39:52 +08:00
|
|
|
|
backdrop-filter: blur(20px);
|
2024-12-28 16:43:52 +08:00
|
|
|
|
@apply absolute top-0 left-0 w-full h-full;
|
|
|
|
|
|
@apply bg-light dark:bg-black bg-opacity-75;
|
2023-12-27 14:39:52 +08:00
|
|
|
|
}
|
2024-05-16 18:54:30 +08:00
|
|
|
|
&-content {
|
2024-09-13 09:08:57 +08:00
|
|
|
|
@apply mx-2;
|
2023-12-27 14:39:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-05-23 17:12:35 +08:00
|
|
|
|
|
|
|
|
|
|
.mobile {
|
|
|
|
|
|
.music-play-bar {
|
2025-03-22 13:45:23 +08:00
|
|
|
|
@apply px-4 bottom-[56px] transition-all duration-300;
|
2024-05-23 17:12:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
.music-time {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ri-netease-cloud-music-line {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
.audio-volume {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
.audio-button {
|
|
|
|
|
|
@apply mx-0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.music-buttons {
|
|
|
|
|
|
@apply m-0;
|
|
|
|
|
|
&-prev,
|
|
|
|
|
|
&-next {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
&-play {
|
|
|
|
|
|
@apply m-0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.music-content {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-11-23 22:42:23 +08:00
|
|
|
|
|
2024-12-28 16:43:52 +08:00
|
|
|
|
// 自定义滑块样式
|
2024-11-23 22:42:23 +08:00
|
|
|
|
.custom-slider {
|
|
|
|
|
|
:deep(.n-slider) {
|
|
|
|
|
|
--n-rail-height: 4px;
|
2024-12-28 16:43:52 +08:00
|
|
|
|
--n-rail-color: theme('colors.gray.200');
|
|
|
|
|
|
--n-rail-color-dark: theme('colors.gray.700');
|
|
|
|
|
|
--n-fill-color: theme('colors.green.500');
|
2024-11-23 22:42:23 +08:00
|
|
|
|
--n-handle-size: 12px;
|
2024-12-28 16:43:52 +08:00
|
|
|
|
--n-handle-color: theme('colors.green.500');
|
2024-11-23 22:42:23 +08:00
|
|
|
|
|
2024-12-15 01:40:13 +08:00
|
|
|
|
&.n-slider--vertical {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
.n-slider-rail {
|
|
|
|
|
|
width: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
.n-slider-rail {
|
|
|
|
|
|
width: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.n-slider-handle {
|
|
|
|
|
|
width: 14px;
|
|
|
|
|
|
height: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-11-23 22:42:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.n-slider-rail {
|
2024-12-15 01:40:13 +08:00
|
|
|
|
@apply overflow-hidden transition-all duration-200;
|
2024-12-28 16:43:52 +08:00
|
|
|
|
@apply bg-gray-500 dark:bg-dark-300 bg-opacity-10 !important;
|
2024-11-23 22:42:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.n-slider-handle {
|
2024-12-15 01:40:13 +08:00
|
|
|
|
@apply transition-all duration-200;
|
2024-11-23 22:42:23 +08:00
|
|
|
|
opacity: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-30 12:56:42 +08:00
|
|
|
|
&:hover {
|
|
|
|
|
|
.n-slider-handle {
|
|
|
|
|
|
opacity: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 确保悬停时提示样式正确
|
|
|
|
|
|
.n-slider-tooltip {
|
|
|
|
|
|
@apply bg-gray-800 text-white text-xs py-1 px-2 rounded;
|
|
|
|
|
|
z-index: 999999;
|
2024-11-23 22:42:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-09 20:51:40 +08:00
|
|
|
|
.play-bar-img-wrapper {
|
|
|
|
|
|
@apply relative cursor-pointer w-14 h-14;
|
|
|
|
|
|
|
|
|
|
|
|
.hover-arrow {
|
|
|
|
|
|
@apply absolute inset-0 flex items-center justify-center opacity-0 transition-opacity duration-300 rounded-2xl;
|
|
|
|
|
|
background: rgba(0, 0, 0, 0.5);
|
|
|
|
|
|
|
|
|
|
|
|
.hover-content {
|
|
|
|
|
|
@apply flex flex-col items-center justify-center;
|
|
|
|
|
|
|
|
|
|
|
|
i {
|
|
|
|
|
|
@apply text-white mb-0.5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hover-text {
|
|
|
|
|
|
@apply text-white text-xs scale-90;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
.hover-arrow {
|
|
|
|
|
|
@apply opacity-100;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tooltip-content {
|
|
|
|
|
|
@apply text-sm py-1 px-2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.play-bar-img {
|
|
|
|
|
|
@apply w-14 h-14 rounded-2xl;
|
|
|
|
|
|
}
|
2024-12-14 13:49:32 +08:00
|
|
|
|
|
|
|
|
|
|
.like-active {
|
2024-12-28 16:43:52 +08:00
|
|
|
|
@apply text-red-500 hover:text-red-600 !important;
|
2024-12-14 13:49:32 +08:00
|
|
|
|
}
|
2024-12-15 01:40:13 +08:00
|
|
|
|
|
2025-03-08 19:00:50 +08:00
|
|
|
|
.disabled-icon {
|
|
|
|
|
|
@apply opacity-50 cursor-not-allowed !important;
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
@apply text-inherit !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-15 01:40:13 +08:00
|
|
|
|
.icon-loop,
|
|
|
|
|
|
.icon-single-loop {
|
|
|
|
|
|
font-size: 1.5rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.music-time .n-slider {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
|
}
|
2025-03-07 01:14:35 +08:00
|
|
|
|
|
|
|
|
|
|
.music-eq {
|
|
|
|
|
|
@apply p-4 rounded-3xl;
|
|
|
|
|
|
backdrop-filter: blur(20px);
|
|
|
|
|
|
@apply bg-light dark:bg-black bg-opacity-75;
|
|
|
|
|
|
}
|
2025-03-29 23:26:26 +08:00
|
|
|
|
|
|
|
|
|
|
.music-play-list-content {
|
|
|
|
|
|
@apply mx-2;
|
|
|
|
|
|
|
|
|
|
|
|
.delete-btn {
|
|
|
|
|
|
@apply p-2 rounded-full transition-colors duration-200 cursor-pointer;
|
|
|
|
|
|
@apply hover:bg-red-50 dark:hover:bg-red-900/20;
|
|
|
|
|
|
|
|
|
|
|
|
.iconfont {
|
|
|
|
|
|
@apply text-lg;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-05-10 20:12:10 +08:00
|
|
|
|
|
|
|
|
|
|
@keyframes spin {
|
|
|
|
|
|
0% {
|
|
|
|
|
|
transform: rotate(0deg);
|
|
|
|
|
|
}
|
|
|
|
|
|
100% {
|
|
|
|
|
|
transform: rotate(360deg);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.loading-overlay {
|
|
|
|
|
|
@apply absolute inset-0 flex items-center justify-center rounded-2xl;
|
|
|
|
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
|
|
|
|
z-index: 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.loading-icon {
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
animation: spin 1s linear infinite;
|
|
|
|
|
|
}
|
2025-05-19 17:59:20 +08:00
|
|
|
|
|
|
|
|
|
|
.play-speed {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
padding: 0 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.speed-button {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: var(--text-color);
|
|
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
background: var(--hover-color);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.speed-button:hover {
|
|
|
|
|
|
background: var(--hover-color-dark);
|
|
|
|
|
|
}
|
2023-12-11 16:22:05 +08:00
|
|
|
|
</style>
|