UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 5.09 kB
{"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,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAI7C,WAAA,EAAa,MAAA;AAAA;AAAA;AAAA;AAAA,EAIb,UAAA,EAAY,MAAA;AAAA;AAAA;AAAA;AAAA,EAIZ,UAAA,EAAY,MAAA;AAAA;AAAA;AAAA;AAAA,EAIZ,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,UAAA,EAAY;AAAA,IACV,MAAM,cAAA,CAA+B,CAAC,MAAM,KAAA,EAAO,MAAA,EAAQ,MAAM,CAAC,CAAA;AAAA,IAClE,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,cAAA,CAAoC,CAAC,IAAA,EAAM,KAAK,CAAC;AAAA,GACzD;AAAA;AAAA;AAAA;AAAA,EAIA,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,cAAA,CAAoC,CAAC,IAAA,EAAM,KAAK,CAAC;AAAA,GACzD;AAAA;AAAA;AAAA;AAAA,EAIA,OAAA,EAAS,OAAA;AAAA,EACT,GAAG,sBAAA;AAAA;AAAA;AAAA;AAAA,EAIH,YAAA,EAA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