feat(image): add native decoding prop to Image component (#13487)

This commit is contained in:
Wiki Tajrobe
2025-06-15 13:03:51 +02:00
committed by GitHub
parent 07983bf5bf
commit d2f79bd431

View File

@@ -52,6 +52,7 @@ export const imageProps = {
loadingIcon: makeStringProp('photo'), loadingIcon: makeStringProp('photo'),
crossorigin: String as PropType<ImgHTMLAttributes['crossorigin']>, crossorigin: String as PropType<ImgHTMLAttributes['crossorigin']>,
referrerpolicy: String as PropType<ImgHTMLAttributes['referrerpolicy']>, referrerpolicy: String as PropType<ImgHTMLAttributes['referrerpolicy']>,
decoding: String as PropType<ImgHTMLAttributes['decoding']>,
}; };
export type ImageProps = ExtractPropTypes<typeof imageProps>; export type ImageProps = ExtractPropTypes<typeof imageProps>;
@@ -153,6 +154,7 @@ export default defineComponent({
const attrs = { const attrs = {
alt: props.alt, alt: props.alt,
class: bem('img'), class: bem('img'),
decoding: props.decoding,
style: { style: {
objectFit: props.fit, objectFit: props.fit,
objectPosition: props.position, objectPosition: props.position,