diff --git a/src/Masa.Blazor/Components/Swiper/MSwiper.razor.cs b/src/Masa.Blazor/Components/Swiper/MSwiper.razor.cs index f93ecbf14d..6eb4b7622f 100644 --- a/src/Masa.Blazor/Components/Swiper/MSwiper.razor.cs +++ b/src/Masa.Blazor/Components/Swiper/MSwiper.razor.cs @@ -208,4 +208,25 @@ await RunTaskInMicrosecondsAsync( 16, _ctsForUpdateSlides.Token); } + + /// + /// Invoke a method of the Swiper instance. + /// + /// The name of the method + /// The arguments of the method + /// + /// js: swiper.updateAutoHeight(speed); + ///
+ /// c#: await MSwiperInstance.InvokeVoidAsync("updateAutoHeight", speed); + ///
+ [MasaApiParameter] + public async Task InvokeVoidAsync(string funcName, params object[] args) + { + if (_swiperProxy is null) + { + return; + } + + await _swiperProxy.InvokeVoidAsync(funcName, args); + } }