!1696 feat(#I44LZT): carousel item support width 100%

* feat: 移除 sealed 关键字
* style: 增加宽度 100% 样式
This commit is contained in:
Argo 2021-08-09 10:16:39 +00:00
parent aafce4a023
commit 631c939e71
4 changed files with 12 additions and 5 deletions

View File

@ -47,3 +47,7 @@
.carousel-indicators [data-bs-target] {
background-color: #606266;
}
.carousel-item img {
width: 100%;
}

View File

@ -1,3 +1,3 @@
@namespace BootstrapBlazor.Components
@namespace BootstrapBlazor.Components
<img src="@ImageUrl" style="max-width:100%" @onclick="@OnClickImage">
<img src="@ImageUrl" @onclick="@OnClickImage">

View File

@ -11,7 +11,7 @@ namespace BootstrapBlazor.Components
/// <summary>
///
/// </summary>
public sealed partial class CarouselImage : ComponentBase
public partial class CarouselImage : ComponentBase
{
/// <summary>
///
@ -27,7 +27,10 @@ namespace BootstrapBlazor.Components
private async Task OnClickImage()
{
if (OnClick != null) await OnClick(ImageUrl ?? "");
if (OnClick != null)
{
await OnClick(ImageUrl ?? "");
}
}
}
}

File diff suppressed because one or more lines are too long