From daf1349af0f593f87a7f295558244dade15a2082 Mon Sep 17 00:00:00 2001 From: Limbo <49612796+JUST-Limbo@users.noreply.github.com> Date: Sun, 12 Feb 2023 18:43:32 +0800 Subject: [PATCH] Docs:[Statistic] update docs and fix bugs (#22383) --- examples/docs/en-US/statistic.md | 312 +++++++++++++++--------------- examples/docs/es/statistic.md | 311 +++++++++++++++--------------- examples/docs/fr-FR/statistic.md | 312 +++++++++++++++--------------- examples/docs/zh-CN/statistic.md | 315 +++++++++++++++---------------- 4 files changed, 599 insertions(+), 651 deletions(-) diff --git a/examples/docs/en-US/statistic.md b/examples/docs/en-US/statistic.md index d4072a124..1d25019a2 100644 --- a/examples/docs/en-US/statistic.md +++ b/examples/docs/en-US/statistic.md @@ -1,85 +1,82 @@ -## Statistic +## Statistic Used to highlight a certain number or group of numbers, such as showing a numerical value, such as a dollar amount, ranking, etc. Countdown mode - ### Basic usage + The component provides a thousandth place display, but you can use rate to set the 10,000th place, and so on :::demo ```html - ``` + ::: - ### 倒计时 + :::warning Suspend is tentative, it ** just pauses the countdown, not the time, because value points to a future time node ** @@ -88,129 +85,120 @@ If you need to add time to the original, please note that the overall time (the :::demo Providing a future time via 'value' will enable the countdown function ```html - ``` ::: - - - ### Statistic Attributes -| Attribute | Description | Type | Accepted Values | Default | -|------------- |---------------- |---------------- |---------------------- |-------- | -| value | Numerical content | string \| number | - | - | -| decimal-separator | Setting the decimal point | string | - | . | -| formatter | Custom numerical presentation| v-slot \|({value}) => VNode | - | - | -| group-separator | Sets the thousandth identifier | string | - | , | -| precision | numerical precision | number | - | 0 | -| prefix | Sets the prefix of a number | string \| v-slot | - | - | -| suffix |Sets the suffix of a number | string \| v-slot | - | - | -| title | Numeric titles | string \| v-slot | - | - | -| value-style | Styles numeric values | style | - | - | -| rate | Set the ratio | number | - | 1000 | - +| Attribute | Description | Type | Accepted Values | Default | +| ----------------- | ------------------------------ | --------------------------- | --------------- | ------- | +| value | Numerical content | string \| number | - | - | +| decimal-separator | Setting the decimal point | string | - | . | +| formatter | Custom numerical presentation | v-slot \|({value}) => VNode | - | - | +| group-separator | Sets the thousandth identifier | string | - | , | +| precision | numerical precision | number | - | 0 | +| prefix | Sets the prefix of a number | string \| v-slot | - | - | +| suffix | Sets the suffix of a number | string \| v-slot | - | - | +| title | Numeric titles | string \| v-slot | - | - | +| value-style | Styles numeric values | style | - | - | +| rate | Set the ratio | number | - | 1000 | ### Statistic Slots -| Name | Description | -|------|--------| -| prefix | Numeric prefix | -| suffix | Suffixes for numeric values | -| formatter | Numerical content | -| title | Numeric titles | +| Name | Description | +| --------- | --------------------------- | +| prefix | Numeric prefix | +| suffix | Suffixes for numeric values | +| formatter | Numerical content | +| title | Numeric titles | -### Statistic.Countdown Attributes +### Statistic.Countdown Attributes + +| Attribute | Description | Type | Options | Default | +| ------------ | ---------------------------------------- | ------- | ----------- | ---------- | +| time-indices | Whether to enable the countdown function | boolean | true\|false | false | +| value | Required value, enter the bound value | string | — | — | +| format | Formatting the countdown display | string | — | 'HH:mm:ss' | -| Attribute | Description | Type | Options | Default | -|------------- |---------------- |---------------- |---------------------- |-------- | -| time-indices | Whether to enable the countdown function | boolean | true\|false | false | -| value | Required value, enter the bound value | string | — | — | -| format | Formatting the countdown display | string | — | 'HH:mm:ss' | ### Statistic.Countdown Events -| Method | Description | Parameters | -|---------|--------|---------| -| change | Enable in the 'countdown' function | (value: Date) | + +| Method | Description | Parameters | +| ------ | ------------------------------------------ | ---------------- | +| change | Enable in the 'countdown' function | (value: Date) | | finish | Launched after the 'countdown' is complete | (value: boolean) | ### Statistic Methods -| Method | Description | Parameters |CallBack| -| ---- | ---- | ---- |---- | -| suspend | Pause the countdown|(value:boolean) |(value: Date) | - +| Method | Description | Parameters | CallBack | +| ------- | ------------------- | --------------- | ------------- | +| suspend | Pause the countdown | (value:boolean) | (value: Date) | diff --git a/examples/docs/es/statistic.md b/examples/docs/es/statistic.md index ed8405daf..07be86f99 100644 --- a/examples/docs/es/statistic.md +++ b/examples/docs/es/statistic.md @@ -1,85 +1,81 @@ -## Statistic +## Statistic Used to highlight a certain number or group of numbers, such as showing a numerical value, such as a dollar amount, ranking, etc. Countdown mode - ### Basic usage + The component provides a thousandth place display, but you can use rate to set the 10,000th place, and so on :::demo ```html - ``` ::: - ### 倒计时 + :::warning Suspend is tentative, it ** just pauses the countdown, not the time, because value points to a future time node ** @@ -88,129 +84,120 @@ If you need to add time to the original, please note that the overall time (the :::demo Providing a future time via 'value' will enable the countdown function ```html - ``` ::: - - - ### Statistic Attributes -| Attribute | Description | Type | Accepted Values | Default | -|------------- |---------------- |---------------- |---------------------- |-------- | -| value | Numerical content | string \| number | - | - | -| decimal-separator | Setting the decimal point | string | - | . | -| formatter | Custom numerical presentation| v-slot \|({value}) => VNode | - | - | -| group-separator | Sets the thousandth identifier | string | - | , | -| precision | numerical precision | number | - | 0 | -| prefix | Sets the prefix of a number | string \| v-slot | - | - | -| suffix |Sets the suffix of a number | string \| v-slot | - | - | -| title | Numeric titles | string \| v-slot | - | - | -| value-style | Styles numeric values | style | - | - | -| rate | Set the ratio | number | - | 1000 | - +| Attribute | Description | Type | Accepted Values | Default | +| ----------------- | ------------------------------ | --------------------------- | --------------- | ------- | +| value | Numerical content | string \| number | - | - | +| decimal-separator | Setting the decimal point | string | - | . | +| formatter | Custom numerical presentation | v-slot \|({value}) => VNode | - | - | +| group-separator | Sets the thousandth identifier | string | - | , | +| precision | numerical precision | number | - | 0 | +| prefix | Sets the prefix of a number | string \| v-slot | - | - | +| suffix | Sets the suffix of a number | string \| v-slot | - | - | +| title | Numeric titles | string \| v-slot | - | - | +| value-style | Styles numeric values | style | - | - | +| rate | Set the ratio | number | - | 1000 | ### Statistic Slots -| Name | Description | -|------|--------| -| prefix | Numeric prefix | -| suffix | Suffixes for numeric values | -| formatter | Numerical content | -| title | Numeric titles | +| Name | Description | +| --------- | --------------------------- | +| prefix | Numeric prefix | +| suffix | Suffixes for numeric values | +| formatter | Numerical content | +| title | Numeric titles | -### Statistic.Countdown Attributes +### Statistic.Countdown Attributes + +| Attribute | Description | Type | Options | Default | +| ------------ | ---------------------------------------- | ------- | ----------- | ---------- | +| time-indices | Whether to enable the countdown function | boolean | true\|false | false | +| value | Required value, enter the bound value | string | — | — | +| format | Formatting the countdown display | string | — | 'HH:mm:ss' | -| Attribute | Description | Type | Options | Default | -|------------- |---------------- |---------------- |---------------------- |-------- | -| time-indices | Whether to enable the countdown function | boolean | true\|false | false | -| value | Required value, enter the bound value | string | — | — | -| format | Formatting the countdown display | string | — | 'HH:mm:ss' | ### Statistic.Countdown Events -| Method | Description | Parameters | -|---------|--------|---------| -| change | Enable in the 'countdown' function | (value: Date) | + +| Method | Description | Parameters | +| ------ | ------------------------------------------ | ---------------- | +| change | Enable in the 'countdown' function | (value: Date) | | finish | Launched after the 'countdown' is complete | (value: boolean) | ### Statistic Methods -| Method | Description | Parameters |CallBack| -| ---- | ---- | ---- |---- | -| suspend | Pause the countdown|(value:boolean) |(value: Date) | - +| Method | Description | Parameters | CallBack | +| ------- | ------------------- | --------------- | ------------- | +| suspend | Pause the countdown | (value:boolean) | (value: Date) | diff --git a/examples/docs/fr-FR/statistic.md b/examples/docs/fr-FR/statistic.md index d4072a124..1d25019a2 100644 --- a/examples/docs/fr-FR/statistic.md +++ b/examples/docs/fr-FR/statistic.md @@ -1,85 +1,82 @@ -## Statistic +## Statistic Used to highlight a certain number or group of numbers, such as showing a numerical value, such as a dollar amount, ranking, etc. Countdown mode - ### Basic usage + The component provides a thousandth place display, but you can use rate to set the 10,000th place, and so on :::demo ```html - ``` + ::: - ### 倒计时 + :::warning Suspend is tentative, it ** just pauses the countdown, not the time, because value points to a future time node ** @@ -88,129 +85,120 @@ If you need to add time to the original, please note that the overall time (the :::demo Providing a future time via 'value' will enable the countdown function ```html - ``` ::: - - - ### Statistic Attributes -| Attribute | Description | Type | Accepted Values | Default | -|------------- |---------------- |---------------- |---------------------- |-------- | -| value | Numerical content | string \| number | - | - | -| decimal-separator | Setting the decimal point | string | - | . | -| formatter | Custom numerical presentation| v-slot \|({value}) => VNode | - | - | -| group-separator | Sets the thousandth identifier | string | - | , | -| precision | numerical precision | number | - | 0 | -| prefix | Sets the prefix of a number | string \| v-slot | - | - | -| suffix |Sets the suffix of a number | string \| v-slot | - | - | -| title | Numeric titles | string \| v-slot | - | - | -| value-style | Styles numeric values | style | - | - | -| rate | Set the ratio | number | - | 1000 | - +| Attribute | Description | Type | Accepted Values | Default | +| ----------------- | ------------------------------ | --------------------------- | --------------- | ------- | +| value | Numerical content | string \| number | - | - | +| decimal-separator | Setting the decimal point | string | - | . | +| formatter | Custom numerical presentation | v-slot \|({value}) => VNode | - | - | +| group-separator | Sets the thousandth identifier | string | - | , | +| precision | numerical precision | number | - | 0 | +| prefix | Sets the prefix of a number | string \| v-slot | - | - | +| suffix | Sets the suffix of a number | string \| v-slot | - | - | +| title | Numeric titles | string \| v-slot | - | - | +| value-style | Styles numeric values | style | - | - | +| rate | Set the ratio | number | - | 1000 | ### Statistic Slots -| Name | Description | -|------|--------| -| prefix | Numeric prefix | -| suffix | Suffixes for numeric values | -| formatter | Numerical content | -| title | Numeric titles | +| Name | Description | +| --------- | --------------------------- | +| prefix | Numeric prefix | +| suffix | Suffixes for numeric values | +| formatter | Numerical content | +| title | Numeric titles | -### Statistic.Countdown Attributes +### Statistic.Countdown Attributes + +| Attribute | Description | Type | Options | Default | +| ------------ | ---------------------------------------- | ------- | ----------- | ---------- | +| time-indices | Whether to enable the countdown function | boolean | true\|false | false | +| value | Required value, enter the bound value | string | — | — | +| format | Formatting the countdown display | string | — | 'HH:mm:ss' | -| Attribute | Description | Type | Options | Default | -|------------- |---------------- |---------------- |---------------------- |-------- | -| time-indices | Whether to enable the countdown function | boolean | true\|false | false | -| value | Required value, enter the bound value | string | — | — | -| format | Formatting the countdown display | string | — | 'HH:mm:ss' | ### Statistic.Countdown Events -| Method | Description | Parameters | -|---------|--------|---------| -| change | Enable in the 'countdown' function | (value: Date) | + +| Method | Description | Parameters | +| ------ | ------------------------------------------ | ---------------- | +| change | Enable in the 'countdown' function | (value: Date) | | finish | Launched after the 'countdown' is complete | (value: boolean) | ### Statistic Methods -| Method | Description | Parameters |CallBack| -| ---- | ---- | ---- |---- | -| suspend | Pause the countdown|(value:boolean) |(value: Date) | - +| Method | Description | Parameters | CallBack | +| ------- | ------------------- | --------------- | ------------- | +| suspend | Pause the countdown | (value:boolean) | (value: Date) | diff --git a/examples/docs/zh-CN/statistic.md b/examples/docs/zh-CN/statistic.md index 308e3d3f8..b1feb0c49 100644 --- a/examples/docs/zh-CN/statistic.md +++ b/examples/docs/zh-CN/statistic.md @@ -1,216 +1,201 @@ -## Statistic 统计数值 +## Statistic 统计数值 用于突出某个或某组数字时,如显示数值,如金额,排名等。 倒计时模式 +### 基础用法 -### 基础用法 - 组件提供千分位的展示,不过可以通过rate来设置相应万分位等 +组件提供千分位的展示,不过可以通过 rate 来设置相应万分位等 :::demo ```html - ``` ::: - ### 倒计时 + :::warning 如果需要在原基础上添加时间,请注意:整体的时间(添加的时间量和原定时间)必须是**未来**的时间节点,否则依旧是倒计时结束 ::: :::demo 通过 `value` 提供未来的时间,将开启倒计时功能 ```html - ``` ::: - - - ### Statistic Attributes -| 参数 | 说明 | 类型 | 可选值 | 默认值 | -|------------- |---------------- |---------------- |---------------------- |-------- | -| value | 数值内容 | string \| number |— | — | -| decimal-separator | 设置小数点 | string | — | . | -| formatter | 自定义数值展示| v-slot \|({value}) => VNode |— | — | -| group-separator | 设置千分位标识符 | string | — | , | -| precision | 数值精度 | number | — | 0 | -| prefix | 设置数值的前缀 | string \| v-slot | — | — | -| suffix |设置数值的后缀 | string \| v-slot | — | — | -| title | 数值的标题 | string \| v-slot | — | — | -| value-style | 设置数值的样式 | object | — | — | -| rate | 设置倍率 | number | — | 1000 | - +| 参数 | 说明 | 类型 | 可选值 | 默认值 | +| ----------------- | ---------------- | --------------------------- | ------ | ------ | +| value | 数值内容 | string \| number | — | — | +| decimal-separator | 设置小数点 | string | — | . | +| formatter | 自定义数值展示 | v-slot \|({value}) => VNode | — | — | +| group-separator | 设置千分位标识符 | string | — | , | +| precision | 数值精度 | number | — | 0 | +| prefix | 设置数值的前缀 | string \| v-slot | — | — | +| suffix | 设置数值的后缀 | string \| v-slot | — | — | +| title | 数值的标题 | string \| v-slot | — | — | +| value-style | 设置数值的样式 | object | — | — | +| rate | 设置倍率 | number | — | 1000 | ### Statistic Slots -| name | 说明 | -|------|--------| -| prefix | 数值的前缀 | -| suffix | 数值的后缀 | -| formatter | 数值内容 | -| title | 数值的标题 | +| name | 说明 | +| --------- | ---------- | +| prefix | 数值的前缀 | +| suffix | 数值的后缀 | +| formatter | 数值内容 | +| title | 数值的标题 | -### Statistic.Countdown Attributes +### Statistic.Countdown Attributes + +| 参数 | 说明 | 类型 | 可选值 | 默认值 | +| ------------ | ------------------ | ------- | ----------- | ---------- | +| time-indices | 是否开启倒计时功能 | boolean | true\|false | false | +| value | 必填值,输入绑定值 | string | — | — | +| format | 格式化倒计时展示 | string | — | 'HH:mm:ss' | -| 参数 | 说明 | 类型 | 可选值 | 默认值 | -|------------- |---------------- |---------------- |---------------------- |-------- | -| time-indices | 是否开启倒计时功能 | boolean | true\|false | false | -| value | 必填值,输入绑定值 | string | — | — | -| format | 格式化倒计时展示 | string | — | 'HH:mm:ss' | ### Statistic.Countdown Events -| 事件名称 | 说明 | 回调参数 | -|---------|--------|---------| -| change | 在`倒计时`的功能中开启 | (value: Date) | -| finish | 在`倒计时` 完成后启动 | (value: boolean) | + +| 事件名称 | 说明 | 回调参数 | +| -------- | ---------------------- | ---------------- | +| change | 在`倒计时`的功能中开启 | (value: Date) | +| finish | 在`倒计时` 完成后启动 | (value: boolean) | ### Statistic Methods -| 方法名 | 说明 | 参数 |回调参数| -| ---- | ---- | ---- |---- | -| suspend | 暂停倒计时|(value:boolean) |(value: Date) | - +| 方法名 | 说明 | 参数 | 回调参数 | +| ------- | ---------- | --------------- | ------------- | +| suspend | 暂停倒计时 | (value:boolean) | (value: Date) |