mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
* Revert "fix(types): packing unexpected types (#19419)"
This reverts commit 13506ffb81.
* Revert "chore: add explicit type annoation (#19352)"
* fix(typescript): borken import paths in declaration files
* chore: emits smaller declaration files
63 lines
1.3 KiB
TypeScript
63 lines
1.3 KiB
TypeScript
import { buildProps, definePropType } from '@element-plus/utils'
|
|
|
|
import type { ExtractPropTypes, StyleValue } from 'vue'
|
|
import type { Dayjs } from 'dayjs'
|
|
import type Statistic from './statistic.vue'
|
|
|
|
export const statisticProps = buildProps({
|
|
/**
|
|
* @description Setting the decimal point
|
|
*/
|
|
decimalSeparator: {
|
|
type: String,
|
|
default: '.',
|
|
},
|
|
/**
|
|
* @description Sets the thousandth identifier
|
|
*/
|
|
groupSeparator: {
|
|
type: String,
|
|
default: ',',
|
|
},
|
|
/**
|
|
* @description numerical precision
|
|
*/
|
|
precision: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
/**
|
|
* @description Custom numerical presentation
|
|
*/
|
|
formatter: Function,
|
|
/**
|
|
* @description Numerical content
|
|
*/
|
|
value: {
|
|
type: definePropType<number | Dayjs>([Number, Object]),
|
|
default: 0,
|
|
},
|
|
/**
|
|
* @description Sets the prefix of a number
|
|
*/
|
|
prefix: String,
|
|
|
|
/**
|
|
* @description Sets the suffix of a number
|
|
*/
|
|
suffix: String,
|
|
/**
|
|
* @description Numeric titles
|
|
*/
|
|
title: String,
|
|
/**
|
|
* @description Styles numeric values
|
|
*/
|
|
valueStyle: {
|
|
type: definePropType<StyleValue>([String, Object, Array]),
|
|
},
|
|
} as const)
|
|
export type StatisticProps = ExtractPropTypes<typeof statisticProps>
|
|
|
|
export type StatisticInstance = InstanceType<typeof Statistic> & unknown
|