Elements

组件

图片 Image

Image:图片容器。源加载期间显示骨架,图片到达后淡入;源损坏时显示 fallback 插槽,若调用方没有提供,则显示占位图标。容器尺寸由使用者指定。

#基础用法

image/basic Vue React
A photograph from the archive
image/error Vue React
A missing photograph
A missing photograph
image/fits Vue React
Cover crops to fill
Cover crops to fill
Contain keeps the whole
Contain keeps the whole
Fill stretches
Fill stretches

#属性

#Image

属性类型默认值描述
srcString—
altString""—
fitString as PropType<ImageProps["fit"]>"cover"—
loadingString as PropType<ImageProps["loading"]>"lazy"—