前端: 添加加载组件

This commit is contained in:
Frontend Developer 2026-03-10 09:08:45 +00:00
parent 9704f6da71
commit ee09336ca5

View File

@ -0,0 +1,25 @@
import React from 'react';
import { Spin } from 'antd';
function Loading({ tip = '加载中...', fullscreen = false }) {
const style = fullscreen ? {
position: 'fixed',
top: 0,
left: 0,
right: 0,
bottom: 0,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
background: 'rgba(255,255,255,0.8)',
zIndex: 9999
} : {};
return (
<div style={style}>
<Spin size="large" tip={tip} />
</div>
);
}
export default Loading;