UNPKG

vexip-ui

Version:

A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good

1 lines 3.09 kB
{"version":3,"file":"props.cjs","sources":["../../../components/calendar/props.ts"],"sourcesContent":["import { booleanProp, buildProps, eventProp, localeProp } from '@vexip-ui/config'\n\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport type { ConfigurableProps } from '@vexip-ui/config'\nimport type { Dateable } from '@vexip-ui/utils'\nimport type { CalendarPanelSlots, CalendarSlots } from './symbol'\n\nexport const calendarPanelProps = buildProps({\n locale: localeProp('calendar'),\n /**\n * 选中的日期\n */\n value: [Number, String, Date, Array] as PropType<Dateable | Dateable[]>,\n /**\n * 当前日历显示的年份\n */\n year: Number,\n /**\n * 当前日历显示的月份 (1 ~ 12)\n */\n month: Number,\n /**\n * 头部星期显示的内容,数量须为 7 个\n */\n weekDays: Array as PropType<string[]>,\n weekStart: Number,\n today: [Number, String, Date] as PropType<Dateable>,\n disabledDate: Function as PropType<(data: Date) => boolean>,\n valueType: String as PropType<'start' | 'end'>,\n min: [Number, String, Date] as PropType<Dateable>,\n max: [Number, String, Date] as PropType<Dateable>,\n range: booleanProp,\n selectRow: booleanProp,\n slots: Object as PropType<CalendarPanelSlots>,\n onSelect: eventProp<(date: Date) => void>(),\n onHover: eventProp<(date: Date | null) => void>(),\n})\n\nexport type CalendarPanelProps = ExtractPropTypes<typeof calendarPanelProps>\nexport type CalendarPanelCProps = ConfigurableProps<CalendarPanelProps>\n\nexport const calendarProps = buildProps({\n locale: localeProp('calendar'),\n value: [Number, String, Date] as PropType<Dateable | Dateable[]>,\n year: Number,\n /**\n * 当前日历显示的月份 (1 ~ 12)\n */\n month: Number,\n /**\n * 头部星期显示的内容,数量须为 7 个\n */\n weekDays: Array as PropType<string[]>,\n weekStart: Number,\n today: [Number, String, Date] as PropType<Dateable>,\n disabledDate: Function as PropType<(data: Date) => boolean>,\n slots: Object as PropType<CalendarSlots>,\n onSelect: eventProp<(date: Date) => void>(),\n onYearChange: eventProp<(year: number, month: number) => void>(),\n onMonthChange: eventProp<(year: number, month: number) => void>(),\n})\n\nexport type CalendarProps = ExtractPropTypes<typeof calendarProps>\nexport type CalendarCProps = ConfigurableProps<CalendarProps>\n"],"names":["calendarPanelProps","buildProps","localeProp","booleanProp","eventProp","calendarProps"],"mappings":"oHAOaA,EAAqBC,EAAAA,WAAW,CAC3C,OAAQC,aAAW,UAAU,EAI7B,MAAO,CAAC,OAAQ,OAAQ,KAAM,KAAK,EAInC,KAAM,OAIN,MAAO,OAIP,SAAU,MACV,UAAW,OACX,MAAO,CAAC,OAAQ,OAAQ,IAAI,EAC5B,aAAc,SACd,UAAW,OACX,IAAK,CAAC,OAAQ,OAAQ,IAAI,EAC1B,IAAK,CAAC,OAAQ,OAAQ,IAAI,EAC1B,MAAOC,EAAA,YACP,UAAWA,EAAA,YACX,MAAO,OACP,SAAUC,EAAAA,UAAgC,EAC1C,QAASA,EAAuC,UAAA,CAClD,CAAC,EAKYC,EAAgBJ,EAAAA,WAAW,CACtC,OAAQC,aAAW,UAAU,EAC7B,MAAO,CAAC,OAAQ,OAAQ,IAAI,EAC5B,KAAM,OAIN,MAAO,OAIP,SAAU,MACV,UAAW,OACX,MAAO,CAAC,OAAQ,OAAQ,IAAI,EAC5B,aAAc,SACd,MAAO,OACP,SAAUE,EAAAA,UAAgC,EAC1C,aAAcA,EAAAA,UAAiD,EAC/D,cAAeA,EAAiD,UAAA,CAClE,CAAC"}