element-plus
Version:
A Component Library for Vue 3
1 lines • 3.22 kB
Source Map (JSON)
{"version":3,"file":"statistic.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Statistic from './statistic.vue'\n\nexport interface StatisticProps {\n /**\n * @description Setting the decimal point\n */\n decimalSeparator?: string\n /**\n * @description Sets the thousandth identifier\n */\n groupSeparator?: string\n /**\n * @description numerical precision\n */\n precision?: number\n /**\n * @description Custom numerical presentation\n */\n formatter?: (...args: any[]) => string | number\n /**\n * @description Numerical content\n */\n value?: number | Dayjs\n /**\n * @description Sets the prefix of a number\n */\n prefix?: string\n /**\n * @description Sets the suffix of a number\n */\n suffix?: string\n /**\n * @description Numeric titles\n */\n title?: string\n /**\n * @description Styles numeric values\n */\n valueStyle?: StyleValue\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `StatisticProps` instead.\n */\nexport const statisticProps = buildProps({\n /**\n * @description Setting the decimal point\n */\n decimalSeparator: {\n type: String,\n default: '.',\n },\n /**\n * @description Sets the thousandth identifier\n */\n groupSeparator: {\n type: String,\n default: ',',\n },\n /**\n * @description numerical precision\n */\n precision: {\n type: Number,\n default: 0,\n },\n /**\n * @description Custom numerical presentation\n */\n formatter: Function,\n /**\n * @description Numerical content\n */\n value: {\n type: definePropType<number | Dayjs>([Number, Object]),\n default: 0,\n },\n /**\n * @description Sets the prefix of a number\n */\n prefix: String,\n\n /**\n * @description Sets the suffix of a number\n */\n suffix: String,\n /**\n * @description Numeric titles\n */\n title: String,\n /**\n * @description Styles numeric 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 `StatisticProps` instead.\n */\nexport type StatisticPropsPublic = ExtractPublicPropTypes<typeof statisticProps>\n\nexport type StatisticInstance = InstanceType<typeof Statistic> & unknown\n"],"names":[],"mappings":";;AAgDO,MAAM,iBAAiB,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIvC,gBAAA,EAAkB;AAAA,IAChB,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,SAAA,EAAW,QAAA;AAAA;AAAA;AAAA;AAAA,EAIX,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,MAAA,EAAQ,MAAA;AAAA;AAAA;AAAA;AAAA,EAKR,MAAA,EAAQ,MAAA;AAAA;AAAA;AAAA;AAAA,EAIR,KAAA,EAAO,MAAA;AAAA;AAAA;AAAA;AAAA,EAIP,UAAA,EAAY;AAAA,IACV,MAAM,cAAA,CAA2B,CAAC,MAAA,EAAQ,MAAA,EAAQ,KAAK,CAAC;AAAA;AAE5D,CAAU;;;;"}