Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Integration with nuxtjs3 #140

Open
leccyril opened this issue Dec 16, 2022 · 3 comments
Open

Integration with nuxtjs3 #140

leccyril opened this issue Dec 16, 2022 · 3 comments

Comments

@leccyril
Copy link

leccyril commented Dec 16, 2022

Do you have an integration example for nuxtjs3 ?

the current conf is not working

this is what i tested

create a plugin useCoolLightBox.client.js

import { defineNuxtPlugin } from '#app'
import CoolLightBox from "vue-cool-lightbox";

export default defineNuxtPlugin(nuxtApp => {
	nuxtApp.vueApp.use(CoolLightBox)
})

and try to use it in front

<template>
		<div class="col-12">
						<CoolLightBox :items="images" :index="index" @close="index = null">
						</CoolLightBox>

						<div class="images-wrapper">
							<div class="image">
								<img src="https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__340.jpg"/>
								<img src="https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__340.jpg"/>
							</div>
						</div>
</template>
<script lang="ts" setup>
const images = ref(["https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__340.jpg","https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__340.jpg"])
</script>

this error in console

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_c')
at Proxy.vue_render (vue-cool-lightbox.esm.js:1816:91)
at renderComponentRoot (runtime-core.esm-bundler.js:898:44)
at hydrateSubTree (runtime-core.esm-bundler.js:5603:44)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:5624:25)
at ReactiveEffect.run (reactivity.esm-bundler.js:187:25)
at instance.update (runtime-core.esm-bundler.js:5745:56)
at setupRenderEffect (runtime-core.esm-bundler.js:5759:9)
at mountComponent (runtime-core.esm-bundler.js:5541:9)
at hydrateNode (runtime-core.esm-bundler.js:4730:21)
at hydrateChildren (runtime-core.esm-bundler.js:4869:24)
Thanks

@IlyasDiker
Copy link

Same Error, any solutions or alternatives ?

@leccyril
Copy link
Author

for our side we decided to use a envato lightbox and use it with local lib

@thunderBestPower
Copy link

Hi, I have same error. Someone has resolved?

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

No branches or pull requests

3 participants