More attempts
parent
4dafc434f4
commit
c0ea836510
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -23,6 +23,7 @@
|
||||||
:src="getSrc()"
|
:src="getSrc()"
|
||||||
:key="data.fileid"
|
:key="data.fileid"
|
||||||
|
|
||||||
|
ref="image"
|
||||||
@click="click"
|
@click="click"
|
||||||
@error="error"
|
@error="error"
|
||||||
@load="load"
|
@load="load"
|
||||||
|
@ -77,6 +78,13 @@ export default class Photo extends Mixins(GlobalMixin) {
|
||||||
return getPreviewUrl(this.data.fileid, this.data.etag);
|
return getPreviewUrl(this.data.fileid, this.data.etag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
// Check if already loaded
|
||||||
|
if ((<HTMLImageElement>this.$refs.image).complete) {
|
||||||
|
this.load();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Image loaded successfully */
|
/** Image loaded successfully */
|
||||||
load() {
|
load() {
|
||||||
this.data.flag |= this.c.FLAG_LOADED;
|
this.data.flag |= this.c.FLAG_LOADED;
|
||||||
|
|
Loading…
Reference in New Issue