| | |
| | | import { ElTag } from 'element-plus' |
| | | import ArtButtonTable from '@/components/core/forms/art-button-table/index.vue' |
| | | |
| | | export function createConfigTableColumns({ handleView, handleEdit, handleDelete }) { |
| | | export function createConfigTableColumns({ t, handleView, handleEdit, handleDelete }) { |
| | | return [ |
| | | { |
| | | prop: 'uuid', |
| | | label: '编号', |
| | | label: t('table.code'), |
| | | minWidth: 140, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'name', |
| | | label: '名称', |
| | | label: t('table.name'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'flag', |
| | | label: '标识', |
| | | label: t('pages.system.config.table.flag'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true |
| | | }, |
| | | { |
| | | prop: 'typeText', |
| | | label: '类型', |
| | | label: t('pages.system.config.table.type'), |
| | | width: 110, |
| | | formatter: (row) => row.typeText || '-' |
| | | formatter: (row) => t(row.typeTextKey || 'common.placeholder.empty') |
| | | }, |
| | | { |
| | | prop: 'val', |
| | | label: '值', |
| | | label: t('pages.system.config.table.value'), |
| | | minWidth: 180, |
| | | showOverflowTooltip: true, |
| | | formatter: (row) => row.val || '-' |
| | | formatter: (row) => row.val || t('common.placeholder.empty') |
| | | }, |
| | | { |
| | | prop: 'status', |
| | | label: '状态', |
| | | label: t('table.status'), |
| | | width: 100, |
| | | formatter: (row) => h(ElTag, { type: row.statusType, effect: 'light' }, () => row.statusText || '-') |
| | | formatter: (row) => |
| | | h(ElTag, { type: row.statusType, effect: 'light' }, () => |
| | | t(row.statusTextKey || 'common.placeholder.empty') |
| | | ) |
| | | }, |
| | | { |
| | | prop: 'updateTimeText', |
| | | label: '更新时间', |
| | | label: t('table.updateTime'), |
| | | minWidth: 180, |
| | | formatter: (row) => row.updateTimeText || '-' |
| | | formatter: (row) => row.updateTimeText || t('common.placeholder.empty') |
| | | }, |
| | | { |
| | | prop: 'operation', |
| | | label: '操作', |
| | | label: t('table.operation'), |
| | | width: handleDelete ? 160 : 120, |
| | | align: 'right', |
| | | formatter: (row) => { |