vue-carousel-3d icon indicating copy to clipboard operation
vue-carousel-3d copied to clipboard

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

Open MartinFernandezRoberts opened this issue 3 years ago • 7 comments

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

MartinFernandezRoberts avatar Mar 10 '21 17:03 MartinFernandezRoberts

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: ── [email protected] ├─┬ [email protected] │ └── [email protected] deduped └─┬ [email protected] └── [email protected] deduped

urfandurrani avatar Mar 16 '21 17:03 urfandurrani

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 avatar Apr 19 '21 14:04 alijuniorbr

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

alijuniorbr avatar Apr 19 '21 14:04 alijuniorbr

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

AntonShumin avatar May 04 '21 20:05 AntonShumin

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.

titusdecali avatar Jan 28 '22 04:01 titusdecali

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

wlex-club avatar Jun 24 '22 10:06 wlex-club

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

dendily avatar Mar 07 '24 03:03 dendily