Any updates for Vue 3? Could not find a declaration file for module 'vue-carousel-3d'.
MartinFernandezRoberts opened this issue · 7 comments
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
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
}