-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Nuxt 3 example? #87
Comments
I am using Nuxt 3 and have added it as a plugin /plugins/flipbook-vue.ts
|
@Vectoras It doesn't seem to work with me, can you give me an example please?
|
Achieve to make it work in a pluginThe edit is in the StackOverflow answer, don't really see the point of copy-pasting exactly the same thing here. The solution is on this issue on StackOverflow. Using Hopefully the package still works as a bare component in a <script setup>
import Flipbook from 'flipbook-vue'
</script>
<template>
<Flipbook class="flipbook" :pages="['https://source.unsplash.com/random/400x400?sig=1', 'https://source.unsplash.com/random/400x400?sig=2', 'https://source.unsplash.com/random/400x400?sig=3', 'https://source.unsplash.com/random/400x400?sig=4', 'https://source.unsplash.com/random/400x400?sig=5']" />
</template>
<style scoped>
.flipbook {
width: auto;
height: 500px;
}
</style> PS: not sure why my Nuxt app just froze a few times ❄️, probably because I tried to do too many things and Nuxt was kinda confused. Even if I cleared the |
Anyone has a working nuxt3 example?
Have tried:
file: flipbook.client.ts
`import Flipbook from 'flipbook-vue'
export default defineNuxtPlugin((nuxtApp) => {
return {
provide: {
Flipbook
}
}
})`
The text was updated successfully, but these errors were encountered: