From fe1446732a1cf2841447c6d8dc3354a005db8fc6 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Mon, 17 Jan 2022 23:41:11 -0500 Subject: [PATCH] Make StillImage react to src changes --- src/components/still-image/still-image.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js index 1806d33b0..200ef147d 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') + } } }