UNPKG

@ray-js/smart-ui-typings

Version:

@ray-js/smart-ui 智能小程序 UI 框架的类型声明文件

69 lines (68 loc) 1.42 kB
/// <reference types="wechat-miniprogram" /> import { VantComponent, VantEventHandler } from '../base'; export interface VantTabbarProps { /** * 当前选中标签的索引 */ active?: number; /** * 是否固定在底部 * * @default true */ fixed?: boolean; /** * 固定在底部时,是否在标签位置生成一个等高的占位元素 * * @default false */ placeholder?: boolean; /** * 是否展示外边框 * * @default true */ border?: boolean; /** * 元素 `zIndex` * * @default 1 */ zIndex?: number; /** * 选中标签的颜色 * * @default '#1989fa' */ activeColor?: string; /** * 未选中标签的颜色 * * @default '#7d7e80' */ inactiveColor?: string; /** * 是否为 iPhoneX 留出底部安全距离 * * @default true */ safeAreaInsetBottom?: boolean; } /** * 切换标签时触发事件 * * @deprecated */ export interface VantTabbarChangeEvent extends WechatMiniprogram.BaseEvent { /** * 当前选中标签的名称或索引值 */ detail: number | string; } export interface VantTabbarEvents { /** * 切换标签时触发 */ onChange?: VantEventHandler<number | string>; } export type VantTabbar = VantComponent<VantTabbarProps, VantTabbarEvents>;