UNPKG

zgg-ui

Version:

2.0.1 正式版本 基于 Vue 3、UniApp 和 TypeScript 开发的多端适配移动端 UI 组件库,旨在提供丰富的组件集合,帮助开发者快速构建多端响应式的移动应用界面

28 lines (22 loc) 689 B
import { propsHook, PropsTypeHook } from '../../libs/zHooks' import { InjectionKey, shallowRef } from 'vue' export type stepModes = 'dot' | 'number' | 'dotIcon' | 'icon' export type StepContext = { uid: number } interface StepsProps extends PropsTypeHook { color?: string activeColor?: string disabled?: boolean modelValue?: number mode?: stepModes } export type StepsContext = StepsProps & { items: StepContext[] activeUidList: number[] addItem: (item: StepContext) => void removeItem: (uid: number) => void setActiveItem: (uid: number) => void } export const stepsContextKey: InjectionKey<StepsContext> = Symbol('stepsContextKey')