mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 10:03:33 +00:00
[bugfix]: actually implement size column
This commit is contained in:
parent
6bc778fa53
commit
2854a91700
16 changed files with 50 additions and 13 deletions
|
|
@ -43,6 +43,7 @@ import { useFixedTableHeader } from '/@/renderer/components/virtual-table/hooks/
|
|||
import { NoteCell } from '/@/renderer/components/virtual-table/cells/note-cell';
|
||||
import { RowIndexCell } from '/@/renderer/components/virtual-table/cells/row-index-cell';
|
||||
import i18n from '/@/i18n/i18n';
|
||||
import { formatSizeString } from '/@/renderer/utils/format-size-string';
|
||||
|
||||
export * from './table-config-dropdown';
|
||||
export * from './table-pagination';
|
||||
|
|
@ -320,6 +321,16 @@ const tableColumns: { [key: string]: ColDef } = {
|
|||
},
|
||||
width: 65,
|
||||
},
|
||||
size: {
|
||||
cellRenderer: (params: ICellRendererParams) => GenericCell(params, { position: 'center' }),
|
||||
colId: TableColumn.SIZE,
|
||||
headerComponent: (params: IHeaderParams) =>
|
||||
GenericTableHeader(params, { position: 'center' }),
|
||||
headerName: i18n.t('table.column.size'),
|
||||
valueGetter: (params: ValueGetterParams) =>
|
||||
params.data ? formatSizeString(params.data.size) : undefined,
|
||||
width: 60,
|
||||
},
|
||||
songCount: {
|
||||
cellRenderer: (params: ICellRendererParams) => GenericCell(params, { position: 'center' }),
|
||||
colId: TableColumn.SONG_COUNT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue