From 96564609f87e93d32448da6c7d6a75cea50eff93 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 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') + } } }