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

@@ -49,7 +49,7 @@
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { defineComponent, defineAsyncComponent } from 'vue';
import { faLock, faExclamationTriangle, faSpinner, faCheck, faKey } from '@fortawesome/free-solid-svg-icons';
const getPasswordStrength = require('syuilo-password-strength');
import { toUnicode } from 'punycode';
@@ -63,7 +63,15 @@ export default defineComponent({
MkButton,
MkInput,
MkSwitch,
captcha: () => import('./captcha.vue').then(x => x.default),
captcha: defineAsyncComponent(() => import('./captcha.vue').then(m => m.default)),
},
props: {
autoSet: {
type: Boolean,
required: false,
default: false,
}
},
data() {
@@ -85,14 +93,6 @@ export default defineComponent({
}
},
props: {
autoSet: {
type: Boolean,
required: false,
default: false,
}
},
computed: {
meta() {
return this.$store.state.instance.meta;