vue-carousel-3d
vue-carousel-3d copied to clipboard
Any updates for Vue 3? Could not find a declaration file for module 'vue-carousel-3d'.
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'
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
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
}
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
Man, i was really hoping that VUE 3 would be supported
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.
// for vue3 getSlideCount() { const slotSlides = this.$slots.default()[0].children return slotSlides.length }
getSlideCount() { const children = this.$slots.default() // console.log('>>>>>', children) if (children.length > 0) { return children.length } return 0 }