18 lines
551 B
TypeScript
18 lines
551 B
TypeScript
import React from 'react';
|
|
import { Button, Tooltip } from 'antd';
|
|
import { ReloadOutlined } from '@ant-design/icons';
|
|
|
|
interface RefreshButtonProps {
|
|
onRefresh: () => void;
|
|
loading?: boolean;
|
|
}
|
|
|
|
/** 列表工具栏刷新入口:手动重新拉取当前数据,带加载反馈。 */
|
|
export const RefreshButton: React.FC<RefreshButtonProps> = ({ onRefresh, loading }) => (
|
|
<Tooltip title="刷新">
|
|
<Button icon={<ReloadOutlined />} loading={loading} onClick={onRefresh} aria-label="刷新" />
|
|
</Tooltip>
|
|
);
|
|
|
|
export default RefreshButton;
|