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<{
|
export class App extends React.PureComponent<{
|
||||||
location: Location;
|
location: Location;
|
||||||
}> {
|
}> {
|
||||||
@ -864,7 +863,6 @@ export function navigations2route(
|
|||||||
|
|
||||||
export default function entry() {
|
export default function entry() {
|
||||||
// PathPrefix = pathPrefix || DocPathPrefix;
|
// PathPrefix = pathPrefix || DocPathPrefix;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Router>
|
<Router>
|
||||||
<Switch>
|
<Switch>
|
||||||
|
@ -31,8 +31,7 @@ export default function (schema, schemaProps, showCode, envOverrides) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return withRouter(
|
return class extends React.Component {
|
||||||
class extends React.Component {
|
|
||||||
static displayName = 'SchemaRenderer';
|
static displayName = 'SchemaRenderer';
|
||||||
iframeRef;
|
iframeRef;
|
||||||
state = {open: false, schema: {}};
|
state = {open: false, schema: {}};
|
||||||
@ -396,9 +395,7 @@ export default function (schema, schemaProps, showCode, envOverrides) {
|
|||||||
// 复制页面配置 <i className="fa fa-copy p-l-xs"></i>
|
// 复制页面配置 <i className="fa fa-copy p-l-xs"></i>
|
||||||
// </div>
|
// </div>
|
||||||
// </div>
|
// </div>
|
||||||
<Portal
|
<Portal container={() => document.getElementById('Header-toolbar')}>
|
||||||
container={() => document.getElementById('Header-toolbar')}
|
|
||||||
>
|
|
||||||
<div className="hidden-xs hidden-sm ml-3">
|
<div className="hidden-xs hidden-sm ml-3">
|
||||||
<div>
|
<div>
|
||||||
<div className="Doc-headingList">
|
<div className="Doc-headingList">
|
||||||
@ -420,6 +417,5 @@ export default function (schema, schemaProps, showCode, envOverrides) {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user