dynamically load gallery
This commit is contained in:
parent
33665fcfa6
commit
3aca1ce6c0
7 changed files with 24 additions and 15 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import { mapState as mapPiniaState } from 'pinia'
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
|
||||
import StatusBody from 'src/components/status_body/status_body.vue'
|
||||
import Attachment from '../attachment/attachment.vue'
|
||||
import Gallery from '../gallery/gallery.vue'
|
||||
import LinkPreview from '../link-preview/link-preview.vue'
|
||||
import Poll from '../poll/poll.vue'
|
||||
|
||||
|
|
@ -132,7 +132,9 @@ const StatusContent = {
|
|||
components: {
|
||||
Attachment,
|
||||
Poll,
|
||||
Gallery,
|
||||
Gallery: defineAsyncComponent(
|
||||
() => import( 'src/components/gallery/gallery.vue')
|
||||
),
|
||||
LinkPreview,
|
||||
StatusBody,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
/>
|
||||
</div>
|
||||
|
||||
<gallery
|
||||
<Gallery
|
||||
v-if="status.attachments.length !== 0"
|
||||
class="attachments media-body"
|
||||
:compact="compact"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue