# Statistic 数据统计
新增了<ep-statistic>
数据统计组件。
# 基本
Active Users
112,893
Account Balance (CNY)
112,893.00
复制代码
# 单位
Feedback
1,128
Unmerged
93 / 100
复制代码
# 卡片中使用
Feedback
11.28%
Idle
9.30%
复制代码
# 倒计时
Countdown
48:00:29
Million Seconds
48:00:29:997
Day Level
2 天 0 时 0 分 29 秒
复制代码
# API
# Statistic Attributes
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
decimalSeparator | 设置小数点 | string | . |
formatter | 自定义数值展示 | slot | ({h, value}) => VNode | - |
groupSeparator | 设置千分位标识符 | string | , |
precision | 数值精度 | number | - |
prefix | 设置数值的前缀 | string | slot | - |
suffix | 设置数值的后缀 | string | slot | - |
title | 设置数值的前缀 | string | slot | - |
value | 数值内容 | string | number | - |
valueStyle | 设置数值的样式 | style | - |
# StatisticCountdown Attributes
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
format | 格式化倒计时展示,参考 moment | string | 'HH:mm:ss' |
prefix | 设置数值的前缀 | string | slot | - |
suffix | 设置数值的后缀 | string | slot | - |
title | 数值的标题 | string | slot | - |
value | 数值内容 | string | number | - |
valueStyle | 设置数值的样式 | style | - |
# StatisticCountdown Events
|ep-statistic-countdown Events
事件名称 | 说明 | 回调参数 |
---|---|---|
finish | 倒计时完成时触发 | () => void |