2021-01-25 02:05:18 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
|
|
|
|
|
2021-01-30 22:39:56 +08:00
|
|
|
|
<div class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
|
2021-01-25 02:05:18 +08:00
|
|
|
|
<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>
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-30 22:39:56 +08:00
|
|
|
|
@if (_loaded && !_isError && Preview)
|
2021-01-25 02:05:18 +08:00
|
|
|
|
{
|
|
|
|
|
<div class="ant-image-mask" @onclick="OnPreview">
|
|
|
|
|
<div class="ant-image-mask-info">
|
|
|
|
|
<Icon Type="eye" /> @Locale.Preview
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|