mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
feat(image): add native decoding
prop to Image component (#13487)
This commit is contained in:
@@ -52,6 +52,7 @@ export const imageProps = {
|
||||
loadingIcon: makeStringProp('photo'),
|
||||
crossorigin: String as PropType<ImgHTMLAttributes['crossorigin']>,
|
||||
referrerpolicy: String as PropType<ImgHTMLAttributes['referrerpolicy']>,
|
||||
decoding: String as PropType<ImgHTMLAttributes['decoding']>,
|
||||
};
|
||||
|
||||
export type ImageProps = ExtractPropTypes<typeof imageProps>;
|
||||
@@ -153,6 +154,7 @@ export default defineComponent({
|
||||
const attrs = {
|
||||
alt: props.alt,
|
||||
class: bem('img'),
|
||||
decoding: props.decoding,
|
||||
style: {
|
||||
objectFit: props.fit,
|
||||
objectPosition: props.position,
|
||||
|
Reference in New Issue
Block a user