Wlada / vue-carousel-3d

Vue Carousel 3D - Beautiful, flexible and touch supported 3D Carousel for Vue.js
MIT License
969 stars 203 forks source link

Any updates for Vue 3? Could not find a declaration file for module 'vue-carousel-3d'. #172

Open MartinFernandezRoberts opened 3 years ago

MartinFernandezRoberts commented 3 years ago

Is it up to date for use with Vue 3? I'm installing it and trying to use it globally o locally, but getting: 'Could not find a declaration file for module 'vue-carousel-3d'

image_2021-03-10_144303

urfandurrani commented 3 years ago

HI I have this also. Although, you can run & see this in the browser. However, if I build and run through xcode & an iphone/emulator the carousel isnt showing at all.

vue version info: ── vue@2.6.12 ├─┬ vue-carousel-3d@1.0.1 │ └── vue@2.6.12 deduped └─┬ vue-scroller@2.2.4 └── vue@2.6.12 deduped

alijuniorbr commented 3 years ago

the problem is the new way of Vue 3 $slots. Find this function in code and fix it:

getSlideCount() {
  const children = this.$slots.default()
  // console.log('>>>>>', children)
  if (children.length > 0) {
    return children[0].children.length
  }
  return 0
}
alijuniorbr commented 3 years ago

I downloaded the source files and use inside my project, without npm. Works normally with Vue 3 + Vite. But other minor fixes in declaration must be needed too. Commented too the references to process.server and process.browser in many places of code. Changed process.server to process_server. This fixes the issues:

  const process_server = false
  const process_browser = true
AntonShumin commented 3 years ago

Man, i was really hoping that VUE 3 would be supported

titusdecali commented 2 years ago

I'd really love to use this library in Vue 3. Any update on this, or a working fork from another user would be much appreciated.

wlex-club commented 2 years ago

// for vue3 getSlideCount() { const slotSlides = this.$slots.default()[0].children return slotSlides.length }

dendily commented 6 months ago

getSlideCount() { const children = this.$slots.default() // console.log('>>>>>', children) if (children.length > 0) { return children.length } return 0 }