From 4ac793f155ddf760e53d6511a35cc869c443c730 Mon Sep 17 00:00:00 2001 From: Megghy Date: Fri, 2 May 2025 06:37:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=BB=84=E4=BB=B6=E5=92=8C=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在多个组件中引入 NTime 和 NTooltip 以优化时间显示 - 修改 ActionHistoryViewer.vue 和 CheckInSettings.vue 中的时间渲染逻辑 - 在 CheckInRankingView.vue 中实现时间的相对显示和格式化 - 修复商品页加载问题 --- .../autoaction/ActionHistoryViewer.vue | 12 ++++++++---- .../autoaction/settings/CheckInSettings.vue | 16 +++++++++++++--- src/components.d.ts | 1 + src/views/manage/point/PointManage.vue | 4 ++-- src/views/view/CheckInRankingView.vue | 15 ++++++++++++++- 5 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/client/components/autoaction/ActionHistoryViewer.vue b/src/client/components/autoaction/ActionHistoryViewer.vue index 485d676..da2c120 100644 --- a/src/client/components/autoaction/ActionHistoryViewer.vue +++ b/src/client/components/autoaction/ActionHistoryViewer.vue @@ -36,11 +36,15 @@ const columns = [ width: 180, sorter: (a: HistoryItem, b: HistoryItem) => a.timestamp - b.timestamp, render: (row: HistoryItem) => { - return h(NTime, { - time: new Date(row.timestamp), - format: 'yyyy-MM-dd HH:mm:ss' + return h(NTooltip, { + }, { + trigger: () => h(NTime, { + time: row.timestamp, + type: 'relative' + }), + default: () => new Date(row.timestamp).toLocaleString() }); - } + }, }, { title: '操作名称', diff --git a/src/client/components/autoaction/settings/CheckInSettings.vue b/src/client/components/autoaction/settings/CheckInSettings.vue index 64e5383..81215f7 100644 --- a/src/client/components/autoaction/settings/CheckInSettings.vue +++ b/src/client/components/autoaction/settings/CheckInSettings.vue @@ -43,7 +43,10 @@