Files
cmgd-mini-app/uni_modules/nutui-uni/components/timepannel/timepannel.ts
2026-01-05 12:47:14 +08:00

24 lines
662 B
TypeScript

import type { ExtractPropTypes } from 'vue'
import { CHANGE_EVENT } from '../_constants'
import { commonProps, isNumber, isString, makeNumericProp } from '../_utils'
export const timepannelProps = {
...commonProps,
/**
* @description 显示的名称
*/
name: String,
/**
* @description 唯一标识,和 current-key一起标识当前选择的天
*/
pannelKey: makeNumericProp(0),
}
export type TimePannelProps = ExtractPropTypes<typeof timepannelProps>
export const timepannelEmits = {
[CHANGE_EVENT]: (pannelKey: number | string) => isNumber(pannelKey) || isString(pannelKey),
}
export type TimePannelEmits = typeof timepannelEmits