仰望星辰工作室

starmusic-mobile

starmusic-mobile/ pages/my-list/my-list-fixed.vue 2.7 KB · 74 行 原始文件
1<template>
2 <view class="page">
3 <!-- 列表切换 -->
4 <view class="list-tabs">
5 <view
6 v-for="tab in tabs"
7 :key="tab.id"
8 class="tab-item"
9 :class="{ active: currentTab === tab.id }"
10 @click="handleTabChange(tab.id)"
11 >
12 {{ tab.name }}<text v-if="tab.count" class="tab-count">({{ tab.count }})</text>
13 </view>
14 </view>
15
16 <!-- 歌曲列表 -->
17 <view class="list-container">
18 <music-list
19 :list="currentList"
20 :current-music-id="currentMusicId"
21 empty-text="列表为空,去搜索添加歌曲吧"
22 :show-more="true"
23 :batch-mode="batchMode"
24 :batch-selected-ids="batchSelectedIds"
25 @item-click="handleMusicClick"
26 @item-longpress="handleItemLongPress"
27 @more="handleMore"
28 @batch-toggle="handleBatchToggle"
29 />
30 </view>
31
32 <!-- 播放全部 -->
33 <view v-if="currentList.length" class="play-all-bar">
34 <view class="play-all-btn" @click="handlePlayAll">
35 <lx-icon name="play-all" :size="32" color="#fff" />
36 <text>播放全部</text>
37 </view>
38 </view>
39
40 <!-- 批量操作栏 -->
41 <view v-if="batchMode" class="batch-bar">
42 <view class="batch-info">已选 {{ batchSelectedIds.length }} 首</view>
43 <view class="batch-actions">
44 <view class="batch-btn" @click="handleBatchDelete">
45 <lx-icon name="close" :size="24" color="#f56c6c" />
46 <text>删除</text>
47 </view>
48 <view class="batch-btn" @click="handleBatchCollect">
49 <lx-icon name="heart" :size="24" color="#ff4d4f" />
50 <text>{{ currentTab === 'love' ? '取消收藏' : '收藏' }}</text>
51 </view>
52 <view class="batch-btn exit" @click="exitBatchMode">退出</view>
53 </view>
54 </view>
55
56 <!-- 操作弹层 -->
57 <view v-if="showActions" class="mask" @click="showActions = false">
58 <view class="action-sheet" @click.stop>
59 <view class="sheet-title">{{ actionTarget ? actionTarget.name : '' }}</view>
60 <view class="action-item" @click="handleAction('play')">播放</view>
61 <view class="action-item" @click="handleAction('remove')">从列表移除</view>
62 <view class="action-item" @click="handleAction('collect')">
63 {{ actionTarget && isLoved(actionTarget) ? '取消收藏' : '收藏' }}
64 </view>
65 <view class="action-item cancel" @click="showActions = false">取消</view>
66 </view>
67 </view>
68
69 <!-- 底部播放栏 -->
70 <view class="bottom-bar">
71 <player-bar />
72 </view>
73 </view>
74 </template>