mirror of
https://gitee.com/blazorcomponent/MASA.Blazor.git
synced 2025-12-06 10:19:23 +08:00
* ♻ refactor: migrate all mobile components to a separate project
* remove unused files
* update
* update locale
* 🐛 fix: updating the logic of fetching latest release version
* update cicd
* update
1.8 KiB
1.8 KiB
title, desc, tag, related
| title | desc | tag | related | |||
|---|---|---|---|---|---|---|
| Swiper(移动端滑块) | 一个基于 [Swiper](https://github.com/nolimits4web/swiper) 的移动端触摸滑动组件。 | JS代理 |
|
在使用之前你必须引入以下文件:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/10.2.0/swiper-bundle.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/10.2.0/swiper-bundle.min.js"></script>
使用
示例
属性
竖向
循环
间隔
自动高度
默认情况下,Swiper 的高度是由高度最高的 slide 决定的,如果需要自适应高度,可以设置 AutoHeight 属性。
对于 MSwiperSlide 中的内容是异步加载的场景,建议在 MSwiperSlide 组件外加一个条件判断,以便在内容加载完成后重新计算高度。
<MSwiper AutoHeight>
@if (content is not null) {
<MSwiperSlide>@content</MSwiperSlide>
}
</MSwiper>