vue-masonry icon indicating copy to clipboard operation
vue-masonry copied to clipboard

Manually redraw with <script setup> Syntax?

Open datWeazel opened this issue 3 years ago • 3 comments
trafficstars

I'm currently rewriting some old Vue components in the new

Is there any way to manually redraw when using the new syntax?

datWeazel avatar Jul 14 '22 11:07 datWeazel

for v3 + script setup you should be able to use

<script setup>
import {inject} from 'vue';
const redrawVueMasonry  = inject('redrawVueMasonry');
// call redrawVueMasonry()

https://github.com/shershen08/vue-masonry/blob/master/src/masonry.plugin.js#L138

shershen08 avatar Jul 17 '22 11:07 shershen08

Thanks for the response. Would this work with vue2.7? We are currently still on 2.7, rewriting everything with

datWeazel avatar Jul 17 '22 11:07 datWeazel

It seems not to work in 2.7 injection "redrawVueMasonry" not found.

MartinX3 avatar Jul 24 '22 13:07 MartinX3