Skip to content

卡片 ​

卡片式切换效果。

引入 ​

WARNING

v3版本不再默认引入所有modules,这意味着在使用modules中的模块时,都需要手动引入。

同时部分modules的css也需手动引入。需要注意的是,将style设置为scoped会导致样式失效。推荐全局引入所需要的模块样式。参考:引入样式

具体可查看模块化按需引入

vue
<script lang="ts" setup>
import { EffectCards } from '@zebra-ui/swiper/modules'

const modules = ref([EffectCards])
</script>
vue
<script lang="ts" setup>
import { EffectCards } from '@/uni_modules/zebra-swiper/modules'

const modules = ref([EffectCards])
</script>
css
<style lang="scss">
    @use "@zebra-ui/swiper/modules/effect-cards/effect-cards.scss";
</style>
css
<style lang="scss">
    @use "@/uni_modules/zebra-swiper/modules/effect-cards/effect-cards.scss";
</style>

使用 ​

配置 ​

rotate ​

是否开启卡片旋转

类型
boolean
默认值
true

perSlideOffset ​

swiper的偏移量。单位(px)

类型
number
默认值
8

perSlideRotate ​

swiper的旋转角度

类型
number
默认值
2

slideShadows ​

是否显示item的3D阴影

类型
boolean
默认值
true

Released under the MIT License.