vue3: 非同期コンポーネント読み込みの移行 (#6580)

* migrate async components

* routerとwidgetsも
This commit is contained in:
Xeltica
2020-07-24 18:24:41 +09:00
committed by GitHub
parent f9e350b041
commit 0bf4c5cb29
13 changed files with 48 additions and 50 deletions

View File

@@ -52,7 +52,7 @@
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { defineComponent, defineAsyncComponent } from 'vue';
import { faReply, faQuoteRight, faPaperPlane, faTimes, faUpload, faPollH, faGlobe, faHome, faUnlock, faEnvelope, faPlus, faPhotoVideo, faCloud, faLink, faAt, faBiohazard, faPlug } from '@fortawesome/free-solid-svg-icons';
import { faEyeSlash, faLaughSquint } from '@fortawesome/free-regular-svg-icons';
import insertTextAtCursor from 'insert-text-at-cursor';
@@ -73,9 +73,9 @@ import { noteVisibilities } from '../../types';
export default defineComponent({
components: {
XNotePreview,
XUploader: () => import('./uploader.vue').then(m => m.default),
XPostFormAttaches: () => import('./post-form-attaches.vue').then(m => m.default),
XPollEditor: () => import('./poll-editor.vue').then(m => m.default)
XUploader: defineAsyncComponent(() => import('./uploader.vue').then(m => m.default)),
XPostFormAttaches: defineAsyncComponent(() => import('./post-form-attaches.vue').then(m => m.default)),
XPollEditor: defineAsyncComponent(() => import('./poll-editor.vue').then(m => m.default))
},
props: {