mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: 修复新版react-router 启动报错
This commit is contained in:
parent
bbb1d64c35
commit
9c28e2e842
@ -141,8 +141,7 @@ class BackTop extends React.PureComponent {
|
||||
);
|
||||
}
|
||||
}
|
||||
// @ts-ignore
|
||||
@withRouter // @ts-ignore
|
||||
|
||||
export class App extends React.PureComponent<{
|
||||
location: Location;
|
||||
}> {
|
||||
@ -864,7 +863,6 @@ export function navigations2route(
|
||||
|
||||
export default function entry() {
|
||||
// PathPrefix = pathPrefix || DocPathPrefix;
|
||||
|
||||
return (
|
||||
<Router>
|
||||
<Switch>
|
||||
|
@ -31,8 +31,7 @@ export default function (schema, schemaProps, showCode, envOverrides) {
|
||||
};
|
||||
}
|
||||
|
||||
return withRouter(
|
||||
class extends React.Component {
|
||||
return class extends React.Component {
|
||||
static displayName = 'SchemaRenderer';
|
||||
iframeRef;
|
||||
state = {open: false, schema: {}};
|
||||
@ -396,9 +395,7 @@ export default function (schema, schemaProps, showCode, envOverrides) {
|
||||
// 复制页面配置 <i className="fa fa-copy p-l-xs"></i>
|
||||
// </div>
|
||||
// </div>
|
||||
<Portal
|
||||
container={() => document.getElementById('Header-toolbar')}
|
||||
>
|
||||
<Portal container={() => document.getElementById('Header-toolbar')}>
|
||||
<div className="hidden-xs hidden-sm ml-3">
|
||||
<div>
|
||||
<div className="Doc-headingList">
|
||||
@ -420,6 +417,5 @@ export default function (schema, schemaProps, showCode, envOverrides) {
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user