Skip to content

stack is not working on SSR production, not render stack to div (Nuxt.js) #18

Description

@carylaw

Follow #11 @guastallaigor

in plugins/vue-stack-grid.js

import Vue from 'vue'
import { Stack, StackItem } from 'vue-stack-grid'

Vue.component('Stack', Stack)
Vue.component('StackItem', StackItem)

And then, in your nuxt.config.js you import it, and set the mode: 'client'.

plugins: [
    { src: '~/plugins/vue-stack-grid', mode: 'client' }
  ]

testing on index.vue

        <v-flex d-flex>
          <Stack :monitor-images-loaded="true" :column-min-width="320" :gutter-width="8" :gutter-height="8">
            <StackItem v-for="i in 100" :key="i">
              <img src="https://i.imgur.com/0ui5ltX.jpg" />
            </StackItem>
          </Stack>
        </v-flex>

After build:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions