element-plus
Version:
A Component Library for Vue 3
1 lines • 4.84 kB
Source Map (JSON)
{"version":3,"file":"date-picker-panel.mjs","sources":["../../../../../../../packages/components/date-picker-panel/src/props/date-picker-panel.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { disabledTimeListsProps } from '@element-plus/components/time-picker/src/props/shared'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type {\n ModelValueType,\n SingleOrRange,\n} from '@element-plus/components/time-picker'\nimport type { DatePickerType } from '../types'\n\nexport const datePickerPanelProps = buildProps({\n /**\n * @description optional, format of binding value. If not specified, the binding value will be a Date object\n */\n valueFormat: String,\n /**\n * @description optional, format of the date displayed in input's inner panel\n */\n dateFormat: String,\n /**\n * @description optional, format of the time displayed in input's inner panel\n */\n timeFormat: String,\n /**\n * @description whether picker is disabled\n */\n disabled: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description binding value, if it is an array, the length should be 2\n */\n modelValue: {\n type: definePropType<ModelValueType>([Date, Array, String, Number]),\n default: '',\n },\n /**\n * @description optional, default date of the calendar\n */\n defaultValue: {\n type: definePropType<SingleOrRange<Date>>([Date, Array]),\n },\n /**\n * @description optional, the time value to use when selecting date range\n */\n defaultTime: {\n type: definePropType<SingleOrRange<Date>>([Date, Array]),\n },\n /**\n * @description whether to pick a time range\n */\n isRange: Boolean,\n ...disabledTimeListsProps,\n /**\n * @description a function determining if a date is disabled with that date as its parameter. Should return a Boolean\n */\n disabledDate: {\n type: Function,\n },\n /**\n * @description set custom className\n */\n cellClassName: {\n type: Function,\n },\n /**\n * @description an object array to set shortcut options\n */\n shortcuts: {\n type: Array,\n default: () => [],\n },\n /**\n * @description whether to pick time using arrow buttons\n */\n arrowControl: Boolean,\n /**\n * @description unlink two date-panels in range-picker\n */\n unlinkPanels: Boolean,\n /**\n * @description whether to show the now button\n */\n showNow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to show the confirm button\n */\n showConfirm: Boolean,\n /**\n * @description whether to show footer\n */\n showFooter: Boolean,\n /**\n * @description whether to show the number of the calendar week\n */\n showWeekNumber: Boolean,\n /**\n * @description type of the picker\n */\n type: {\n type: definePropType<DatePickerType>(String),\n default: 'date',\n },\n /**\n * @description whether to show clear button in range mode\n */\n clearable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the date picker is bordered\n */\n border: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n} as const)\n\nexport type DatePickerPanelProps = ExtractPropTypes<typeof datePickerPanelProps>\nexport type DatePickerPanelPropsPublic = ExtractPublicPropTypes<\n typeof datePickerPanelProps\n>\n"],"names":[],"mappings":";;;AAUO,MAAM,uBAAuB,UAAW,CAAA;AAAA,EAI7C,WAAa,EAAA,MAAA;AAAA,EAIb,UAAY,EAAA,MAAA;AAAA,EAIZ,UAAY,EAAA,MAAA;AAAA,EAIZ,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,MAAM,cAA+B,CAAA,CAAC,MAAM,KAAO,EAAA,MAAA,EAAQ,MAAM,CAAC,CAAA;AAAA,IAClE,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,cAAA,CAAoC,CAAC,IAAA,EAAM,KAAK,CAAC,CAAA;AAAA,GACzD;AAAA,EAIA,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,cAAA,CAAoC,CAAC,IAAA,EAAM,KAAK,CAAC,CAAA;AAAA,GACzD;AAAA,EAIA,OAAS,EAAA,OAAA;AAAA,EACT,GAAG,sBAAA;AAAA,EAIH,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,QAAA;AAAA,GACR;AAAA,EAIA,aAAe,EAAA;AAAA,IACb,IAAM,EAAA,QAAA;AAAA,GACR;AAAA,EAIA,SAAW,E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