Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit fd5c0db

Browse files
refactor(c-image): wrap rest object in reactive
1 parent 4baa8cf commit fd5c0db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/c-image/src/c-image.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
ref,
1717
unref,
1818
watchEffect,
19+
reactive,
1920
} from "vue"
2021
import {
2122
chakra,
@@ -105,12 +106,12 @@ export const CImage: ComponentWithProps<DeepPartial<CImageProps>> =
105106
crossOrigin: String as PropType<CImageProps["crossOrigin"]>,
106107
},
107108
setup(props, { slots, attrs }) {
108-
const rest = {
109+
const rest = reactive({
109110
width: props.htmlWidth,
110111
height: props.htmlHeight,
111112
onLoad: props.onLoad,
112113
onError: props.onError,
113-
}
114+
})
114115

115116
const providedFallback = computed(
116117
() => props.fallbackSrc !== undefined || !!slots?.default?.()

0 commit comments

Comments
 (0)