zgg-ui
Version:
2.0.1 正式版本 基于 Vue 3、UniApp 和 TypeScript 开发的多端适配移动端 UI 组件库,旨在提供丰富的组件集合,帮助开发者快速构建多端响应式的移动应用界面
31 lines (24 loc) • 920 B
text/typescript
import type { InjectionKey } from 'vue'
import { propsHook, PropsTypeHook } from '../../libs/zHooks'
type zCheckBoxSizeType = 'small' | 'normal' | 'large' | ''
type zCheckBoxShapes = 'square' | 'circle'
interface CheckboxGroupProps extends PropsTypeHook {
size?: zCheckBoxSizeType
checkedShape?: zCheckBoxShapes
disabled?: boolean
labelDisabled?: boolean
border?: boolean
activeColor?: string
modelValue: zCheckboxGroupValueType
min?: number
max?: number
wrap?: boolean
validateEvent?: boolean
}
export type zCheckboxValueType = string | number | boolean
export type zCheckboxGroupValueType = Exclude<zCheckboxValueType, boolean>[]
export interface CheckboxGroupContext extends CheckboxGroupProps {
changeEvent: (val: zCheckboxGroupValueType[number]) => void
}
export const zCheckboxGroupKey: InjectionKey<CheckboxGroupContext> =
Symbol('zCheckboxGroupKey')