element-plus/packages/utils/validators.ts

16 lines
312 B
TypeScript

export const isValidComponentSize = (val: string) =>
['', 'large', 'default', 'small'].includes(val)
export const isValidDatePickType = (val: string) =>
[
'year',
'month',
'date',
'dates',
'week',
'datetime',
'datetimerange',
'daterange',
'monthrange',
].includes(val)