UNPKG

@aliretail/react-materials-components

Version:
65 lines (64 loc) 1.86 kB
import React from 'react'; import * as PropTypes from 'prop-types'; import { TProps as TMaterialDialogProps } from './components/MaterialDialog/index'; interface TPowerEditorProps { disabled: boolean; readonly: boolean; isPreview: boolean; state: '' | 'error'; /** * 容器高度限制 * default: 450px */ contentHeight: string; /** * 生成内容类型 'pc'-pc浏览器模式 'mobile'-手机版宽度将限制在502px中 * default: pc */ mode: 'pc' | 'mobile'; /** * 图片上传的label * default: 图片上传 */ FileComponentLabel: string; FileComponent: React.Component; VideoComponent: React.Component; /** * 宽度限制 * default: "100%" */ width: string; value: string; onChange: (htmlData: string) => void; multiSelect: boolean; } declare type TProps = typeof PowerEditor.defaultProps & TMaterialDialogProps & TPowerEditorProps & { readOnly: boolean; path: string; materialCode: string; }; interface TState { htmlData: string; } declare class PowerEditor extends React.Component<TProps, TState> { static propTypes: { readOnly: PropTypes.Requireable<boolean>; path: PropTypes.Requireable<string>; value: PropTypes.Requireable<string>; onChange: PropTypes.Requireable<(...args: any[]) => any>; }; static defaultProps: { readOnly: boolean; path: string; value: string; onChange: () => void; }; state: TState; componentDidMount(): void; componentDidUpdate(prevProps: any): void; getMaterialDialog: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>; setHtmlData(): Promise<void>; powerValueChange: (value: any) => void; render(): JSX.Element; } export default PowerEditor;