@mijadesign/mjui-react-taro
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
47 lines (46 loc) • 1.03 kB
TypeScript
import React, { CSSProperties, ReactNode } from 'react';
import { SwiperProps as TaroSwiperProps } from '@tarojs/components';
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: (e: any) => void
style: CSSProperties;
}
export declare const Swiper: React.ForwardRefExoticComponent<Partial<SwiperProps> & React.RefAttributes<unknown>>;