import * as React from 'react'; import config from './typeConfig'; import { Button } from 'antd'; import './Exception.less'; import { createGetClassName } from '../../util/util'; const getClassName = createGetClassName('exception'); export interface ExceptionProps { type?: string; title?: string; desc?: string; actions?: any; onClick?: any; } export default class Exception extends React.Component { static defaultProps = { onClick: () => { }, }; render() { const { type, title, desc, actions } = this.props; const pageType = type in config ? type : '404'; return (

{title || config[pageType].title}

{desc || config[pageType].desc}
{actions || }
); } }