fix: 优化后台列表字段宽度
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
class="table-fill"
|
||||
flex-height
|
||||
remote
|
||||
:scroll-x="1320"
|
||||
:scroll-x="1420"
|
||||
:row-key="(r) => r.id"
|
||||
/>
|
||||
<div class="table-pagination">
|
||||
@@ -78,32 +78,35 @@ const { pagination, page, pageSize, resetPage, setPageResult } = useTablePage(lo
|
||||
const resultOptions = Object.values(QueryResult).map((v) => ({ label: t(`common.queryResult.${v}`), value: v }));
|
||||
|
||||
const columns: DataTableColumns<any> = [
|
||||
{ title: () => t('pages.traceCode.shortCode'), key: 'shortCode', width: 120, ellipsis: { tooltip: true }, render: (r) => r.shortCode || '-' },
|
||||
{ title: () => t('pages.artwork.archiveNo'), key: 'archiveNo', width: 140, ellipsis: { tooltip: true }, render: (r) => r.archiveNo || '-' },
|
||||
{ title: () => t('pages.traceCode.batchNo'), key: 'batchNo', width: 130, ellipsis: { tooltip: true }, render: (r) => r.batchNo || '-' },
|
||||
{ title: () => t('pages.traceCode.shortCode'), key: 'shortCode', width: 130, align: 'center', ellipsis: { tooltip: true }, render: (r) => r.shortCode || '-' },
|
||||
{ title: () => t('pages.artwork.archiveNo'), key: 'archiveNo', width: 150, align: 'center', ellipsis: { tooltip: true }, render: (r) => r.archiveNo || '-' },
|
||||
{ title: () => t('pages.traceCode.batchNo'), key: 'batchNo', width: 140, align: 'center', ellipsis: { tooltip: true }, render: (r) => r.batchNo || '-' },
|
||||
{
|
||||
title: () => renderTableFilterTitle(t('pages.queryLog.result'), query.result, resultOptions, (value) => setResultFilter(value)),
|
||||
key: 'queryResult',
|
||||
width: 104,
|
||||
width: 124,
|
||||
align: 'center',
|
||||
render: (r) => h(NTag, { size: 'small', type: statusType(r.queryResult) }, { default: () => t(`common.queryResult.${r.queryResult}`) }),
|
||||
},
|
||||
{ title: () => t('pages.traceCode.queryCount'), key: 'queryCount', width: 90, render: (r) => (r.queryCount ?? '-') },
|
||||
{ title: () => t('pages.traceCode.firstActivatedAt'), key: 'firstActivatedAt', width: 160, render: (r) => fmt(r.firstActivatedAt) },
|
||||
{ title: () => t('pages.traceCode.queryCount'), key: 'queryCount', width: 100, align: 'center', render: (r) => (r.queryCount ?? '-') },
|
||||
{ title: () => t('pages.traceCode.firstActivatedAt'), key: 'firstActivatedAt', width: 160, align: 'center', render: (r) => fmt(r.firstActivatedAt) },
|
||||
{
|
||||
title: () => t('pages.queryLog.ip'),
|
||||
key: 'ip',
|
||||
width: 160,
|
||||
align: 'center',
|
||||
ellipsis: { tooltip: true },
|
||||
render: (r) => r.ip || '-',
|
||||
},
|
||||
{
|
||||
title: () => t('pages.queryLog.device'),
|
||||
key: 'deviceType',
|
||||
width: 150,
|
||||
minWidth: 180,
|
||||
align: 'center',
|
||||
ellipsis: { tooltip: true },
|
||||
render: (r) => [r.deviceType, r.os, r.browser].filter(Boolean).join(' / ') || '-',
|
||||
},
|
||||
{ title: () => t('pages.queryLog.queriedAt'), key: 'queriedAt', width: 160, render: (r) => fmt(r.queriedAt) },
|
||||
{ title: () => t('pages.queryLog.queriedAt'), key: 'queriedAt', width: 160, align: 'center', render: (r) => fmt(r.queriedAt) },
|
||||
];
|
||||
|
||||
async function load() {
|
||||
|
||||
Reference in New Issue
Block a user