From a775247a9f6a894d0a17b23c82953c6d04a2258d Mon Sep 17 00:00:00 2001 From: zzp <34701892@qq.com> Date: Wed, 17 Sep 2025 14:52:18 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96):=20=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E5=8C=96=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=B9=B6=E6=9B=BF=E6=8D=A2dayjs=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加timeFormat函数用于更灵活地处理时间格式化,支持多种格式和不同时间戳类型 移除dayjs依赖,使用原生Date对象实现时间格式化功能 --- src/components/RankList.vue | 56 +++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/src/components/RankList.vue b/src/components/RankList.vue index 29fa395..f0a8576 100644 --- a/src/components/RankList.vue +++ b/src/components/RankList.vue @@ -43,7 +43,11 @@ {{ item.source }} - {{ dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss") }} + + + + {{ timeFormat(new Date(item.publish_time).getTime()) }} + 资讯评分: @@ -70,7 +74,7 @@