Skip to content

Commit

Permalink
fix(image): added load trigger for mounted with complete
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli committed Feb 19, 2024
1 parent 306b005 commit dc5bfd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/runtime/components/SpeedkitImage/Base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,15 @@ export default {
mounted() {
this.loading = !this.$el.complete;
if (!this.loading) {
this.onLoad({ target: this.$el });
}
},
methods: {
onLoad(e) {
this.loading = false;
this.$emit('load', e.target.currentSrc);
this.$emit('load', e.target);
}
}
};
Expand Down

0 comments on commit dc5bfd5

Please sign in to comment.