fix: 优化后台列表字段宽度
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
class="table-fill"
|
||||
flex-height
|
||||
remote
|
||||
:scroll-x="1680"
|
||||
:scroll-x="1780"
|
||||
:row-key="(r) => r.id"
|
||||
v-model:checked-row-keys="checkedKeys"
|
||||
/>
|
||||
@@ -301,6 +301,7 @@ const columns = computed<DataTableColumns<any>>(() => {
|
||||
title: () => renderFilterTitle(t('pages.traceCode.batchNo'), query.batchId, batchOptions.value, (value) => setHeaderFilter('batchId', value)),
|
||||
key: 'batch',
|
||||
width: 150,
|
||||
align: 'center',
|
||||
render: (r) => r.batch?.batchNo || '-',
|
||||
},
|
||||
{
|
||||
@@ -309,28 +310,30 @@ const columns = computed<DataTableColumns<any>>(() => {
|
||||
setHeaderFilter('outboundStatus', value),
|
||||
),
|
||||
key: 'outboundStatus',
|
||||
width: 96,
|
||||
width: 124,
|
||||
align: 'center',
|
||||
render: (r) =>
|
||||
r.outTime || r.outImage || getOutImages(r).length
|
||||
? h(NTag, { size: 'small', type: 'success' }, { default: () => t('pages.traceCode.outRegistered') })
|
||||
: h(NText, { depth: 3 }, { default: () => t('pages.traceCode.notOutbound') }),
|
||||
},
|
||||
{ title: () => t('pages.outbound.outTime'), key: 'outTime', width: 150, render: (r) => fmt(r.outTime) },
|
||||
{ title: () => t('pages.outbound.outTime'), key: 'outTime', width: 150, align: 'center', render: (r) => fmt(r.outTime) },
|
||||
{
|
||||
title: () => t('pages.traceCode.onchainStatus'),
|
||||
key: 'onchainStatus',
|
||||
width: 100,
|
||||
width: 112,
|
||||
align: 'center',
|
||||
render: (r) =>
|
||||
r.latestAnyProof
|
||||
? h(NTag, { size: 'small', type: statusType(r.latestAnyProof.status) }, { default: () => t(`common.status.${r.latestAnyProof.status}`) })
|
||||
: h(NText, { depth: 3 }, { default: () => t('pages.traceCode.noOnchain') }),
|
||||
},
|
||||
{ title: () => t('pages.traceCode.shortCode'), key: 'shortCode', width: 120 },
|
||||
{ title: () => t('common.label.createdAt'), key: 'createdAt', width: 150, render: (r) => fmt(r.createdAt) },
|
||||
{ title: () => t('pages.traceCode.shortCode'), key: 'shortCode', width: 120, align: 'center' },
|
||||
{ title: () => t('common.label.createdAt'), key: 'createdAt', width: 150, align: 'center', render: (r) => fmt(r.createdAt) },
|
||||
{
|
||||
title: () => t('pages.traceCode.url'),
|
||||
key: 'url',
|
||||
width: 320,
|
||||
minWidth: 420,
|
||||
ellipsis: { tooltip: true },
|
||||
render: (r) =>
|
||||
h(
|
||||
@@ -343,16 +346,18 @@ const columns = computed<DataTableColumns<any>>(() => {
|
||||
title: () => renderFilterTitle(t('pages.traceCode.group'), query.groupId, groupFilterOptions.value, (value) => setHeaderFilter('groupId', value)),
|
||||
key: 'group',
|
||||
width: 110,
|
||||
align: 'center',
|
||||
render: (r) => r.group?.name || h(NText, { depth: 3 }, { default: () => t('pages.traceCode.noGroup') }),
|
||||
},
|
||||
{
|
||||
title: () => renderFilterTitle(t('common.label.status'), query.status, statusOptions, (value) => setHeaderFilter('status', value)),
|
||||
key: 'status',
|
||||
width: 96,
|
||||
width: 108,
|
||||
align: 'center',
|
||||
render: (r) => h(NTag, { size: 'small', type: statusType(r.status) }, { default: () => t(`common.status.${r.status}`) }),
|
||||
},
|
||||
{ title: () => t('pages.traceCode.queryCount'), key: 'queryCount', width: 84 },
|
||||
{ title: () => t('pages.traceCode.firstActivatedAt'), key: 'firstActivatedAt', width: 150, render: (r) => fmt(r.firstActivatedAt) },
|
||||
{ title: () => t('pages.traceCode.queryCount'), key: 'queryCount', width: 100, align: 'center' },
|
||||
{ title: () => t('pages.traceCode.firstActivatedAt'), key: 'firstActivatedAt', width: 150, align: 'center', render: (r) => fmt(r.firstActivatedAt) },
|
||||
{
|
||||
title: () => t('common.label.operation'),
|
||||
key: 'ops',
|
||||
@@ -384,8 +389,8 @@ const columns = computed<DataTableColumns<any>>(() => {
|
||||
base.splice(
|
||||
4,
|
||||
0,
|
||||
{ title: () => t('pages.artwork.archiveNo'), key: 'archiveNo', width: 130, render: (r) => r.artwork?.archiveNo || '-' },
|
||||
{ title: () => t('pages.artwork.title'), key: 'artwork', width: 130, render: (r) => r.artwork?.title || '-' },
|
||||
{ title: () => t('pages.artwork.archiveNo'), key: 'archiveNo', width: 130, align: 'center', render: (r) => r.artwork?.archiveNo || '-' },
|
||||
{ title: () => t('pages.artwork.title'), key: 'artwork', minWidth: 180, ellipsis: { tooltip: true }, render: (r) => r.artwork?.title || '-' },
|
||||
);
|
||||
}
|
||||
return base;
|
||||
@@ -879,9 +884,8 @@ onUnmounted(() => {
|
||||
min-width: 0;
|
||||
}
|
||||
.filter-title-text {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.filter-trigger {
|
||||
flex: 0 0 auto;
|
||||
|
||||
Reference in New Issue
Block a user