docs: fix statistic demo
parent
15c645fea1
commit
f5471713f2
|
@ -10,23 +10,41 @@ Display statistic data in Card.
|
|||
|
||||
```html
|
||||
<template>
|
||||
<div>
|
||||
<a-card style="padding: 30px">
|
||||
<a-statistic
|
||||
title="Feedback"
|
||||
:value="1128"
|
||||
style="margin-right: 50px"
|
||||
>
|
||||
<a-icon slot="prefix" type="like" />
|
||||
</a-statistic>
|
||||
<a-statistic
|
||||
title="Unmerged"
|
||||
:value="1234567890"
|
||||
valueClass="demo-class"
|
||||
>
|
||||
<span slot="suffix"> / 100</span>
|
||||
</a-statistic>
|
||||
</a-card>
|
||||
<div style="background: #ECECEC; padding: 30px">
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-card>
|
||||
<a-statistic
|
||||
title="Feedback"
|
||||
:value="11.28"
|
||||
:precision="2"
|
||||
suffix="%"
|
||||
:valueStyle="{color: '#3f8600'}"
|
||||
style="margin-right: 50px"
|
||||
>
|
||||
<template v-slot:prefix>
|
||||
<a-icon type="arrow-up" />
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-card>
|
||||
<a-statistic
|
||||
title="Idle"
|
||||
:value="9.3"
|
||||
:precision="2"
|
||||
suffix="%"
|
||||
valueClass="demo-class"
|
||||
:valueStyle="{ color: '#cf1322' }"
|
||||
>
|
||||
<template v-slot:prefix>
|
||||
<a-icon type="arrow-down" />
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</template>
|
||||
```
|
||||
|
|
|
@ -10,19 +10,31 @@ Countdown component.
|
|||
|
||||
```html
|
||||
<template>
|
||||
<div>
|
||||
<a-statistic-countdown
|
||||
title="Countdown"
|
||||
:value="deadline"
|
||||
@finish="onFinish"
|
||||
style="margin-right: 50px"
|
||||
/>
|
||||
<a-statistic-countdown
|
||||
title="Million Seconds"
|
||||
:value="deadline"
|
||||
format="HH:mm:ss:SSS"
|
||||
/>
|
||||
</div>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-statistic-countdown
|
||||
title="Countdown"
|
||||
:value="deadline"
|
||||
@finish="onFinish"
|
||||
style="margin-right: 50px"
|
||||
/>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-statistic-countdown
|
||||
title="Million Seconds"
|
||||
:value="deadline"
|
||||
format="HH:mm:ss:SSS"
|
||||
style="margin-right: 50px"
|
||||
/>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 32px;">
|
||||
<a-statistic-countdown
|
||||
title="Day Level"
|
||||
:value="deadline"
|
||||
format="D 天 H 时 m 分 s 秒"
|
||||
/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
@ -38,4 +50,4 @@ export default {
|
|||
},
|
||||
}
|
||||
</script>
|
||||
```
|
||||
```
|
||||
|
|
|
@ -10,24 +10,29 @@ Add unit through `prefix` and `suffix`.
|
|||
|
||||
```html
|
||||
<template>
|
||||
<div>
|
||||
<a-statistic
|
||||
title="Feedback"
|
||||
:value="11.28"
|
||||
:precision="2"
|
||||
suffix="%"
|
||||
:valueStyle="{color: '#3f8600'}"
|
||||
style="margin-right: 50px"
|
||||
>
|
||||
<a-icon slot="prefix" type="arrow-up" />
|
||||
</a-statistic>
|
||||
<a-statistic
|
||||
title="Unmerged"
|
||||
:value="78"
|
||||
valueClass="demo-class"
|
||||
>
|
||||
<span slot="suffix"> / 100</span>
|
||||
</a-statistic>
|
||||
</div>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-statistic
|
||||
title="Feedback"
|
||||
:value="1128"
|
||||
style="margin-right: 50px"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<a-icon type="like" />
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-statistic
|
||||
title="Unmerged"
|
||||
:value="93"
|
||||
valueClass="demo-class"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<span> / 100</span>
|
||||
</template>
|
||||
</a-statistic>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
```
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| decimalSeparator | decimal separator | string | . |
|
||||
| formatter | customize value display logic | (h) => VNode | - |
|
||||
| formatter | customize value display logic | v-slot \|(h) => VNode | - |
|
||||
| groupSeparator | group separator | string | , |
|
||||
| precision | precision of input value | number | - |
|
||||
| prefix | prefix node of value | string \| VNode | - |
|
||||
| suffix | suffix node of value | string \| VNode | - |
|
||||
| title | Display title | string \| VNode | - |
|
||||
| prefix | prefix node of value | string \| v-slot | - |
|
||||
| suffix | suffix node of value | string \| v-slot | - |
|
||||
| title | Display title | string \| v-slot | - |
|
||||
| value | Display value | string \| number | - |
|
||||
|
||||
|
||||
|
@ -19,9 +19,9 @@
|
|||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| format | Format as [moment](http://momentjs.com/) | string | 'HH:mm:ss' |
|
||||
| prefix | prefix node of value | string \| VNode | - |
|
||||
| suffix | suffix node of value | string \| VNode | - |
|
||||
| title | Display title | string \| VNode | - |
|
||||
| prefix | prefix node of value | string \| v-slot | - |
|
||||
| suffix | suffix node of value | string \| v-slot | - |
|
||||
| title | Display title | string \| v-slot | - |
|
||||
| value | Set target countdown time | number \| moment | - |
|
||||
|
||||
#### Statistic.Countdown Events
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| decimalSeparator | 设置小数点 | string | . |
|
||||
| formatter | 自定义数值展示 | (h) => VNode | - |
|
||||
| formatter | 自定义数值展示 | v-slot \| (h) => VNode | - |
|
||||
| groupSeparator | 设置千分位标识符 | string | , |
|
||||
| precision | 数值精度 | number | - |
|
||||
| prefix | 设置数值的前缀 | string \| VNode | - |
|
||||
| suffix | 设置数值的后缀 | string \| VNode | - |
|
||||
| title | 数值的标题 | string \| VNode | - |
|
||||
| prefix | 设置数值的前缀 | string \| v-slot | - |
|
||||
| suffix | 设置数值的后缀 | string \| v-slot | - |
|
||||
| title | 数值的标题 | string \| v-slot | - |
|
||||
| value | 数值内容 | string \| number | - |
|
||||
|
||||
### Statistic.Countdown
|
||||
|
@ -18,9 +18,9 @@
|
|||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| format | 格式化倒计时展示,参考 [moment](http://momentjs.com/) | string | 'HH:mm:ss' |
|
||||
| prefix | 设置数值的前缀 | string \| VNode | - |
|
||||
| suffix | 设置数值的后缀 | string \| VNode | - |
|
||||
| title | 数值的标题 | string \| VNode | - |
|
||||
| prefix | 设置数值的前缀 | string \| v-slot | - |
|
||||
| suffix | 设置数值的后缀 | string \| v-slot | - |
|
||||
| title | 数值的标题 | string \| v-slot | - |
|
||||
| value | 数值内容 | number \| moment | - |
|
||||
|
||||
#### Statistic.Countdown事件
|
||||
|
|
Loading…
Reference in New Issue