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';
|
2025-05-26 23:10:42 +08:00
|
|
|
import { useTranslation } from 'react-i18next';
|
2023-04-22 20:39:27 +08:00
|
|
|
|
2025-05-20 00:23:47 +08:00
|
|
|
const Loading = ({ prompt: name = '', size = 'large' }) => {
|
2025-05-26 23:10:42 +08:00
|
|
|
const { t } = useTranslation();
|
|
|
|
|
|
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">
|
2025-05-26 23:10:42 +08:00
|
|
|
<Spin
|
|
|
|
|
size={size}
|
|
|
|
|
spinning={true}
|
2025-05-20 00:23:47 +08:00
|
|
|
tip={null}
|
|
|
|
|
/>
|
|
|
|
|
<span className="whitespace-nowrap mt-2 text-center" style={{ color: 'var(--semi-color-primary)' }}>
|
2025-06-08 00:33:26 +08:00
|
|
|
{name ? t('{{name}}', { name }) : t('加载中...')}
|
2025-05-20 00:23:47 +08:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-04-22 20:39:27 +08:00
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Loading;
|