element-plus
Version:
A Component Library for Vue 3
1 lines • 2.09 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 { ExtractPropTypes, ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Countdown from './countdown.vue'\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)\nexport type CountdownProps = ExtractPropTypes<typeof countdownProps>\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":";;;;AAOO,MAAM,iBAAiB,UAAW,CAAA;AAAA,EAIvC,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,UAAA;AAAA,GACX;AAAA,EAIA,MAAQ,EAAA,MAAA;AAAA,EAIR,MAAQ,EAAA,MAAA;AAAA,EAIR,KAAO,EAAA,MAAA;AAAA,EAIP,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,cAAA,CAA+B,CAAC,MAAA,EAAQ,MAAM,CAAC,CAAA;AAAA,IACrD,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,MAAM,cAA2B,CAAA,CAAC,MAAQ,EAAA,MAAA,EAAQ,KAAK,CAAC,CAAA;AAAA,GAC1D;AACF,CAAU,EAAA;AAIH,MAAM,cAAiB,GAAA;AAAA,EAC5B,QAAQ,MAAM,IAAA;AAAA,EACd,CAAC,YAAA,GAAe,CAAC,KAAA,KAAkB,SAAS,KAAK,CAAA;AACnD;;;;"}