前端: 添加加载组件
This commit is contained in:
parent
9704f6da71
commit
ee09336ca5
25
frontend/src/renderer/components/Loading.jsx
Normal file
25
frontend/src/renderer/components/Loading.jsx
Normal 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;
|
||||
Loading…
Reference in New Issue
Block a user