nutui-uniapp
Version:
京东风格的轻量级移动端 Uniapp、Vue3 组件库(支持小程序开发)
24 lines (19 loc) • 662 B
text/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