mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-17 06:00:20 +02:00
27 lines
748 B
TypeScript
27 lines
748 B
TypeScript
import {
|
|
ColumnNullFallback,
|
|
ColumnSkeletonVariable,
|
|
ItemTableListInnerColumn,
|
|
TableColumnTextContainer,
|
|
} from '/@/renderer/components/item-list/item-table-list/item-table-list-column';
|
|
|
|
export const PathColumn = (props: ItemTableListInnerColumn) => {
|
|
const row: string | undefined = (props.data as (any | undefined)[])[props.rowIndex]?.[
|
|
props.columns[props.columnIndex].id
|
|
];
|
|
|
|
if (typeof row === 'string' && row) {
|
|
return (
|
|
<TableColumnTextContainer {...props}>
|
|
<span>{row}</span>
|
|
</TableColumnTextContainer>
|
|
);
|
|
}
|
|
|
|
if (row === null) {
|
|
return <ColumnNullFallback {...props} />;
|
|
}
|
|
|
|
return <ColumnSkeletonVariable {...props} />;
|
|
};
|