import React, { PureComponent } from "react";
import { ActivityIndicator } from "antd-mobile";
export default class Loading extends PureComponent {
static defaultProps = {
show: false
};
render() {
const { show } = this.props;
return (
<div
style={{
display: show ? "block" : "none",
transform: " translate(-50%,-50%)",
position: "absolute",
top: "50%",
left: "50%",
zIndex: 400
}}
>
<ActivityIndicator size="large" />
</div>
);
}
}
React 组件之加载图Loading
于 2019-09-26 11:33:15 首次发布