Open summerset-zz opened 2 years ago
I've already tried this:
app.use(VueLazyload, { preload: 1, error: LAZY_ERROR, loading: LAZY_LOADING, attempt: 3, dispatchEvent: true, adapter: { error(listener, Init) { console.log(listener); }, }, });
but in arguments of error adapter I found no way to stop it.
and I also tried to add @error="errorHandler" to the <img> element. I can catch the event, but e.preventDefault() has no use:
@error="errorHandler"
<img>
e.preventDefault()
const errorHandler = (e: CustomEvent<any>) => { e.preventDefault(); console.log(e) } // the type of 'e' is 'ReactiveListener'
currently using vue 3.2.37, vue-lazyload 3.0.0-rc.2
I've already tried this:
but in arguments of error adapter I found no way to stop it.
and I also tried to add
@error="errorHandler"
to the<img>
element. I can catch the event, bute.preventDefault()
has no use:currently using vue 3.2.37, vue-lazyload 3.0.0-rc.2