UNPKG

@ray-js/smart-ui-typings

Version:

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

84 lines (83 loc) 1.77 kB
/// <reference types="wechat-miniprogram" /> import { VantBaseExternalClassName, VantComponent, VantEventHandler } from '../base'; /** * 步骤配置项 */ export interface VantStepsOption { /** * 当前步骤名称 */ text?: string; /** * 当前步骤描述信息 */ desc?: string; /** * 当前步骤激活状态底部图标 */ inactiveIcon?: string; /** * 当前步骤未激活状态底部图标 */ activeIcon?: string; } export interface VantStepsProps { /** * 当前步骤 * * @default 0 */ active?: number; /** * 当前步骤配置 */ steps?: VantStepsOption[]; /** * 显示方向 */ direction?: 'horizontal' | 'vertical'; /** * 激活状态颜色 * * @default '#07c160' */ activeColor?: string; /** * 未激活状态颜色 * * @default '#969799' */ inactiveColor?: string; /** * 激活状态底部图标,可选值见 `Icon` 组件 * * @default 'checked' */ activeIcon?: string; /** * 未激活状态底部图标,可选值见 `Icon` 组件 */ inactiveIcon?: string; } /** * @deprecated */ export interface VantStepsClickStepEvent extends WechatMiniprogram.BaseEvent { /** * 当前选中步骤索引 */ detail: number; } export interface VantStepsEvents { /** * 点击步骤时触发的事件 */ onClickStep?: VantEventHandler<number>; } export interface VantStepsExternalClassName extends VantBaseExternalClassName { /** * 描述信息样式类 */ descClass?: string; } export type VantSteps = VantComponent<VantStepsProps, VantStepsEvents, VantStepsExternalClassName>;