SSENSE / vue-carousel

A flexible, responsive, touch-friendly carousel for Vue.js
https://ssense.github.io/vue-carousel/
MIT License
1.72k stars 506 forks source link

basic demo not working with vue-cli basic app #51

Open chrisamow opened 7 years ago

chrisamow commented 7 years ago

Hi, Using: "vue": "^2.2.6", "vue-carousel": "^0.6.4"

I made a made a basic "vue init webpack" app did an npm install of the carousel lib added the import and use code to src/main.js and added the <carousel> and <slide> elements in the index.html

and I just get the plain old text "Slide 1 Content Slide 2 Content" - no carousel features

tdrach commented 7 years ago

@chrisamow There's a couple things that could be happening. Would you mind providing a JSFiddle or similar to reproduce your problem? A couple of things that come to mind for what it could be, without additional information:

new Vue({
  el: '#component',
  components: {
    Carousel,
    Slide  
  }
})

Try that, and follow up with a reproduced issue if that doesn't work 😄

chrisamow commented 7 years ago

Thx for the reply tdrach - I had used it as a global component. Now I switched it over to local. Either way, the build appears fine, but from the chrome vue-dev tool it doesn't even show up as a component. As expected then, making the text much longer doesn't make a difference.

Do you guys have a link to a minified vue-carousel I can base a jsfiddle or codepen on (to exclude my build as the problem)?

chrisamow commented 7 years ago

Ok, I put up a temp repo https://github.com/chrisamow/showpics

chrisamow commented 7 years ago

Ok, the carousel is showing as a loaded component now, but is still not responsive - can't tell it's a carousel except that the text is unselectable now :)

Zyles commented 7 years ago

Same problem. It just says "Slide 1 Content Slide 2 Content"

The divs and classes are in place.

I think it has to do with the width of the flex etc.

How do you specify just to show 1 slider at a time at full width?

lilyrae commented 7 years ago

It wasn't working for me either until I added a 3rd slide. To specify one slider at a time you can add the prop: :perPage="1"