Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
carylaw opened this issue Sep 30, 2020 · 3 comments
Open

Comments

@carylaw
Copy link

carylaw commented Sep 30, 2020

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

@BEEugene
Copy link

What is the expected behavior?
It seems you are creating them in a cycle.

@leoVolk
Copy link

leoVolk commented Jan 17, 2021

Got the same problem here. Funnily enough, it only fails when refreshing the page. When navigating via a nuxt-link it works perfectly fine.

Edit: This only happens when deployed to github pages, it works perfectly fine while running in developement mode.

@WouterFlorijn
Copy link
Owner

@carylaw (@leoVolk) I'm not sure I understand the problem and how it's related to #11. Could you clarify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants