title: SwiperItem

sidebar_label: SwiperItem

仅可放置在 swiper 组件中,宽高自动设置为100%

参考文档

类型

  1. ComponentType<SwiperItemProps>

示例代码

  1. class App extends Component {
  2. render () {
  3. return (
  4. <Swiper
  5. className='test-h'
  6. indicatorColor='#999'
  7. indicatorActiveColor='#333'
  8. vertical
  9. circular
  10. indicatorDots
  11. autoplay>
  12. <SwiperItem>
  13. <View className='demo-text-1'>1</View>
  14. </SwiperItem>
  15. <SwiperItem>
  16. <View className='demo-text-2'>2</View>
  17. </SwiperItem>
  18. <SwiperItem>
  19. <View className='demo-text-3'>3</View>
  20. </SwiperItem>
  21. </Swiper>
  22. )
  23. }
  24. }

SwiperItemProps

参数 类型 必填 说明
itemId string 该 swiper-item 的标识符

API 支持度

API 微信小程序 H5 React Native
SwiperItemProps.itemId ✔️

API 支持度

API 微信小程序 H5 React Native
SwiperItem ✔️