element-plus
Version:
A Component Library for Vue 3
1 lines • 2.43 kB
Source Map (JSON)
{"version":3,"file":"countdown.mjs","names":[],"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/**\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"],"mappings":";;;;;;;;AAqCA,MAAa,iBAAiB,WAAW;CAIvC,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CAID,QAAQ;CAIR,QAAQ;CAIR,OAAO;CAIP,OAAO;EACL,MAAM,eAA+B,CAAC,QAAQ,OAAO,CAAC;EACtD,SAAS;EACV;CAID,YAAY,EACV,MAAM,eAA2B;EAAC;EAAQ;EAAQ;EAAM,CAAC,EAC1D;CACF,CAAU;AAOX,MAAa,iBAAiB;CAC5B,cAAc;EACb,gBAAgB,UAAkB,SAAS,MAAM;CACnD"}