ant-design-blazor/components/image/Image.razor

27 lines
717 B
C#
Raw Normal View History

@namespace AntDesign
@inherits AntDomComponentBase
<div class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
<img alt="@Alt" class="ant-image-img" src="@Src" style="@_imgStyle"
@onerror="HandleOnError"
@onloadstart="HandleOnLoadStart"
@onload="HandleOnLoad" />
@if (!_loaded && Placeholder != null)
{
<div aria-hidden="true" class="ant-image-placeholder">
@Placeholder
</div>
}
@if (_loaded && !_isError && Preview)
{
<div class="ant-image-mask" @onclick="OnPreview">
<div class="ant-image-mask-info">
<Icon Type="eye" /> @Locale.Preview
</div>
</div>
}
</div>