Files
new-api/web/src/components/Loading.js

22 lines
638 B
JavaScript
Raw Normal View History

2023-04-22 20:39:27 +08:00
import React from 'react';
2024-03-23 20:22:00 +08:00
import { Spin } from '@douyinfe/semi-ui';
2023-04-22 20:39:27 +08:00
2025-05-20 00:23:47 +08:00
const Loading = ({ prompt: name = '', size = 'large' }) => {
2023-04-22 20:39:27 +08:00
return (
2025-05-20 00:23:47 +08:00
<div className="fixed inset-0 w-screen h-screen flex items-center justify-center bg-white/80 z-[1000]">
<div className="flex flex-col items-center">
<Spin
size={size}
spinning={true}
tip={null}
/>
<span className="whitespace-nowrap mt-2 text-center" style={{ color: 'var(--semi-color-primary)' }}>
{name ? `加载${name}中...` : '加载中...'}
</span>
</div>
</div>
2023-04-22 20:39:27 +08:00
);
};
export default Loading;