1 | import "antd/es/layout/style";
|
2 | import _Layout from "antd/es/layout";
|
3 | import { ConfigProviderWrap } from '@ant-design/pro-provider';
|
4 | import { ErrorBoundary } from '@ant-design/pro-utils';
|
5 | import React from 'react';
|
6 |
|
7 | var WrapContent = function WrapContent(props) {
|
8 | var _props$autoClearCache = props.autoClearCache,
|
9 | autoClearCache = _props$autoClearCache === void 0 ? true : _props$autoClearCache,
|
10 | style = props.style,
|
11 | className = props.className,
|
12 | children = props.children;
|
13 | var ErrorComponent = props.ErrorBoundary || ErrorBoundary;
|
14 | return React.createElement(ConfigProviderWrap, {
|
15 | autoClearCache: autoClearCache
|
16 | }, props.ErrorBoundary === false ? React.createElement(_Layout.Content, {
|
17 | className: className,
|
18 | style: style
|
19 | }, children) : React.createElement(ErrorComponent, null, React.createElement(_Layout.Content, {
|
20 | className: className,
|
21 | style: style
|
22 | }, children)));
|
23 | };
|
24 |
|
25 | export default WrapContent; |
\ | No newline at end of file |