39 lines
950 B
Vue
39 lines
950 B
Vue
<!-- 列表日期时间列:无意义 00:00:00 时只展示日期 -->
|
||
<template>
|
||
<el-table-column
|
||
:prop="prop"
|
||
:label="label"
|
||
:min-width="minWidth"
|
||
:width="width"
|
||
:align="align"
|
||
:header-align="headerAlign"
|
||
:fixed="fixed"
|
||
:show-overflow-tooltip="showOverflowTooltip"
|
||
>
|
||
<template #default="{ row }">{{ formatDisplayOrDash(row[prop]) }}</template>
|
||
</el-table-column>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
import { formatDisplayOrDash } from '@/utils/datetime-display'
|
||
|
||
defineOptions({ name: 'ListDatetimeColumn' })
|
||
|
||
withDefaults(
|
||
defineProps<{
|
||
prop: string
|
||
label: string
|
||
minWidth?: number | string
|
||
width?: number | string
|
||
align?: 'left' | 'center' | 'right'
|
||
headerAlign?: 'left' | 'center' | 'right'
|
||
fixed?: boolean | 'left' | 'right'
|
||
showOverflowTooltip?: boolean
|
||
}>(),
|
||
{
|
||
align: 'center',
|
||
headerAlign: 'center'
|
||
}
|
||
)
|
||
</script>
|