修复其他主题不能预览问题

This commit is contained in:
liaoxuezhi 2020-08-01 00:26:55 +08:00
parent f3cb2d7ab4
commit ad3bd63594
3 changed files with 6 additions and 1 deletions

View File

@ -385,6 +385,7 @@ export class App extends React.PureComponent {
</div>
{React.cloneElement(this.props.children, {
key: theme.value,
...this.props.children.props,
setNavigations: this.setNavigations,
setAsideFolded: this.setAsideFolded,

View File

@ -46,6 +46,7 @@ class CodePreview extends React.Component {
show
>
<PopOver
theme={(rest as any).theme}
offset={{x: 0, y: -height}}
style={{height}}
className=":MDPreview-shcema-preview-popover"

View File

@ -85,6 +85,7 @@ export default class PlayGround extends React.Component {
}
};
this.env = {
session: 'doc',
updateLocation: () => {},
fetcher: config => {
config = {
@ -182,7 +183,9 @@ export default class PlayGround extends React.Component {
const props = {
...this.schemaProps,
theme: this.props.theme,
locale: this.props.locale
locale: this.props.locale,
affixHeader: false,
affixFooter: false
};
if (!this.props.useIFrame) {