Card content
22 |Card content
23 |Card content
24 |Card content
23 |Card content
24 |Card content
25 |
14 |
15 |
16 |
17 |
18 |
19 | 重复元素可以是一条粗线、一种线框,某种相同的颜色、设计要素、设计风格,某种格式、空间关系等。
20 |
--------------------------------------------------------------------------------
/site/theme/template/Content/ErrorBoundary.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Alert } from 'antd';
3 |
4 | export default class ErrorBoundary extends React.Component {
5 | state = {
6 | error: null,
7 | };
8 |
9 | componentDidCatch(error, info) {
10 | this.setState({ error, info });
11 | }
12 |
13 | render() {
14 | const { children } = this.props;
15 | const { error, info } = this.state;
16 | if (error) {
17 | // You can render any custom fallback UI
18 | return Card content
26 |Card content
27 |Card content
28 |11 | 你要找的页面不存在 12 | 返回首页 13 |
14 |Content
22 |Content
23 |