3434 <template v-if =" Array .isArray (currentSong .artists )" >
3535 <n-text
3636 v-for =" (ar, index) in currentSong.artists"
37+ class =" clickable-text"
3738 :key =" ar.id"
3839 @click =" $router.push({ name: 'artist', query: { id: ar.id } })"
3940 >
5253 <SvgIcon name =" Album" :depth =" 3" />
5354 <n-text
5455 v-if =" typeof currentSong.album !== 'string'"
55- class =" text-hidden"
56+ class =" text-hidden clickable-text "
5657 @click =" $router.push({ name: 'album', query: { id: currentSong.album.id } })"
5758 >
5859 {{
6768 : currentSong.album
6869 }}</n-text >
6970 </div >
71+ <div class =" item" v-if =" publishTime" title =" 发行日期" >
72+ <SvgIcon name =" Time" :depth =" 3" />
73+ <n-text class =" text-hidden" >{{ publishTime }}</n-text >
74+ </div >
7075 </div >
7176 <n-flex class =" actions" >
7277 <n-button
@@ -308,6 +313,7 @@ import { formatSongsList, removeBrackets } from "@/utils/format";
308313import { useSettingStore } from " @/stores" ;
309314import dayjs from " dayjs" ;
310315import { useSongMenu } from " @/composables/useSongMenu" ;
316+ import { formatTimestamp } from " @/utils/time" ;
311317
312318const route = useRoute ();
313319const player = usePlayerController ();
@@ -322,6 +328,11 @@ const viewModel = ref<WikiViewModel | null>(null);
322328const similarSongsList = ref <SongType []>([]);
323329const sheetLoading = ref <Record <number , boolean >>({});
324330
331+ const publishTime = computed (() => {
332+ const createTime = currentSong .value ?.createTime ;
333+ return typeof createTime === " number" ? formatTimestamp (createTime , " YYYY-MM-DD" ) : " " ;
334+ });
335+
325336// 简单的转换逻辑,避免过多判断
326337const normalizeWikiData = (
327338 wiki : SongWikiData | null ,
@@ -582,7 +593,7 @@ onActivated(() => {
582593 margin-right : 4px ;
583594 flex-shrink : 0 ;
584595 }
585- .n -text {
596+ .clickable -text {
586597 cursor : pointer ;
587598 & :hover {
588599 color : var (--primary-hex );
0 commit comments