index.js
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React, { useEffect } from 'react';
import { Row, Col, Card, Typography, Tooltip, Spin } from 'antd';
import styles from './index.less';
import { ExclamationCircleOutlined } from '@ant-design/icons';
import Loading from '@/components/Loading';
const { Title } = Typography;
const QCard = props => {
const { title, des, children, extra, loading = false, ...otherProps } = props;
return (
<Card {...otherProps}>
<Loading loading={loading} />
<Row className={styles.main} type="flex" justify="space-between" align="middle">
<Col>
<Row type="flex" align="middle">
<Col>
<div className={styles.fk} />
</Col>
{title && (
<Col>
<div className={styles.title}>{title}</div>
</Col>
)}
{des && (
<Col>
<Tooltip title={des}>
<ExclamationCircleOutlined />
</Tooltip>
</Col>
)}
</Row>
</Col>
{extra && <Col>{extra}</Col>}
</Row>
{children}
</Card>
);
};
export default QCard;