init
This commit is contained in:
23
uni_modules/nutui-uni/components/timepannel/timepannel.ts
Normal file
23
uni_modules/nutui-uni/components/timepannel/timepannel.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
Reference in New Issue
Block a user