antonreshetov / vue-glide

A slider and carousel as vue component on top of the Glide.js
https://antonreshetov.github.io/vue-glide/
MIT License
269 stars 39 forks source link

Example with on demand import don't work #36

Open Dementir opened 5 years ago

Dementir commented 5 years ago

Hi, I use code from example

<template>
  <div id="app">
    <vue-glide>
      <vue-glide-slide
        v-for="i in 10"
        :key="i">
        Slide {{ i }}
      </vue-glide-slide>
    </vue-glide>
  </div>
</template>

<script>
import VueGlide from 'vue-glide-js/src/components/Glide.vue'
import VueGlideSlide from 'vue-glide-js/src/components/GlideSlide.vue'

export default {
  components: {
    [VueGlide.name]: VueGlide,
    [VueGlideSlide.name]: VueGlideSlide
  }
}
</script>

And i see this

If i do global import, everything is ok

Browser info:

AlecWeekes commented 5 years ago

I can also confirm this issue is occuring for me too. Regardless of Browser, the global import resolves the issue but that's not the ideal solution for us.

the94air commented 4 years ago

@Dementir @AlecWeekes I think this isn't a package issue:

<template>
  <vue-glide>
    <vue-glide-slide>
      <!-- ... -->
    </vue-glide-slide>
    <vue-glide-slide>
      <!-- ... -->
    </vue-glide-slide>
    <vue-glide-slide>
      <!-- ... -->
    </vue-glide-slide>
  </vue-glide>
</template>

<script>
  import { Glide, GlideSlide } from 'vue-glide-js';
  import 'vue-glide-js/dist/vue-glide.css';

  export default {
    components: {
        'vue-glide': Glide,
        'vue-glide-slide': GlideSlide
    }
  }
</script>
siolfyr commented 3 years ago

@antonreshetov Looks like the current readme.md doesn't have the CSS import for the OnDemand usage.