Files
zkxw/web-admin/src/components/common/list-datetime-column.vue
T
2026-06-30 16:48:52 +08:00

39 lines
950 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- 列表日期时间列:无意义 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>