@@ -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>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user