Skip to content

Commit ba8b40d

Browse files
fix(nuxt): enhance reactivity by tracking changes to image sources (fixes #52)
1 parent 96648bb commit ba8b40d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/nuxt/src/runtime/components/UnLazyImage.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ watchEffect(() => {
9898
if (!target.value)
9999
return
100100
101+
// Track changes to image sources to trigger reactivity
102+
void props.src
103+
void props.srcSet
104+
void props.sources
105+
101106
if (hash.value && hash.value !== lastHash) {
102107
const placeholder = createPlaceholderFromHash({
103108
image: target.value,

0 commit comments

Comments
 (0)