1 | import { ComponentType } from 'react'
|
2 | import { StandardProps } from './common'
|
3 | interface SwiperItemProps extends StandardProps {
|
4 | /** 该 swiper-item 的标识符
|
5 | * @supported weapp, swan, tt, jd, h5, rn, harmony, harmony_hybrid
|
6 | */
|
7 | itemId?: string
|
8 | /** 是否跳过未显示的滑块布局,设为 true 可优化复杂情况下的滑动性能,但会丢失隐藏状态滑块的布局信息
|
9 | * @default false
|
10 | * @supported weapp
|
11 | */
|
12 | skipHiddenItemLayout?: boolean
|
13 | /** Swiper 循环状态下,前后垫片节点拷贝模式,用于修复 Vue 在 CustomElements 下的节点拷贝问题
|
14 | * @default false
|
15 | * @supported h5
|
16 | */
|
17 | deep?: boolean
|
18 | }
|
19 | /** 仅可放置在 swiper 组件中,宽高自动设置为100%
|
20 | * > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147)
|
21 | * @classification viewContainer
|
22 | * @supported weapp, alipay, swan, tt, jd, h5, rn, harmony, harmony_hybrid
|
23 | * @example_react
|
24 | * ```tsx
|
25 | * class App extends Component {
|
26 | * render () {
|
27 | * return (
|
28 | * <Swiper
|
29 | * className='test-h'
|
30 | * indicatorColor='#999'
|
31 | * indicatorActiveColor='#333'
|
32 | * vertical
|
33 | * circular
|
34 | * indicatorDots
|
35 | * autoplay>
|
36 | * <SwiperItem>
|
37 | * <View className='demo-text-1'>1</View>
|
38 | * </SwiperItem>
|
39 | * <SwiperItem>
|
40 | * <View className='demo-text-2'>2</View>
|
41 | * </SwiperItem>
|
42 | * <SwiperItem>
|
43 | * <View className='demo-text-3'>3</View>
|
44 | * </SwiperItem>
|
45 | * </Swiper>
|
46 | * )
|
47 | * }
|
48 | * }
|
49 | * ```
|
50 | * @example_vue
|
51 | * ```html
|
52 | * <template>
|
53 | * <swiper
|
54 | * class='test-h'
|
55 | * indicator-color='#999'
|
56 | * indicator-active-color='#333'
|
57 | * :vertical="true"
|
58 | * :circular="true"
|
59 | * :indicator-dots="true"
|
60 | * :autoplay="true"
|
61 | * >
|
62 | * <swiper-item>
|
63 | * <view class='demo-text-1'>1</view>
|
64 | * </swiper-item>
|
65 | * <swiper-item>
|
66 | * <view class='demo-text-2'>2</view>
|
67 | * </swiper-item>
|
68 | * <swiper-item>
|
69 | * <view class='demo-text-3'>3</view>
|
70 | * </swiper-item>
|
71 | * </swiper>
|
72 | * </template>
|
73 | * ```
|
74 | * @see https://developers.weixin.qq.com/miniprogram/dev/component/swiper-item.html
|
75 | */
|
76 | declare const SwiperItem: ComponentType<SwiperItemProps>
|
77 | export { SwiperItem, SwiperItemProps }
|