From fc62e83f73b4b8ff4714f995da4eafbb7f525d1a Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 18 八月 2026 23:30:10 +0800
Subject: [PATCH] feat(table): 统一表格日期字段展示格式为YYYY-MM-DD
---
src/components/PIMTable/PIMTable.vue | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index d63c197..0045336 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -11,7 +11,7 @@
:row-key="rowKey"
:style="tableStyle"
tooltip-effect="dark"
- :tooltip-options="{ appendTo: 'body' }"
+ :tooltip-options="{ popperOptions: { strategy: 'absolute' } }"
:expand-row-keys="expandRowKeys"
:show-summary="isShowSummary"
:summary-method="summaryMethod"
@@ -112,6 +112,10 @@
{{ formatters(scope.row[item.prop], item.formatData) }}
</el-tag>
</div>
+ <!-- 鏃堕棿绫诲瀷 -->
+ <div v-else-if="item.dataType === 'date'">
+ {{ scope.row[item.prop] ? dayjs(scope.row[item.prop]).format('YYYY-MM-DD') : '' }}
+ </div>
<!-- 鎸夐挳 -->
<div v-else-if="item.dataType == 'action'"
@click.stop>
@@ -204,6 +208,7 @@
import pagination from "./Pagination.vue";
import { computed, ref, inject, getCurrentInstance } from "vue";
import { ElMessage } from "element-plus";
+ import dayjs from "dayjs";
// 鑾峰彇鍏ㄥ眬鐨� uploadHeader
const { proxy } = getCurrentInstance();
--
Gitblit v1.9.3