chore: download progress

This commit is contained in:
jialin
2025-02-27 18:03:28 +08:00
parent 8464e0ea3f
commit 295b4b3b72
14 changed files with 441 additions and 289 deletions
+7 -1
View File
@@ -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>
);
})}
+8 -1
View File
@@ -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;