|
@@ -1,95 +1,86 @@
|
|
|
<template>
|
|
|
- <!-- Header -->
|
|
|
- <view class="header">
|
|
|
- <view class="header-left">
|
|
|
- <!-- 播放按钮 -->
|
|
|
- <view class="play-circle">
|
|
|
- <image
|
|
|
- @click="palyBtn"
|
|
|
- style="width: 48rpx; height: 48rpx"
|
|
|
- src="/src/static//icon/fi-rr-play-alt.svg"
|
|
|
- ></image>
|
|
|
+ <view>
|
|
|
+ <!-- Header -->
|
|
|
+ <view class="header">
|
|
|
+ <view class="header-left">
|
|
|
+ <!-- 播放按钮 -->
|
|
|
+ <view class="play-circle">
|
|
|
+ <image
|
|
|
+ @click="palyBtn"
|
|
|
+ style="width: 48rpx; height: 48rpx"
|
|
|
+ src="/src/static//icon/fi-rr-play-alt.svg"
|
|
|
+ ></image>
|
|
|
+ </view>
|
|
|
+ <text class="text-gray">播放全部 (22首)</text>
|
|
|
</view>
|
|
|
- <text class="text-gray">播放全部 (22首)</text>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 循环播放 -->
|
|
|
- <view class="header-right">
|
|
|
- <image
|
|
|
- @click="cycleBtn"
|
|
|
- style="width: 32rpx; height: 32rpx"
|
|
|
- src="/src/static/icon/fi-rr-refresh.svg"
|
|
|
- ></image>
|
|
|
- <image style="width: 32rpx; height: 32rpx" src="/src/static/icon/fi-rr-shuffle.svg"></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
|
|
|
- <!-- 当前播放 -->
|
|
|
- <view class="currently-playing">
|
|
|
- <view class="currently-playing-left">
|
|
|
- <view class="play-circle">
|
|
|
- <image
|
|
|
- @click="palyBtn"
|
|
|
- style="width: 28rpx; height: 28rpx"
|
|
|
- src="/src/static//icon/fi-rr-play.svg"
|
|
|
- v-if="type === 0"
|
|
|
- ></image>
|
|
|
- <image
|
|
|
- @click="palyBtn"
|
|
|
- style="width: 28rpx; height: 28rpx"
|
|
|
- src="/src/static//icon/fi-rr-play.svg"
|
|
|
- v-else
|
|
|
- ></image>
|
|
|
+ <!-- 循环播放 -->
|
|
|
+ <view class="header-right">
|
|
|
+ <image @click="cycleBtn" class="imgIcon" src="/src/static/icon/fi-rr-refresh.svg"></image>
|
|
|
+ <image class="imgIcon" src="/src/static/icon/fi-rr-shuffle.svg"></image>
|
|
|
</view>
|
|
|
- <text class="text-gray">继续播放: 小燕子(供暖版) - 贝乐虎儿歌贝乐虎儿歌贝乐虎儿歌</text>
|
|
|
- </view>
|
|
|
- <!-- 循环播放 -->
|
|
|
- <view style="display: flex; gap: 80rpx">
|
|
|
- <image
|
|
|
- @click="cycleBtn"
|
|
|
- style="width: 32rpx; height: 32rpx"
|
|
|
- src="/src/static/icon/fi-rr-pause.svg"
|
|
|
- ></image>
|
|
|
- <image
|
|
|
- style="width: 32rpx; height: 32rpx"
|
|
|
- src="/src/static/icon/fi-rr-cross-small.svg"
|
|
|
- ></image>
|
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
- <!-- 播放列表 -->
|
|
|
- <view class="playlist">
|
|
|
- <view v-for="(song, index) in songs" :key="index" class="playlist-item">
|
|
|
- <view class="album-cover">
|
|
|
- <view class="cover-inner">
|
|
|
+ <!-- 当前播放 -->
|
|
|
+ <view class="currently-playing">
|
|
|
+ <view class="currently-playing-left">
|
|
|
+ <view class="play-circle">
|
|
|
<image
|
|
|
- style="width: 100rpx; height: 100rpx"
|
|
|
- src="/src/static/icon/fi-rr-big-play.svg"
|
|
|
+ @click="palyBtn"
|
|
|
+ class="palyIcon"
|
|
|
+ src="/src/static//icon/fi-rr-play.svg"
|
|
|
+ v-if="type === 0"
|
|
|
+ ></image>
|
|
|
+ <image
|
|
|
+ @click="palyBtn"
|
|
|
+ class="palyIcon"
|
|
|
+ src="/src/static//icon/fi-rr-play.svg"
|
|
|
+ v-else
|
|
|
></image>
|
|
|
</view>
|
|
|
+ <text class="text-gray">继续播放: 小燕子(供暖版) - 贝乐虎儿歌贝乐虎儿歌贝乐虎儿歌</text>
|
|
|
</view>
|
|
|
- <view class="song-details" @click="playFavoriteBtn(song, index)">
|
|
|
- <text class="song-name">{{ song.name }}</text>
|
|
|
+ <!-- 循环播放 -->
|
|
|
+ <view style="display: flex; gap: 80rpx">
|
|
|
+ <image @click="cycleBtn" class="imgIcon" src="/src/static/icon/fi-rr-pause.svg"></image>
|
|
|
+ <image class="imgIcon" src="/src/static/icon/fi-rr-cross-small.svg"></image>
|
|
|
</view>
|
|
|
- <view class="song-controls">
|
|
|
- <text>{{ song.duration }}</text>
|
|
|
- <image
|
|
|
- style="width: 40rpx; height: 40rpx"
|
|
|
- v-if="type === 0"
|
|
|
- :src="
|
|
|
- song.favorite
|
|
|
- ? '/src/static/icon/fi-rr-heart-grey.svg'
|
|
|
- : '/src/static/icon/fi-rr-heart.svg'
|
|
|
- "
|
|
|
- @click="toggleFavorite(song)"
|
|
|
- ></image>
|
|
|
+ </view>
|
|
|
|
|
|
- <image
|
|
|
- v-else
|
|
|
- style="width: 40rpx; height: 40rpx"
|
|
|
- src="/src/static/icon/fi-rr-heart.svg"
|
|
|
- @click="toggHeartCancel(song)"
|
|
|
- ></image>
|
|
|
+ <!-- 播放列表 -->
|
|
|
+ <view class="playlist">
|
|
|
+ <view v-for="(song, index) in songs" :key="index" class="playlist-item">
|
|
|
+ <view class="album-cover">
|
|
|
+ <view class="cover-inner">
|
|
|
+ <image
|
|
|
+ style="width: 100rpx; height: 100rpx"
|
|
|
+ src="/src/static/icon/fi-rr-big-play.svg"
|
|
|
+ ></image>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="song-details" @click="playFavoriteBtn(song, index)">
|
|
|
+ <text class="song-name">{{ song.name }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="song-controls">
|
|
|
+ <text>{{ song.duration }}</text>
|
|
|
+ <image
|
|
|
+ style="width: 40rpx; height: 40rpx"
|
|
|
+ v-if="type === 0"
|
|
|
+ :src="
|
|
|
+ song.favorite
|
|
|
+ ? '/src/static/icon/fi-rr-heart-grey.svg'
|
|
|
+ : '/src/static/icon/fi-rr-heart.svg'
|
|
|
+ "
|
|
|
+ @click="toggleFavorite(song)"
|
|
|
+ ></image>
|
|
|
+
|
|
|
+ <image
|
|
|
+ v-else
|
|
|
+ style="width: 40rpx; height: 40rpx"
|
|
|
+ src="/src/static/icon/fi-rr-heart.svg"
|
|
|
+ @click="toggHeartCancel(song)"
|
|
|
+ ></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -97,11 +88,10 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref } from 'vue'
|
|
|
- import musicPlayback from './musicPlayback.vue'
|
|
|
+
|
|
|
const props = defineProps({
|
|
|
type: {
|
|
|
type: Number,
|
|
|
- // eslint-disable-next-line vue/require-valid-default-prop
|
|
|
default: true,
|
|
|
},
|
|
|
})
|
|
@@ -195,7 +185,7 @@
|
|
|
color: #6b7280;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
- /* 播发 */
|
|
|
+ /* 播放 */
|
|
|
.currently-playing {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
@@ -261,4 +251,12 @@
|
|
|
font-weight: 400;
|
|
|
color: var(--999, #999);
|
|
|
}
|
|
|
+ .imgIcon {
|
|
|
+ width: 32rpx;
|
|
|
+ height: 32rpx;
|
|
|
+ }
|
|
|
+ .palyIcon {
|
|
|
+ width: 28rpx;
|
|
|
+ height: 28rpx;
|
|
|
+ }
|
|
|
</style>
|