Merge pull request #24 from a443028159/wk-pages

预览样式
This commit is contained in:
yehuozhili
2022-01-24 09:08:24 +08:00
committed by GitHub

View File

@@ -6,7 +6,7 @@
* @FilePath: \dooringx\packages\dooringx-lib\src\components\preview.tsx * @FilePath: \dooringx\packages\dooringx-lib\src\components\preview.tsx
*/ */
import Container from './container'; import Container from './container';
import React, { ReactElement, ReactNode, useEffect, useState } from 'react'; import React, { ReactElement, ReactNode, useEffect, useState, CSSProperties } from 'react';
import UserConfig from '../config'; import UserConfig from '../config';
import { ComponentItemFactory } from '..'; import { ComponentItemFactory } from '..';
@@ -33,6 +33,13 @@ export interface PreviewProps {
* @memberof PreviewProps * @memberof PreviewProps
*/ */
completeFn?: Function; completeFn?: Function;
/**
*
* 预览样式
* @type {CSSProperties}
* @memberof PreviewProps
*/
previewContainerStyle?: CSSProperties;
} }
function Preview(props: PreviewProps): ReactElement { function Preview(props: PreviewProps): ReactElement {
@@ -121,6 +128,7 @@ function Preview(props: PreviewProps): ReactElement {
config={props.config} config={props.config}
context="preview" context="preview"
state={props.config.getStore().getData()} state={props.config.getStore().getData()}
previewContainerStyle={props.previewContainerStyle}
></Container> ></Container>
</> </>
); );