@nutui/nutui-react-taro
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
48 lines (47 loc) • 1.15 kB
TypeScript
import { default as React, CSSProperties, ReactNode } from 'react';
import { SwiperProps as TaroSwiperProps } from '@tarojs/components';
import { CommonEventFunction } from '@tarojs/components/types/common';
export interface SwiperProps extends Omit<TaroSwiperProps, 'ref'> {
/**
* 轮播卡片的宽度
* @default -
*/
width: number
/**
* 轮播卡片的高度
* @default -
*/
height: number | string
/**
* 轮播方向
* @default horizontal
*/
direction: 'horizontal' | 'vertical'
/**
* 分页指示器是否展示
* @default false
*/
indicator: ReactNode
/**
* 自动轮播
* @default false
*/
autoPlay: boolean
/**
* 是否循环轮播
* @default true
*/
loop: boolean
/**
* 初始化索引值
* @default 0
*/
defaultValue: number
/**
* 卡片切换后的回调
* @default -
*/
onChange: CommonEventFunction<TaroSwiperProps.onChangeEventDetail>
style: CSSProperties;
}
export declare const Swiper: React.ForwardRefExoticComponent<Partial<SwiperProps> & React.RefAttributes<unknown>>;