Open KloudDev opened 3 years ago
@KloudDev hi, have you tried to enable client mode in plugins declaration?
{ src: '~/plugins/vue-lightbox', mode: 'client' },
You need to wrap the CoolLightBox
in a <client-only>
tag as it's only loaded on the client-side.
Hey there!! Want to preface this in that I'm.. very new to anything Vue/Nuxt, so whatever I'm missing is probably going to be real dumb and I apologize.
So my issue seems to be mostly the same as #58 , but the fix didn't work.
I installed the pkg via npm, created vue-cool-lightbox.client.js with the following code:
The plugin in nuxt.config like so:
And my page looks like this:
But all I get is this.
If I add another url to the items array, I get another square. So it's picking up the right number at least.
Back to #58 , I DID take a look at your fiddle (as you can see I tried adding the css in my page already).
I tried doing it as close as possible, but when I used this instead of export default {
I get an error that Vue is not defined.
I try just arranging the array differently like you did in the fiddle like so:
And this happens instead. (notice how despite there being 3 images, it only dupes it twice). The lightbox doesn't seem to activate, clicking does nothing.
What might I be doing wrong?
I've tried at least half a different dozen plugins and only this and one other that didn't have the full functionality I needed even semi worked. Been at this for days, so thanks in advance.