vuux
Version:
Vue3 Nuxt3 Nuxt4 组件库
41 lines (40 loc) • 716 B
TypeScript
import { Ref } from 'vue';
/**
* Props
*/
export interface Props {
modelValue?: number;
steps?: (string | number)[];
direction?: 'horizontal' | 'vertical';
icon?: string;
activeIcon?: string;
activeColor?: string;
ingColor?: string;
}
/**
* ItemProps
*/
export interface ItemProps {
name: string | number;
}
/**
* 步骤上下文字段类型
*/
export type StepFields = {
icon: string;
active: (string | number)[];
activeIcon: string;
steps: (string | number)[];
};
/**
* 上下文类型
*/
export type StepContext = {
fields: Ref<StepFields>;
};
/**
* 组件事件类型
*/
export type Emit = {
(event: 'update:modelValue', value: number): void;
};