shershen08 / vue-masonry

💠 Vue.js directive for masonry blocks layouting ✅
MIT License
674 stars 81 forks source link

Can I import vue-masonry only in my component? #84

Closed jtpdev closed 5 years ago

jtpdev commented 5 years ago

I want to import vue-masonry in my component, but I doesn't find nothing in documentation.

It's possible? And how make it?

shershen08 commented 5 years ago

Since vue-masonry is written as a plugin it has to be included in root of the app as a plugin - https://vuejs.org/v2/guide/plugins.html#Using-a-Plugin

shershen08 commented 5 years ago

So it's not possible. If you provide a use case - we can think of possible approaches.

zonique2k commented 5 years ago

We would like to use vue-masonry in a spfx webpart in sharepoint. That means we don't control the entire page, just a small part of it. Other webparts (from other vendors) on the same page might also use vue-masonry, maybe in another version which might not be compatible with the one we use (maybe a future new major version). That why we always use local registered components