fix(table): 修复日期格式化和表格列固定问题
- 修正日期格式从 YY-MM-DD 为 YYYY-MM-DD - 修正日期时间格式从 YY-MM-DD HH:mm:ss 为 YYYY-MM-DD HH:mm:ss
This commit is contained in:
@@ -13,7 +13,7 @@ export function FormatDate(value) {
|
||||
if (!value) {
|
||||
return '-'
|
||||
}
|
||||
return dayjs(value).format('YY-MM-DD')
|
||||
return dayjs(value).format('YYYY-MM-DD')
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -26,7 +26,7 @@ export function FormatDateTime(value) {
|
||||
if (!value) {
|
||||
return '-'
|
||||
}
|
||||
return dayjs(value).format('YY-MM-DD HH:mm:ss')
|
||||
return dayjs(value).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<el-table-column prop="description" label="描述" />
|
||||
<el-table-column prop="createTime" label="创建时间" sortable="custom" :formatter="FormatRowDateTimeStr" />
|
||||
<el-table-column prop="createBy" label="创建人" />
|
||||
<el-table-column label="操作" width="150" min-width="150" fixed="right">
|
||||
<el-table-column label="操作" width="150" min-width="150">
|
||||
<template v-slot="scope">
|
||||
<div>
|
||||
<el-button type="text" @click="onTableEditClick(scope.row)">编辑</el-button>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<cute-button type="primary">导出</cute-button>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-table-column label="操作" width="150" min-width="150" fixed="right">
|
||||
<el-table-column label="操作" width="150" min-width="150">
|
||||
<template v-slot="scope">
|
||||
<div>
|
||||
<el-button type="text" @click="onTableEditClick(scope.row)">编辑</el-button>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<el-table-column prop="description" label="描述" />
|
||||
<el-table-column prop="createTime" label="创建时间" sortable="custom" :formatter="FormatRowDateTimeStr" />
|
||||
<el-table-column prop="createBy" label="创建人" />
|
||||
<el-table-column label="操作" width="150" min-width="150" fixed="right">
|
||||
<el-table-column label="操作" width="150" min-width="150">
|
||||
<template v-slot="scope">
|
||||
<div>
|
||||
<el-button type="text" @click="onTableEditClick(scope.row)">编辑</el-button>
|
||||
|
||||
Reference in New Issue
Block a user