lighten up by dynamically loading logged-in pages and non-immideate components
This commit is contained in:
parent
b7ccbc6726
commit
3ccf14d3dd
7 changed files with 134 additions and 65 deletions
|
|
@ -1,9 +1,6 @@
|
|||
import { defineAsyncComponent } from 'vue'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import AuthForm from 'src/components/auth_form/auth_form.js'
|
||||
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'
|
||||
|
||||
const UserPanel = {
|
||||
computed: {
|
||||
signedIn() {
|
||||
|
|
@ -12,8 +9,12 @@ const UserPanel = {
|
|||
...mapState({ user: (state) => state.users.currentUser }),
|
||||
},
|
||||
components: {
|
||||
AuthForm,
|
||||
PostStatusForm,
|
||||
AuthForm: defineAsyncComponent(
|
||||
() => import('src/components/auth_form/auth_form.js'),
|
||||
),
|
||||
PostStatusForm: defineAsyncComponent(
|
||||
() => import('src/components/post_status_form/post_status_form.vue'),
|
||||
),
|
||||
UserCard: defineAsyncComponent(
|
||||
() => import('src/components/user_card/user_card.vue'),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue