aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTusooa Zhu <tusooa@kazv.moe>2022-01-17 23:41:11 -0500
committerTusooa Zhu <tusooa@kazv.moe>2022-09-18 13:19:54 -0400
commit96564609f87e93d32448da6c7d6a75cea50eff93 (patch)
treebf026011bbe233b184a6a34d12d7e9d272c0a17a
parentfbbeb33f48379e056a48c077ac04a59c502125d9 (diff)
Make StillImage react to src changes
-rw-r--r--src/components/still-image/still-image.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js
index 1806d33b..200ef147 100644
--- a/src/components/still-image/still-image.js
+++ b/src/components/still-image/still-image.js
@@ -57,6 +57,14 @@ const StillImage = {
onError () {
this.imageLoadError && this.imageLoadError()
}
+ },
+ watch: {
+ src () {
+ this.realSrc = this.src
+ },
+ dataSrc () {
+ this.$el.removeAttribute('data-loaded')
+ }
}
}