Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MartinFernandezRoberts opened this issue Mar 10, 2021 · 7 comments

Comments

@MartinFernandezRoberts
Copy link

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
Copy link

urfandurrani commented Mar 16, 2021

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

@alijuniorbr
Copy link

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
Copy link

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
Copy link

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

@titusdecali
Copy link

titusdecali commented Jan 28, 2022

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
Copy link

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

@dendily
Copy link

dendily commented Mar 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants