mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:08:55 +08:00
fix bug: editor 的 editorDidMount 支持 string格式 (#6697)
This commit is contained in:
parent
f4922e0c40
commit
6143cd8b96
@ -247,7 +247,7 @@ export default class EditorControl extends React.Component<EditorProps, any> {
|
||||
if (this.props.editorDidMount) {
|
||||
let editorDidMount = this.props.editorDidMount;
|
||||
if (typeof editorDidMount === 'string') {
|
||||
editorDidMount = new Function('editor', 'monaco');
|
||||
editorDidMount = new Function('editor', 'monaco', editorDidMount);
|
||||
}
|
||||
const dispose = editorDidMount(editor, monaco);
|
||||
if (typeof dispose === 'function') {
|
||||
|
Loading…
Reference in New Issue
Block a user