jamis
Version:
一种支持通过JSON配置方式生成页面的组件库
42 lines (41 loc) • 1.27 kB
TypeScript
import React from 'react';
import type { EditorComponentProps } from '../types';
export declare function monacoFactory(containerElement: HTMLElement, monaco: any, options: Record<string, any>): any;
export interface EditorState {
isFullscreen?: boolean;
innerWidth?: any;
innerHeight?: any;
}
export declare class Editor extends React.Component<EditorComponentProps, EditorState> {
static defaultProps: {
language: string;
editorTheme: string;
width: string;
height: string;
allowFullscreen: boolean;
options: {};
};
state: {
isFullscreen: boolean;
innerWidth: string;
innerHeight: string;
};
editor: any;
container: any;
currentValue: any;
preventTriggerChangeEvent: boolean;
disposes: Array<{
dispose: () => void;
}>;
constructor(props: EditorComponentProps);
componentDidUpdate(prevProps: EditorComponentProps): void;
componentWillUnmount(): void;
wrapperRef(ref: any): void;
loadMonaco(): void;
initMonaco(monaco: any): void;
editorWillMount(monaco: any): void;
editorDidMount(editor: any, monaco: any): void;
handleFullscreenModeChange(): void;
render(): JSX.Element;
}
export default Editor;