From cc6c6e311ebac8da82e4749bca6b34bf92df7711 Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Mon, 26 May 2025 08:28:47 +1000 Subject: [PATCH] =?UTF-8?q?feat(=E6=92=AD=E6=94=BE=E6=8E=A7=E5=88=B6):=20?= =?UTF-8?q?=E4=B8=BA=E6=9B=B2=E7=9B=AE=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=92=AD=E6=94=BE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 TrackItem 组件中添加 playfrom 属性,用于接收播放函数 - 修改 playTheAlbum 函数支持从指定索引开始播放 - 为 TrackItem 按钮添加点击事件,点击时调用 playfrom 函数 --- src/components/TrackItem.vue | 6 ++++-- src/pages/AlbumDetail.vue | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/TrackItem.vue b/src/components/TrackItem.vue index c190ad4..4fcaec6 100644 --- a/src/components/TrackItem.vue +++ b/src/components/TrackItem.vue @@ -4,13 +4,15 @@ import { artistsOrganize } from '../utils' defineProps<{ album?: Album, track: Song, - index: number + index: number, + playfrom: (index: number) => void, }>()