Merge pull request #1153 from 2betop/import

修复修复 dynamic import 用法问题
This commit is contained in:
吴多益 2020-12-08 14:41:31 +08:00 committed by GitHub
commit 6eaec8c6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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<