UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 2.82 kB
{"version":3,"file":"statistic.mjs","names":[],"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"],"mappings":";;;;;;AAgDA,MAAa,iBAAiB,WAAW;CAIvC,kBAAkB;EAChB,MAAM;EACN,SAAS;EACV;CAID,gBAAgB;EACd,MAAM;EACN,SAAS;EACV;CAID,WAAW;EACT,MAAM;EACN,SAAS;EACV;CAID,WAAW;CAIX,OAAO;EACL,MAAM,eAA+B,CAAC,QAAQ,OAAO,CAAC;EACtD,SAAS;EACV;CAID,QAAQ;CAKR,QAAQ;CAIR,OAAO;CAIP,YAAY,EACV,MAAM,eAA2B;EAAC;EAAQ;EAAQ;EAAM,CAAC,EAC1D;CACF,CAAU"}