You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
891 B
26 lines
891 B
import React from 'react';
|
|
import classNames from 'classnames';
|
|
import { Button } from 'antd';
|
|
import { Link } from 'react-router';
|
|
import config from './typeConfig';
|
|
import styles from './index.less';
|
|
|
|
|
|
export default ({ className, type, title, desc, img, actions }) => {
|
|
const pageType = type in config ? type : '404';
|
|
const clsString = classNames(styles.exception, className);
|
|
return (
|
|
<div className={clsString}>
|
|
<div className={styles.imgBlock}>
|
|
<img src={img || config[pageType].img} alt="" />
|
|
</div>
|
|
<div className={styles.content}>
|
|
<h1>{title || config[pageType].title}</h1>
|
|
<div className={styles.desc}>{desc || config[pageType].desc}</div>
|
|
<div className={styles.actions}>
|
|
{actions || <Link to="/"><Button size="large" type="primary">返回首页</Button></Link>}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|