add basic view for item history
This commit is contained in:
parent
ad10021f3d
commit
77dbdc04c6
18 changed files with 630 additions and 311 deletions
|
@ -42,19 +42,27 @@ export default {
|
|||
url: this.src,
|
||||
data: this.image_data
|
||||
});
|
||||
},
|
||||
deferImage() {
|
||||
setTimeout(() => {
|
||||
if (this.cached) {
|
||||
const c = this.getThumbnail(this.src);
|
||||
if (c) {
|
||||
this.image_data = c;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.loadImage();
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
src: function (newVal, oldVal) {
|
||||
this.deferImage()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
if (this.cached) {
|
||||
const c = this.getThumbnail(this.src);
|
||||
if (c) {
|
||||
this.image_data = c;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.loadImage();
|
||||
}, 0);
|
||||
this.deferImage();
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue