This commit is contained in:
2026-01-05 12:47:14 +08:00
commit 1fc846fae3
1614 changed files with 162035 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import type { ExtractPropTypes, PropType } from 'vue'
import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '../_constants'
import { commonProps, isBoolean, isNumber, isString } from '../_utils'
export const collapseProps = {
...commonProps,
/**
* @description 当前展开面板的 `name`
*/
modelValue: { type: [String, Number, Array] as PropType<string | number | (string | number)[]> },
/**
* @description 是否开启手风琴模式
*/
accordion: Boolean,
}
export type CollapseProps = ExtractPropTypes<typeof collapseProps>
export const collapseEmits = {
[CHANGE_EVENT]: (val: string | number | (string | number)[], name: string | number, status: boolean) => isString(val) || isNumber(val) || (val instanceof Object && isNumber(name)) || (isString(name) && isBoolean(status)),
[UPDATE_MODEL_EVENT]: (val: string | number | (string | number)[]) => isString(val) || isNumber(val) || (val instanceof Object),
}
export type CollapseEmits = typeof collapseEmits