P
P
petan4ik2018-10-13 14:33:03
Vue.js
petan4ik, 2018-10-13 14:33:03

How to catch an event in Vue?

Hello, I
have BootstrapVue with its component I want to animate the loading of images. Is it possible to somehow catch the event when the state of the image changes? <b-img-lazy>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2018-10-13
@petan4ik

You can hang a handler on the load event (native, the component itself does not generate events). In the handler, you need to check that e.target.src is correct - because the event occurs twice, the first time when the stub is shown, the second time when the real picture is loaded. Somehow so .

A
Artem0071, 2018-10-13
@Artem0071

Try to read this,
maybe there will be something useful somewhere

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question