Answer the question
In order to leave comments, you need to log in
How to fix vue-masonry errors?
Connected in main.js like this:
import Vue from 'vue'
import {VueMasonryPlugin} from 'vue-masonry'
Vue.use(VueMasonryPlugin)
.masonry(v-masonry, transition-duration='1s')
v-card(
v-masonry-tile,
v-for='profile in items',
:key='profile.id'
)
v-img(:src="`${profile.avatar}`", aspect-ratio='2')
Answer the question
In order to leave comments, you need to log in
The problem was solved like this:
Not working variant
.div( v-masonry transition-duration='3s', item-selector='.item')
Working variant
.div( v-masonry='', transition-duration='3s', item-selector='.item')
Apparently Jade specifics
This error usually occurs when a template uses a variable that is not declared in the component in data/props/computed.
In a vacuum, it's hard to tell if it's a plugin error or a code inside a component.
I made a small example where I just connected the library and used the v-mansory directive - there are no errors in the console ( codesanbox ), so most likely you need to look for jambs in the component template
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question