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 <div class =" actions" >
7277 <n-button
@@ -296,6 +301,7 @@ import {
296301import { formatSongsList , removeBrackets } from " @/utils/format" ;
297302import { useSettingStore } from " @/stores" ;
298303import dayjs from " dayjs" ;
304+ import { formatTimestamp } from " @/utils/time" ;
299305
300306const route = useRoute ();
301307const player = usePlayerController ();
@@ -308,6 +314,11 @@ const viewModel = ref<WikiViewModel | null>(null);
308314const similarSongsList = ref <SongType []>([]);
309315const sheetLoading = ref <Record <number , boolean >>({});
310316
317+ const publishTime = computed (() => {
318+ const createTime = currentSong .value ?.createTime ;
319+ return typeof createTime === " number" ? formatTimestamp (createTime , " YYYY-MM-DD" ) : " " ;
320+ });
321+
311322// 简单的转换逻辑,避免过多判断
312323const normalizeWikiData = (
313324 wiki : SongWikiData | null ,
@@ -568,7 +579,7 @@ onActivated(() => {
568579 margin-right : 4px ;
569580 flex-shrink : 0 ;
570581 }
571- .n -text {
582+ .clickable -text {
572583 cursor : pointer ;
573584 & :hover {
574585 color : var (--primary-hex );
0 commit comments