element-plus
Version:
A Component Library for Vue 3
1 lines • 2.73 kB
Source Map (JSON)
{"version":3,"file":"countdown.mjs","sources":["../../../../../../packages/components/countdown/src/countdown.ts"],"sourcesContent":["import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\n\nimport type { ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Countdown from './countdown.vue'\n\nexport interface CountdownProps {\n /**\n * @description Formatting the countdown display\n */\n format?: string\n /**\n * @description Sets the prefix of a countdown\n */\n prefix?: string\n /**\n * @description Sets the suffix of a countdown\n */\n suffix?: string\n /**\n * @description countdown titles\n */\n title?: string\n /**\n * @description target time\n */\n value?: number | Dayjs\n /**\n * @description Styles countdown values\n */\n valueStyle?: StyleValue\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `CountdownProps` instead.\n */\nexport const countdownProps = buildProps({\n /**\n * @description Formatting the countdown display\n */\n format: {\n type: String,\n default: 'HH:mm:ss',\n },\n /**\n * @description Sets the prefix of a countdown\n */\n prefix: String,\n /**\n * @description Sets the suffix of a countdown\n */\n suffix: String,\n /**\n * @description countdown titles\n */\n title: String,\n /**\n * @description target time\n */\n value: {\n type: definePropType<number | Dayjs>([Number, Object]),\n default: 0,\n },\n /**\n * @description Styles countdown values\n */\n valueStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n },\n} as const)\n/**\n * @deprecated Removed after 3.0.0, Use `CountdownProps` instead.\n */\nexport type CountdownPropsPublic = ExtractPublicPropTypes<typeof countdownProps>\n\nexport const countdownEmits = {\n finish: () => true,\n [CHANGE_EVENT]: (value: number) => isNumber(value),\n}\nexport type CountdownEmits = typeof countdownEmits\n\nexport type CountdownInstance = InstanceType<typeof Countdown> & unknown\n"],"names":[],"mappings":";;;;AAqCO,MAAM,iBAAiB,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIvC,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ,MAAA;AAAA;AAAA;AAAA;AAAA,EAIR,MAAA,EAAQ,MAAA;AAAA;AAAA;AAAA;AAAA,EAIR,KAAA,EAAO,MAAA;AAAA;AAAA;AAAA;AAAA,EAIP,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,cAAA,CAA+B,CAAC,MAAA,EAAQ,MAAM,CAAC,CAAA;AAAA,IACrD,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,UAAA,EAAY;AAAA,IACV,MAAM,cAAA,CAA2B,CAAC,MAAA,EAAQ,MAAA,EAAQ,KAAK,CAAC;AAAA;AAE5D,CAAU;AAMH,MAAM,cAAA,GAAiB;AAAA,EAC5B,QAAQ,MAAM,IAAA;AAAA,EACd,CAAC,YAAY,GAAG,CAAC,KAAA,KAAkB,SAAS,KAAK;AACnD;;;;"}