diff --git a/src/Masa.Blazor/Components/Carousel/MCarouselItem.cs b/src/Masa.Blazor/Components/Carousel/MCarouselItem.cs index 4841b50c95..72e88a5371 100644 --- a/src/Masa.Blazor/Components/Carousel/MCarouselItem.cs +++ b/src/Masa.Blazor/Components/Carousel/MCarouselItem.cs @@ -47,6 +47,7 @@ protected override RenderFragment GenChildContent() builder.AddAttribute(2, "Src", Src); builder.AddAttribute(3, "Height", ((MCarousel?)WindowGroup)?.InternalHeight); builder.AddAttribute(4, "ChildContent", ChildContent); + builder.AddAttribute(5, "onclick", EventCallback.Factory.Create(this, OnClick)); builder.CloseComponent(); }; }