logo
为了能更好地了解您的商业使用需求,请参与 Ant Design Blazor 商业应用调查,一起建设商业应用社区,为企业系统研发赋能!

Image图片

Examples

单击图像可以放大显示。

expand code expand code

大图使用 placeholder 渐进加载。

expand code expand code

从一张图片点开相册。

expand code expand code

可以使预览受控。

expand code expand code

加载失败显示图像占位符。

expand code expand code

点击左右切换按钮可以预览多张图片。

expand code expand code

可以设置不同的预览图片。

expand code expand code

Image API#

属性 描述 类型 默认值
Alt 属性图片的替代文字 String --
Fallback 属性如果图像无法加载则回退 String --
Height 属性图片高度 String --
Width 属性图片宽度 String --
Placeholder 属性加载占位符 RenderFragment --
Preview 属性启用或禁用预览功能 Boolean true
PreviewVisible 属性预览是否可见 Boolean --
Src 属性图片来源 String --
PreviewSrc 属性预览图像源 String --
PreviewVisibleChanged 属性AntDesign.Image.PreviewVisible 变化时执行的回调 EventCallback<Boolean> --
OnClick 属性图片点击回调 EventCallback<MouseEventArgs> --
Locale 属性组件的语言环境数据 ImageLocale --
Id 属性组件 HTML 的 ID String Uniquely Generated ID
Class 属性为 DOM 元素指定一个或多个类名。 String --
Style 属性指定 DOM 元素的内联样式。 String --
RefBack 属性一个 ForwardRef 实例。您可以使用 AntDesign.ForwardRef.Current 获取对内部 DOM 的引用。 ForwardRef --

ImagePreviewGroup API#

属性 描述 类型 默认值
ChildContent 属性组的内容。通常包含 Image 元素。 RenderFragment --
PreviewVisible 属性是否打开预览图片。双向绑定。 Boolean true
PreviewVisibleChanged 属性AntDesign.ImagePreviewGroup.PreviewVisible 变化时执行的回调 EventCallback<Boolean> --
Empty空状态 List列表
文档已更新,请点击 此处 更新。
A new version of this app is available. Click here to update.