修复修复 dynamic import 用法问题

This commit is contained in:
2betop 2020-12-08 14:39:23 +08:00
parent e38e1a5c2b
commit 1b3fb46ba6
2 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ export interface DiffControlSchema extends FormBaseControl {
}
function loadComponent(): Promise<any> {
return import('../../components/Editor');
return import('../../components/Editor').then(item => item.default);
}
export interface DiffEditorProps

View File

@ -29,8 +29,8 @@ function loadRichText(
): () => Promise<any> {
return () =>
type === 'tinymce'
? import('../../components/Tinymce')
: import('../../components/RichText');
? import('../../components/Tinymce').then(item => item.default)
: import('../../components/RichText').then(item => item.default);
}
export default class RichTextControl extends React.Component<