vue3: 非同期コンポーネント読み込みの移行 (#6580)
* migrate async components * routerとwidgetsも
This commit is contained in:
parent
f9e350b041
commit
0bf4c5cb29
13 changed files with 48 additions and 50 deletions
|
|
@ -24,7 +24,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
import { faAngleDown, faAngleUp, faHome, faShareAlt, faGlobe, faListUl, faSatellite, faCircle } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faComments } from '@fortawesome/free-regular-svg-icons';
|
||||
import Progress from '../scripts/loading';
|
||||
|
|
@ -41,7 +41,7 @@ export default defineComponent({
|
|||
|
||||
components: {
|
||||
XTimeline,
|
||||
XTutorial: () => import('./index.home.tutorial.vue').then(m => m.default),
|
||||
XTutorial: defineAsyncComponent(() => import('./index.home.tutorial.vue').then(m => m.default)),
|
||||
XPostForm,
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
import Home from './index.home.vue';
|
||||
|
||||
export default defineComponent({
|
||||
|
|
@ -11,7 +11,7 @@ export default defineComponent({
|
|||
|
||||
components: {
|
||||
Home,
|
||||
Welcome: () => import('./index.welcome.vue').then(m => m.default),
|
||||
Welcome: defineAsyncComponent(() => import('./index.welcome.vue').then(m => m.default)),
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
import { faPencilAlt, faShareAlt, faGhost, faCog, faPlus, faCloud, faInfoCircle, faBan, faSave, faServer, faLink, faThumbtack, faUser, faShieldAlt, faKey, faBolt } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faTrashAlt, faEnvelope } from '@fortawesome/free-regular-svg-icons';
|
||||
import { faTwitter, faDiscord, faGithub } from '@fortawesome/free-brands-svg-icons';
|
||||
|
|
@ -225,7 +225,7 @@ export default defineComponent({
|
|||
MkTextarea,
|
||||
MkSwitch,
|
||||
MkInfo,
|
||||
Captcha: () => import('../../components/captcha.vue').then(x => x.default),
|
||||
Captcha: defineAsyncComponent(() => import('../../components/captcha.vue').then(m => m.default)),
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
import { faPaperPlane, faPhotoVideo, faLaughSquint } from '@fortawesome/free-solid-svg-icons';
|
||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||
import * as autosize from 'autosize';
|
||||
|
|
@ -32,7 +32,7 @@ import { selectFile } from '../../scripts/select-file';
|
|||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
XUploader: () => import('../../components/uploader.vue').then(m => m.default),
|
||||
XUploader: defineAsyncComponent(() => import('../../components/uploader.vue').then(m => m.default)),
|
||||
},
|
||||
props: {
|
||||
user: {
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
import { faExclamationTriangle, faEllipsisH, faRobot, faLock, faBookmark, faChartBar, faImage, faBirthdayCake, faMapMarker } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faCalendarAlt, faBookmark as farBookmark } from '@fortawesome/free-regular-svg-icons';
|
||||
import * as age from 's-age';
|
||||
|
|
@ -127,8 +127,8 @@ export default defineComponent({
|
|||
MkFollowButton,
|
||||
MkContainer,
|
||||
MkRemoteCaution,
|
||||
XPhotos: () => import('./index.photos.vue').then(m => m.default),
|
||||
XActivity: () => import('./index.activity.vue').then(m => m.default),
|
||||
XPhotos: defineAsyncComponent(() => import('./index.photos.vue').then(m => m.default)),
|
||||
XActivity: defineAsyncComponent(() => import('./index.activity.vue').then(m => m.default)),
|
||||
},
|
||||
|
||||
metaInfo() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue