chore: download progress
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { useIntl } from '@umijs/max';
|
||||
import React from 'react';
|
||||
|
||||
interface TableHeaderProps {
|
||||
@@ -7,12 +8,17 @@ interface TableHeaderProps {
|
||||
columns: any[];
|
||||
}
|
||||
const TableHeader = ({ columns }: TableHeaderProps) => {
|
||||
const intl = useIntl();
|
||||
return (
|
||||
<tr>
|
||||
{columns.map((column: any, index: number) => {
|
||||
return (
|
||||
<th key={index}>
|
||||
<span className="cell-span">{column.title}</span>
|
||||
<span className="cell-span">
|
||||
{column.locale
|
||||
? intl.formatMessage({ id: column.title })
|
||||
: column.title}
|
||||
</span>
|
||||
</th>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -6,8 +6,15 @@ import TableHeader from './header';
|
||||
import './index.less';
|
||||
import TableRow from './row';
|
||||
|
||||
interface ColumnProps {
|
||||
title: string;
|
||||
key: string;
|
||||
render?: (data: { dataIndex: string; row: any }) => any;
|
||||
locale?: boolean;
|
||||
}
|
||||
|
||||
interface SimpleTableProps {
|
||||
columns: any[];
|
||||
columns: ColumnProps[];
|
||||
dataSource: any[];
|
||||
bordered?: boolean;
|
||||
rowKey?: string;
|
||||
|
||||
Reference in New Issue
Block a user