Merge branch 'ElemeFE:dev' into fix_date-picker_0923

pull/22171/head
Due07 2023-03-17 16:47:43 +08:00 committed by GitHub
commit 66666d53cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
51 changed files with 24101 additions and 432 deletions

View File

@ -1,5 +1,6 @@
src/utils/popper.js
src/utils/date.js
src/utils/lodash.js
examples/play
*.sh
node_modules

1
.gitignore vendored
View File

@ -22,3 +22,4 @@ coverage
waiter.config.js
build/bin/algolia-key.js
.envrc
.history/

View File

@ -1,5 +1,60 @@
## Changelog
### 2.15.13
*2023-02-12*
#### Bug fixes
- Docs
- Fix Statistic docs (#22383 by @JUST-Limbo)
- Fix Input docs (#22093 by @lm312)
- Fix en-US docs (#22268 #22269 #22270 by @Hazel-Lin)
- Fix Pagination docs (#22288 by @xujintai123)
- Fix: Links docs (#22370 by @itmier)
- Statistics
- fix slot display bug (#22375 by @webvs2)
- Chore
- missing web-type after publishing (#22271 by @loosheng)
#### Optimization
- InputNumber
- Fix touch one click trigger twice on the window touch pad (#22185 by @mrsai)
- Image
- Add initialIndex prop (#22346 by @inkroom)
- Statistics
- Updated countdown feature to localize lodash Closes (#22260 by @webvs2)
- Update code and doc (#22276 by @webvs2)
- Other
- fix web-types type props (#22281 by @whzxc)
### 2.15.12
*2022-11-16*
#### Bug fixes
- Statistic
- Fixed the thousandth bit bug (#22252 by @webvs2)
- Other
- Fix 2.15.11 element-theme-chalk publish fail bug
### 2.15.11
*2022-11-15*
#### Bug fixes
- Docs
- Fix Radio docs (#22178 by @bchen1029)
- Fix Progress docs
#### Optimization
- I18n
- Update translation of Malaysian (#22185 by @z4q)
- Update translation of Norwegian (#22145 by @Barsnes)
- Progress
- Add defineBackColor and textColor prop (#22089 by @lm312)
- Statistics
- Add new component Statistics (#22159 by @webvs2)
- Other
- Add Web Types to improve code assistance in WebStorm IDE and other JetBrains IDEs (#22135 by @piotrtomiak)
### 2.15.10
*2022-09-13*

View File

@ -1,5 +1,60 @@
## Changelog
### 2.15.13
*2023-02-12*
#### Bug fixes
- Docs
- Fix Statistic docs (#22383 by @JUST-Limbo)
- Fix Input docs (#22093 by @lm312)
- Fix en-US docs (#22268 #22269 #22270 by @Hazel-Lin)
- Fix Pagination docs (#22288 by @xujintai123)
- Fix: Links docs (#22370 by @itmier)
- Statistics
- fix slot display bug (#22375 by @webvs2)
- Chore
- missing web-type after publishing (#22271 by @loosheng)
#### Optimization
- InputNumber
- Fix touch one click trigger twice on the window touch pad (#22185 by @mrsai)
- Image
- Add initialIndex prop (#22346 by @inkroom)
- Statistics
- Updated countdown feature to localize lodash Closes (#22260 by @webvs2)
- Update code and doc (#22276 by @webvs2)
- Other
- fix web-types type props (#22281 by @whzxc)
### 2.15.12
*2022-11-16*
#### Bug fixes
- Statistic
- Fixed the thousandth bit bug (#22252 by @webvs2)
- Other
- Fix 2.15.11 element-theme-chalk publish fail bug
### 2.15.11
*2022-11-15*
#### Bug fixes
- Docs
- Fix Radio docs (#22178 by @bchen1029)
- Fix Progress docs
#### Optimization
- I18n
- Update translation of Malaysian (#22185 by @z4q)
- Update translation of Norwegian (#22145 by @Barsnes)
- Progress
- Add defineBackColor and textColor prop (#22089 by @lm312)
- Statistics
- Add new component Statistics (#22159 by @webvs2)
- Other
- Add Web Types to improve code assistance in WebStorm IDE and other JetBrains IDEs (#22135 by @piotrtomiak)
### 2.15.10
*2022-09-13*

View File

@ -1,5 +1,60 @@
## Changelog
### 2.15.13
*2023-02-12*
#### Bug fixes
- Docs
- Fix Statistic docs (#22383 by @JUST-Limbo)
- Fix Input docs (#22093 by @lm312)
- Fix en-US docs (#22268 #22269 #22270 by @Hazel-Lin)
- Fix Pagination docs (#22288 by @xujintai123)
- Fix: Links docs (#22370 by @itmier)
- Statistics
- fix slot display bug (#22375 by @webvs2)
- Chore
- missing web-type after publishing (#22271 by @loosheng)
#### Optimization
- InputNumber
- Fix touch one click trigger twice on the window touch pad (#22185 by @mrsai)
- Image
- Add initialIndex prop (#22346 by @inkroom)
- Statistics
- Updated countdown feature to localize lodash Closes (#22260 by @webvs2)
- Update code and doc (#22276 by @webvs2)
- Other
- fix web-types type props (#22281 by @whzxc)
### 2.15.12
*2022-11-16*
#### Bug fixes
- Statistic
- Fixed the thousandth bit bug (#22252 by @webvs2)
- Other
- Fix 2.15.11 element-theme-chalk publish fail bug
### 2.15.11
*2022-11-15*
#### Bug fixes
- Docs
- Fix Radio docs (#22178 by @bchen1029)
- Fix Progress docs
#### Optimization
- I18n
- Update translation of Malaysian (#22185 by @z4q)
- Update translation of Norwegian (#22145 by @Barsnes)
- Progress
- Add defineBackColor and textColor prop (#22089 by @lm312)
- Statistics
- Add new component Statistics (#22159 by @webvs2)
- Other
- Add Web Types to improve code assistance in WebStorm IDE and other JetBrains IDEs (#22135 by @piotrtomiak)
### 2.15.10
*2022-09-13*

View File

@ -1,5 +1,60 @@
## 更新日志
### 2.15.13
*2023-02-12*
#### Bug 修复
- Docs
- 修复 Statistic 文案 (#22383 by @JUST-Limbo)
- 修复 Input 文案 (#22093 by @lm312)
- 修复 en-US 文案 (#22268 #22269 #22270 by @Hazel-Lin)
- 修复 Pagination 文案 (#22288 by @xujintai123)
- 修复 Links 文案 (#22370 by @itmier)
- Statistics
- 修复 slot 显示问题 (#22375 by @webvs2)
- Chore
- 修复 web-type 文件丢失问题 (#22271 by @loosheng)
#### 优化
- InputNumber
- windows触摸屏响应优化 (#22185 by @mrsai)
- Image
- 新增 initialIndex 属性 (#22346 by @inkroom)
- Statistics
- countdown 特性更新 (#22260 by @webvs2)
- 代码优化及doc更新 (#22276 by @webvs2)
- 其他
- web-type代码优化 (#22281 by @whzxc)
### 2.15.12
*2022-11-16*
#### Bug 修复
- Statistics
- 修改 千分位 问题 (#22252 by @webvs2)
- 其他
- 修复 2.15.11版本element-theme-chalk未成功发布 问题
### 2.15.11
*2022-11-15*
#### Bug 修复
- Docs
- 修复 Radio 文案 (#22178 by @bchen1029)
- 修复 Progress 文案
#### 优化
- I18n
- 更新 马来西亚语 翻译 (#22185 by @z4q)
- 更新 挪威语 翻译 (#22145 by @Barsnes)
- Progress
- 新增 defineBackColor 和 textColor 属性 (#22089 by @lm312)
- Statistics
- 新增组件 Statistics (#22159 by @webvs2)
- Other
- 改进WebStorm IDE和其他JetBrains IDE中的代码帮助 (#22135 by @piotrtomiak)
### 2.15.10
*2022-09-13*

View File

@ -40,12 +40,12 @@
Element will stay with Vue 2.x
For Vue 3.0, we recommend using [Element Plus](https://github.com/element-plus/element-plus) from the same team (Element Plus is a community develop project)
For Vue 3.0, we recommend using [Element Plus](https://github.com/element-plus/element-plus)(Element Plus is a community develop project)
## Links
- Homepage and documentation
- [International users](http://element.eleme.io/#/en-US)
- [Chinese users](http://element-cn.eleme.io/#/zh-CN)
- [Chinese users](http://element.eleme.io/#/zh-CN)
- [Spanish users](http://element.eleme.io/#/es)
- [French users](http://element.eleme.io/#/fr-FR)
- [awesome-element](https://github.com/ElementUI/awesome-element)

View File

@ -46,4 +46,4 @@ exports.vue = {
amd: 'vue'
};
exports.jsexclude = /node_modules|utils\/popper\.js|utils\/date\.js/;
exports.jsexclude = /node_modules|utils\/popper\.js|utils\/date\.js|utils\/lodash\.js/;

View File

@ -80,6 +80,7 @@
"cascader-panel": "./packages/cascader-panel/index.js",
"avatar": "./packages/avatar/index.js",
"drawer": "./packages/drawer/index.js",
"statistic": "./packages/statistic/index.js",
"popconfirm": "./packages/popconfirm/index.js",
"skeleton": "./packages/skeleton/index.js",
"skeleton-item": "./packages/skeleton-item/index.js",

View File

@ -57,7 +57,7 @@ Display date.
|-----------------|------------------- |---------- |---------------------- |--------- |
| value / v-model | binding value | Date/string/number | — | — |
| range | time range, including start time and end time. Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months. | Array | — | — |
| first-day-of-week | fisrt day of week| Number | 1 to 7 | 1 |
| first-day-of-week | first day of week| Number | 1 to 7 | 1 |
### dateCell Scoped Slot Parameters
| Attribute | Description | Type | Accepted Values | Default |

View File

@ -210,7 +210,7 @@ DateTimePicker is derived from DatePicker and TimePicker. For a more detailed ex
| default-time | the default time value after picking a date | non-range: string / range: string[] | non-range: a string like `12:00:00`, range: array of two strings, and the first item is for the start date and second for the end date. `00:00:00` will be used if not specified | — |
| value-format | optional, format of binding value. If not specified, the binding value will be a Date object | string | see [date formats](#/en-US/component/date-picker#date-formats) | — |
| name | same as `name` in native input | string | — | — |
| unlink-panels | unllink two date-panels in range-picker | boolean | — | false |
| unlink-panels | unlink two date-panels in range-picker | boolean | — | false |
| prefix-icon | Custom prefix icon class | string | — | el-icon-date |
| clear-icon | Custom clear icon class | string | — | el-icon-circle-close |

View File

@ -520,7 +520,7 @@ When an `el-form-item` is nested in another `el-form-item`, its label width will
All components in a Form inherit their `size` attribute from that Form. Similarly, FormItem also has a `size` attribute.
:::demo Still you can fine tune each component's `size` if you don't want that component to inherit its size from From or FormIten.
:::demo Still you can fine tune each component's `size` if you don't want that component to inherit its size from From or FormItem.
```html
<el-form ref="form" :model="sizeForm" label-width="120px" size="mini">
<el-form-item label="Activity name">

View File

@ -147,6 +147,7 @@ Besides the native features of img, support lazy load, custom placeholder and lo
| scroll-container | The container to add scroll listener when using lazy load | string / HTMLElement | — | The nearest parent container whose overflow property is auto or scroll |
| preview-src-list | allow big image preview | Array | — | - |
| z-index | set image preview z-index | Number | — | 2000 |
| initial-index | set image preview array index | Number | — | - |
### Events
| Event Name | Description | Parameters |

View File

@ -171,4 +171,6 @@ You also can specify `type` attribute to `dashboard` to use dashboard progress b
| width | the canvas width of circle progress bar | number | — | 126 |
| show-text | whether to show percentage | boolean | — | true |
| stroke-linecap | circle/dashboard type shape at the end path | string | butt/round/square | round |
| format | custom text format | function(percentage) | — | — |
| format | custom text format | function(percentage) | — | — |
| define-back-color | background color of progress bar (hex format) | string | — | — |
| text-color | text color of progress bar (hex format) | string | — | — |

View File

@ -0,0 +1,204 @@
## 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
<template>
<div>
<el-row :gutter="20">
<el-col :span="6">
<div>
<el-statistic group-separator="," :precision="2" :value="value2" :title="title"></el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic title="Gender Distribution">
<template slot="formatter"> 456/2 </template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic group-separator="," :precision="2" decimal-separator="." :value="value1" :title="title">
<template slot="prefix">
<i class="el-icon-s-flag" style="color: red"></i>
</template>
<template slot="suffix">
<i class="el-icon-s-flag" style="color: blue"></i>
</template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic :value="like ? 521 : 520" title="Feedback">
<template slot="suffix">
<span @click="like = !like" class="like">
<i class="el-icon-star-on" style="color:red" v-show="!!like"></i>
<i class="el-icon-star-off" v-show="!like"></i>
</span>
</template>
</el-statistic>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
like: true,
value1: 4154.564,
value2: 2222,
title: 'Growth this year',
};
},
};
</script>
<style lang="scss">
.like {
cursor: pointer;
font-size: 25px;
display: inline-block;
}
</style>
```
:::
### 倒计时
:::warning
Suspend is tentative, it ** just pauses the countdown, not the time, because value points to a future time node **
If you need to add time to the original, please note that the overall time (the amount of time added and the original time) must be a ** future ** time node, otherwise it is still the end of the countdown
:::
:::demo Providing a future time via 'value' will enable the countdown function
```html
<template>
<div>
<el-row :gutter="20">
<el-col :span="14">
<div style="width: 100%; display: inline-block; ">
<el-statistic :value="deadline2" time-indices title="商品降价">
<template slot="suffix"> The rush is about to begin </template>
</el-statistic>
</div>
<div style="width: 100%; display: inline-block; margin-top: 50px; ">
<el-statistic @finish="hilarity" :value="deadline3" time-indices title="The Value of Time">
<template slot="suffix">
<el-button type="primary " size="small" @click="add">add 10 second</el-button>
</template>
</el-statistic>
</div>
</el-col>
<el-col :span="10">
<el-card shadow="hover" style="width: 100%;">
<div slot="header" class="clearfix">
<span>文嘉《明日歌》</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="clickFn">暂停</el-button>
</div>
<div style="font-size: 18px;text-align: center; ">明日复明日</div>
<div style="font-size: 18px;text-align: center;">明日何其多</div>
<div style="font-size: 18px;text-align: center;">我生待明日</div>
<div style="font-size: 18px;text-align: center;">万事成蹉跎</div>
<div style="margin-top: 40px;"></div>
<el-statistic
ref="statistic"
@finish="hilarity"
format="HH:mm:ss"
:value="deadline4"
title="Distance to Tomorrow:"
time-indices
>
</el-statistic>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
deadline2: Date.now() + 1000 * 60 * 60 * 8,
deadline3: Date.now() + 1000 * 60 * 30,
deadline4: Date.now() + (new Date().setHours(23, 59, 59) - Date.now()),
stop: true,
};
},
methods: {
hilarity() {
this.$notify({
title: 'Prompt',
message: "Time is up, do you know that an inch of gold can't buy an inch of time?",
duration: 0,
});
},
clickFn() {
this.$refs.statistic.suspend(this.stop);
this.stop = !this.stop;
},
add() {
this.deadline3 = this.deadline3 + 1000 * 10;
},
},
};
</script>
```
:::
### 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 |
### Statistic Slots
| Name | Description |
| --------- | --------------------------- |
| prefix | Numeric prefix |
| suffix | Suffixes for numeric values |
| formatter | Numerical content |
| title | Numeric titles |
### 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' |
### Statistic.Countdown Events
| 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) |

View File

@ -149,6 +149,7 @@ Además de las características nativas de img, soporte de carga perezosa, marca
| scroll-container | El contenedor para añadir el scroll listener cuando se utiliza lazy load | string / HTMLElement | — | El contenedor padre más cercano cuya propiedad de desbordamiento es auto o scroll |
| preview-src-list | permitir una vista previa grande de la imagen | Array | — | - |
| z-index | establecer el z-index de la vista previa de la imagen | Number | — | 2000 |
| initial-index | set image preview array index | Number | — | - |
### Eventos
| Nombre del evento | Descripción | Parámetros |

View File

@ -617,7 +617,6 @@ export default {
| ------ | ------------------------------------------------------------ | ------------------------- |
| blur | Se dispara cuando se pierde el foco | (event: Event) |
| focus | Se dispara cuando se obtiene el foco | (event: Event) |
| change | se activa cuando cambia el valor de entrada | (value: string \| number) |
| change | se activa solo cuando el cuadro de entrada pierde el foco o el usuario presiona Enter | (value: string \| number) |
| input | se activa cuando cambia el valor de entrada | (value: string \| number) |
| clear | se dispara cuando la entrada es borrada por el botón generado por el atributo `clearable`. | — |

View File

@ -169,4 +169,6 @@ Puede utilizar el atributo `color` para establecer el color de la barra de progr
| width | ancho del canvas que contiene la barra de progreso circula | number | — | 126 |
| show-text | mostrar porcentaje | boolean | — | true |
| stroke-linecap | circle/dashboard tipo de diseño al final del camino | string | butt/round/square | round |
| format | personalizar el formato de texto estableciendo format | function(percentage) | — | — |
| format | personalizar el formato de texto estableciendo format | function(percentage) | — | — |
| define-back-color | background color of progress bar (hex format) | string | — | — |
| text-color | text color of progress bar (hex format) | string | — | — |

View File

@ -0,0 +1,203 @@
## 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
<template>
<div>
<el-row :gutter="20">
<el-col :span="6">
<div>
<el-statistic group-separator="," :precision="2" :value="value2" :title="title"></el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic title="Gender Distribution">
<template slot="formatter"> 456/2 </template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic group-separator="," :precision="2" decimal-separator="." :value="value1" :title="title">
<template slot="prefix">
<i class="el-icon-s-flag" style="color: red"></i>
</template>
<template slot="suffix">
<i class="el-icon-s-flag" style="color: blue"></i>
</template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic :value="like ? 521 : 520" title="Feedback">
<template slot="suffix">
<span @click="like = !like" class="like">
<i class="el-icon-star-on" style="color:red" v-show="!!like"></i>
<i class="el-icon-star-off" v-show="!like"></i>
</span>
</template>
</el-statistic>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
like: true,
value1: 4154.564,
value2: 2222,
title: 'Growth this year',
};
},
};
</script>
<style lang="scss">
.like {
cursor: pointer;
font-size: 25px;
display: inline-block;
}
</style>
```
:::
### 倒计时
:::warning
Suspend is tentative, it ** just pauses the countdown, not the time, because value points to a future time node **
If you need to add time to the original, please note that the overall time (the amount of time added and the original time) must be a ** future ** time node, otherwise it is still the end of the countdown
:::
:::demo Providing a future time via 'value' will enable the countdown function
```html
<template>
<div>
<el-row :gutter="20">
<el-col :span="14">
<div style="width: 100%; display: inline-block; ">
<el-statistic :value="deadline2" time-indices title="商品降价">
<template slot="suffix"> The rush is about to begin </template>
</el-statistic>
</div>
<div style="width: 100%; display: inline-block; margin-top: 50px; ">
<el-statistic @finish="hilarity" :value="deadline3" time-indices title="The Value of Time">
<template slot="suffix">
<el-button type="primary " size="small" @click="add">add 10 second</el-button>
</template>
</el-statistic>
</div>
</el-col>
<el-col :span="10">
<el-card shadow="hover" style="width: 100%;">
<div slot="header" class="clearfix">
<span>文嘉《明日歌》</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="clickFn">暂停</el-button>
</div>
<div style="font-size: 18px;text-align: center; ">明日复明日</div>
<div style="font-size: 18px;text-align: center;">明日何其多</div>
<div style="font-size: 18px;text-align: center;">我生待明日</div>
<div style="font-size: 18px;text-align: center;">万事成蹉跎</div>
<div style="margin-top: 40px;"></div>
<el-statistic
ref="statistic"
@finish="hilarity"
format="HH:mm:ss"
:value="deadline4"
title="Distance to Tomorrow:"
time-indices
>
</el-statistic>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
deadline2: Date.now() + 1000 * 60 * 60 * 8,
deadline3: Date.now() + 1000 * 60 * 30,
deadline4: Date.now() + (new Date().setHours(23, 59, 59) - Date.now()),
stop: true,
};
},
methods: {
hilarity() {
this.$notify({
title: 'Prompt',
message: "Time is up, do you know that an inch of gold can't buy an inch of time?",
duration: 0,
});
},
clickFn() {
this.$refs.statistic.suspend(this.stop);
this.stop = !this.stop;
},
add() {
this.deadline3 = this.deadline3 + 1000 * 10;
},
},
};
</script>
```
:::
### 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 |
### Statistic Slots
| Name | Description |
| --------- | --------------------------- |
| prefix | Numeric prefix |
| suffix | Suffixes for numeric values |
| formatter | Numerical content |
| title | Numeric titles |
### 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' |
### Statistic.Countdown Events
| 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) |

View File

@ -148,6 +148,7 @@ En plus des propriétés natives de img, ce composant supporte le lazy loading,
| scroll-container | Le conteneur auquel ajouter le listener du scroll en mode lazy loading. | string / HTMLElement | — | Le conteneur parent le plus proche avec la propriété overflow à auto ou scroll. |
| preview-src-list | allow big image preview | Array | — | - |
| z-index | set image preview z-index | Number | — | 2000 |
| initial-index | set image preview array index | Number | — | - |
### Évènements
| Nom | Description | Paramètres |

View File

@ -603,7 +603,6 @@ export default {
|----| ----| ----|
| blur | Se déclenche quand Input perds le focus. | (event: Event) |
| focus | Se déclenche quand Input a le focus. | (event: Event) |
| change | Se déclenche quand la valeur change. | (value: string \ number) |
| change | Déclenché uniquement lorsque la zone de saisie perd le focus ou que l'utilisateur appuie sur Entrée. | (value: string \| number) |
| input | Déclenché lorsque la valeur d'entrée change. | (value: string \| number) |
| clear | Se déclenche quand le champ est effacé par le bouton de reset. | — |

View File

@ -172,4 +172,6 @@ Vous pouvez également spécifier l'attribut `type` de `dashboard` pour utiliser
| width | La largeur du canvas dans le cas d'une barre circulaire. | number | — | 126 |
| show-text | Si le pourcentage doit être affiché. | boolean | — | true |
| stroke-linecap | circle/dashboard type shape at the end path | string | butt/round/square | round |
| format | Vous pouvez personnaliser le format du texte en définissant le format | function(percentage) | — | — |
| format | Vous pouvez personnaliser le format du texte en définissant le format | function(percentage) | — | — |
| define-back-color | background color of progress bar (hex format) | string | — | — |
| text-color | text color of progress bar (hex format) | string | — | — |

View File

@ -0,0 +1,204 @@
## 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
<template>
<div>
<el-row :gutter="20">
<el-col :span="6">
<div>
<el-statistic group-separator="," :precision="2" :value="value2" :title="title"></el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic title="Gender Distribution">
<template slot="formatter"> 456/2 </template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic group-separator="," :precision="2" decimal-separator="." :value="value1" :title="title">
<template slot="prefix">
<i class="el-icon-s-flag" style="color: red"></i>
</template>
<template slot="suffix">
<i class="el-icon-s-flag" style="color: blue"></i>
</template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic :value="like ? 521 : 520" title="Feedback">
<template slot="suffix">
<span @click="like = !like" class="like">
<i class="el-icon-star-on" style="color:red" v-show="!!like"></i>
<i class="el-icon-star-off" v-show="!like"></i>
</span>
</template>
</el-statistic>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
like: true,
value1: 4154.564,
value2: 2222,
title: 'Growth this year',
};
},
};
</script>
<style lang="scss">
.like {
cursor: pointer;
font-size: 25px;
display: inline-block;
}
</style>
```
:::
### 倒计时
:::warning
Suspend is tentative, it ** just pauses the countdown, not the time, because value points to a future time node **
If you need to add time to the original, please note that the overall time (the amount of time added and the original time) must be a ** future ** time node, otherwise it is still the end of the countdown
:::
:::demo Providing a future time via 'value' will enable the countdown function
```html
<template>
<div>
<el-row :gutter="20">
<el-col :span="14">
<div style="width: 100%; display: inline-block; ">
<el-statistic :value="deadline2" time-indices title="商品降价">
<template slot="suffix"> The rush is about to begin </template>
</el-statistic>
</div>
<div style="width: 100%; display: inline-block; margin-top: 50px; ">
<el-statistic @finish="hilarity" :value="deadline3" time-indices title="The Value of Time">
<template slot="suffix">
<el-button type="primary " size="small" @click="add">add 10 second</el-button>
</template>
</el-statistic>
</div>
</el-col>
<el-col :span="10">
<el-card shadow="hover" style="width: 100%;">
<div slot="header" class="clearfix">
<span>文嘉《明日歌》</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="clickFn">暂停</el-button>
</div>
<div style="font-size: 18px;text-align: center; ">明日复明日</div>
<div style="font-size: 18px;text-align: center;">明日何其多</div>
<div style="font-size: 18px;text-align: center;">我生待明日</div>
<div style="font-size: 18px;text-align: center;">万事成蹉跎</div>
<div style="margin-top: 40px;"></div>
<el-statistic
ref="statistic"
@finish="hilarity"
format="HH:mm:ss"
:value="deadline4"
title="Distance to Tomorrow:"
time-indices
>
</el-statistic>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
deadline2: Date.now() + 1000 * 60 * 60 * 8,
deadline3: Date.now() + 1000 * 60 * 30,
deadline4: Date.now() + (new Date().setHours(23, 59, 59) - Date.now()),
stop: true,
};
},
methods: {
hilarity() {
this.$notify({
title: 'Prompt',
message: "Time is up, do you know that an inch of gold can't buy an inch of time?",
duration: 0,
});
},
clickFn() {
this.$refs.statistic.suspend(this.stop);
this.stop = !this.stop;
},
add() {
this.deadline3 = this.deadline3 + 1000 * 10;
},
},
};
</script>
```
:::
### 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 |
### Statistic Slots
| Name | Description |
| --------- | --------------------------- |
| prefix | Numeric prefix |
| suffix | Suffixes for numeric values |
| formatter | Numerical content |
| title | Numeric titles |
### 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' |
### Statistic.Countdown Events
| 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) |

View File

@ -147,6 +147,7 @@
| scroll-container | 开启懒加载后,监听 scroll 事件的容器 | string / HTMLElement | — | 最近一个 overflow 值为 auto 或 scroll 的父元素 |
| preview-src-list | 开启图片预览功能 | Array | — | - |
| z-index | 设置图片预览的 z-index | Number | — | 2000 |
| initial-index | 图片预览初始图片index | Number | — | - |
### Events
| 事件名称 | 说明 | 回调参数 |

View File

@ -4,7 +4,7 @@
### 基础用法
:::demo 设置`layout`,表示需要显示的内容,用逗号分隔,布局元素会依次显示。`prev`表示上一页,`next`为下一页,`pager`表示页码列表,除此以外还提供了`jumper`和`total``size`和特殊的布局符号`->``->`后的元素会靠右显示,`jumper`表示跳页元素,`total`表示总条目数,`size`用于设置每页显示的页码数量。
:::demo 设置`layout`,表示需要显示的内容,用逗号分隔,布局元素会依次显示。`prev`表示上一页,`next`为下一页,`pager`表示页码列表,除此以外还提供了`jumper`和`total``sizes`和特殊的布局符号`->``->`后的元素会靠右显示,`jumper`表示跳页元素,`total`表示总条目数,`sizes`用于设置每页显示的页码数量。
```html
<div class="block">
<span class="demonstration">页数较少时的效果</span>

View File

@ -175,4 +175,6 @@ Progress 组件可通过 `type` 属性来指定使用环形进度条,在环形
| width | 环形进度条画布宽度(只在 type 为 circle 或 dashboard 时可用) | number | | 126 |
| show-text | 是否显示进度条文字内容 | boolean | — | true |
| stroke-linecap | circle/dashboard 类型路径两端的形状 | string | butt/round/square | round |
| format | 指定进度条文字内容 | function(percentage) | — | — |
| format | 指定进度条文字内容 | function(percentage) | — | — |
| define-back-color | 指定进度条底色(支持 hex 格式) | string | — | — |
| text-color | 指定进度条字体颜色(支持 hex 格式) | string | — | — |

View File

@ -187,7 +187,7 @@
### Radio Events
| 事件名称 | 说明 | 回调参数 |
|---------- |-------- |---------- |
| change | 绑定值变化时触发的事件 | 选中的 Radio label 值 |
| input | 绑定值变化时触发的事件 | 选中的 Radio label 值 |
### Radio-group Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
@ -201,7 +201,7 @@
### Radio-group Events
| 事件名称 | 说明 | 回调参数 |
|---------- |-------- |---------- |
| change | 绑定值变化时触发的事件 | 选中的 Radio label 值 |
| input | 绑定值变化时触发的事件 | 选中的 Radio label 值 |
### Radio-button Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |

View File

@ -0,0 +1,201 @@
## Statistic 统计数值
用于突出某个或某组数字时,如显示数值,如金额,排名等。
倒计时模式
### 基础用法
组件提供千分位的展示,不过可以通过 rate 来设置相应万分位等
:::demo
```html
<template>
<div>
<el-row :gutter="20">
<el-col :span="6">
<div>
<el-statistic group-separator="," :precision="2" :value="value2" :title="title"></el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic title="男女比">
<template slot="formatter"> 456/2 </template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic group-separator="," :precision="2" decimal-separator="." :value="value1" :title="title">
<template slot="prefix">
<i class="el-icon-s-flag" style="color: red"></i>
</template>
<template slot="suffix">
<i class="el-icon-s-flag" style="color: blue"></i>
</template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic :value="like ? 521 : 520" title="Feedback">
<template slot="suffix">
<span @click="like = !like" class="like">
<i class="el-icon-star-on" style="color:red" v-show="!!like"></i>
<i class="el-icon-star-off" v-show="!like"></i>
</span>
</template>
</el-statistic>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
like: true,
value1: 4154.564,
value2: 2222,
title: '今年的增长',
};
},
};
</script>
<style lang="scss">
.like {
cursor: pointer;
font-size: 25px;
display: inline-block;
}
</style>
```
:::
### 倒计时
:::warning
如果需要在原基础上添加时间,请注意:整体的时间(添加的时间量和原定时间)必须是**未来**的时间节点,否则依旧是倒计时结束
:::
:::demo 通过 `value` 提供未来的时间,将开启倒计时功能
```html
<template>
<div>
<el-row :gutter="20">
<el-col :span="14">
<div style="width: 100%; display: inline-block; ">
<el-statistic :value="deadline2" time-indices title="商品降价">
<template slot="suffix"> 抢购即将开始 </template>
</el-statistic>
</div>
<div style="width: 100%; display: inline-block; margin-top: 50px; ">
<el-statistic @finish="hilarity" :value="deadline3" time-indices title="添加时间">
<template slot="suffix">
<el-button type="primary " size="small" @click="add">add 10 second</el-button>
</template>
</el-statistic>
</div>
</el-col>
<el-col :span="10">
<el-card shadow="hover" style="width: 100%;">
<div slot="header" class="clearfix">
<span>文嘉《明日歌》</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="clickFn">暂停</el-button>
</div>
<div style="font-size: 18px;text-align: center; ">明日复明日</div>
<div style="font-size: 18px;text-align: center;">明日何其多</div>
<div style="font-size: 18px;text-align: center;">我生待明日</div>
<div style="font-size: 18px;text-align: center;">万事成蹉跎</div>
<div style="margin-top: 40px;"></div>
<el-statistic
ref="statistic"
@finish="hilarity"
format="HH:mm:ss"
:value="deadline4"
title="距离明日:"
time-indices
>
</el-statistic>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
deadline2: Date.now() + 1000 * 60 * 60 * 8,
deadline3: Date.now() + 1000 * 60 * 30,
deadline4: Date.now() + (new Date().setHours(23, 59, 59) - Date.now()),
stop: true,
};
},
methods: {
hilarity() {
this.$notify({
title: '提示',
message: '时间已到,你可知寸金难买寸光阴?',
duration: 0,
});
},
clickFn() {
this.$refs.statistic.suspend(this.stop);
this.stop = !this.stop;
},
add() {
this.deadline3 = this.deadline3 + 1000 * 10;
},
},
};
</script>
```
:::
### 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 |
### Statistic Slots
| name | 说明 |
| --------- | ---------- |
| prefix | 数值的前缀 |
| suffix | 数值的后缀 |
| formatter | 数值内容 |
| title | 数值的标题 |
### Statistic.Countdown Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| ------------ | ------------------ | ------- | ----------- | ---------- |
| time-indices | 是否开启倒计时功能 | boolean | true\|false | false |
| value | 必填值,输入绑定值 | string | — | — |
| format | 格式化倒计时展示 | string | — | 'HH:mm:ss' |
### Statistic.Countdown Events
| 事件名称 | 说明 | 回调参数 |
| -------- | ---------------------- | ---------------- |
| change | 在`倒计时`的功能中开启 | (value: Date) |
| finish | 在`倒计时` 完成后启动 | (value: boolean) |
### Statistic Methods
| 方法名 | 说明 | 参数 | 回调参数 |
| ------- | ---------- | --------------- | ------------- |
| suspend | 暂停倒计时 | (value:boolean) | (value: Date) |

View File

@ -192,6 +192,10 @@
{
"path": "/result",
"title": "Result 结果"
},
{
"path": "/statistic",
"title": "Statistic 统计数值"
}
]
},
@ -621,6 +625,10 @@
{
"path": "/drawer",
"title": "Drawer"
},
{
"path": "/statistic",
"title": "Statistic"
}
]
}
@ -935,6 +943,10 @@
{
"path": "/drawer",
"title": "Drawer"
},
{
"path": "/statistic",
"title": "Statistic"
}
]
}
@ -1249,6 +1261,10 @@
{
"path": "/drawer",
"title": "Drawer"
},
{
"path": "/statistic",
"title": "Statistic"
}
]
}

View File

@ -1 +1 @@
{"1.4.13":"1.4","2.0.11":"2.0","2.1.0":"2.1","2.2.2":"2.2","2.3.9":"2.3","2.4.11":"2.4","2.5.4":"2.5","2.6.3":"2.6","2.7.2":"2.7","2.8.2":"2.8","2.9.2":"2.9","2.10.1":"2.10","2.11.1":"2.11","2.12.0":"2.12","2.13.2":"2.13","2.14.1":"2.14","2.15.10":"2.15"}
{"1.4.13":"1.4","2.0.11":"2.0","2.1.0":"2.1","2.2.2":"2.2","2.3.9":"2.3","2.4.11":"2.4","2.5.4":"2.5","2.6.3":"2.6","2.7.2":"2.7","2.8.2":"2.8","2.9.2":"2.9","2.10.1":"2.10","2.11.1":"2.11","2.12.0":"2.12","2.13.2":"2.13","2.14.1":"2.14","2.15.13":"2.15"}

View File

@ -1,13 +1,14 @@
{
"name": "element-ui",
"version": "2.15.10",
"version": "2.15.13",
"description": "A Component Library for Vue.js.",
"main": "lib/element-ui.common.js",
"files": [
"lib",
"src",
"packages",
"types"
"types",
"web-types.json"
],
"typings": "types/index.d.ts",
"scripts": {
@ -59,6 +60,7 @@
},
"unpkg": "lib/index.js",
"style": "lib/theme-chalk/index.css",
"web-types": "./web-types.json",
"dependencies": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",

View File

@ -43,6 +43,7 @@
:key="url"
:src="currentImg"
:style="imgStyle"
referrerpolicy='no-referrer'
@load="handleImgLoad"
@error="handleImgError"
@mousedown="handleMouseDown">

View File

@ -62,7 +62,8 @@
zIndex: {
type: Number,
default: 2000
}
},
initialIndex: Number
},
data() {
@ -95,9 +96,15 @@
},
imageIndex() {
let previewIndex = 0;
const initialIndex = this.initialIndex;
if (initialIndex >= 0) {
previewIndex = initialIndex;
return previewIndex;
}
const srcIndex = this.previewSrcList.indexOf(this.src);
if (srcIndex >= 0) {
previewIndex = srcIndex;
return previewIndex;
}
return previewIndex;
}

View File

@ -15,9 +15,9 @@
aria-valuemax="100"
>
<div class="el-progress-bar" v-if="type === 'line'">
<div class="el-progress-bar__outer" :style="{height: strokeWidth + 'px'}">
<div class="el-progress-bar__outer" :style="{height: strokeWidth + 'px', backgroundColor:defineBackColor}">
<div class="el-progress-bar__inner" :style="barStyle">
<div class="el-progress-bar__innerText" v-if="showText && textInside">{{content}}</div>
<div class="el-progress-bar__innerText" :style="{color:textColor}" v-if="showText && textInside">{{content}}</div>
</div>
</div>
</div>
@ -26,7 +26,7 @@
<path
class="el-progress-circle__track"
:d="trackPath"
stroke="#e5e9f2"
:stroke="defineBackColor"
:stroke-width="relativeStrokeWidth"
fill="none"
:style="trailPathStyle"></path>
@ -43,7 +43,7 @@
<div
class="el-progress__text"
v-if="showText && !textInside"
:style="{fontSize: progressTextSize + 'px'}"
:style="{fontSize: progressTextSize + 'px', color:textColor}"
>
<template v-if="!status">{{content}}</template>
<i v-else :class="iconClass"></i>
@ -93,6 +93,14 @@
type: [String, Array, Function],
default: ''
},
defineBackColor: {
type: [String, Array, Function],
default: '#ebeef5'
},
textColor: {
type: [String, Array, Function],
default: '#606266'
},
format: Function
},
computed: {

View File

@ -0,0 +1,8 @@
import Statistic from './src/main';
/* istanbul ignore next */
Statistic.install = function(Vue) {
Vue.component(Statistic.name, Statistic);
};
export default Statistic;

View File

@ -0,0 +1,207 @@
<template>
<div class="el-statistic">
<div class="head" v-if="title||$slots.title">
<slot name="title">
<span class="title">
{{ title }}
</span>
</slot>
</div>
<div class="con">
<span class="prefix" v-if="prefix||$slots.prefix">
<slot name="prefix" >
{{ prefix }}
</slot>
</span>
<span class="number" :style="valueStyle">
<slot name="formatter"> {{ disposeValue }}</slot>
</span>
<span class="suffix" v-if="suffix||$slots.suffix">
<slot name="suffix">
{{ suffix }}
</slot>
</span>
</div>
</div>
</template>
<script>
import { isNumber, chain, multiply, padStart, reduce} from 'element-ui/src/utils/lodash';
export default {
name: 'ElStatistic',
data() {
return {
disposeValue: '',
timeTask: null,
REFRESH_INTERVAL: 1000 / 30
};
},
props: {
decimalSeparator: {
type: String,
default: '.'
},
groupSeparator: {
type: String,
default: ''
},
precision: {
type: Number,
default: null
},
value: {
type: [String, Number],
default: ''
},
prefix: {
type: String,
default: ''
},
suffix: {
type: String,
default: ''
},
title: {
type: [String, Number],
default: ''
},
timeIndices: {
type: Boolean,
default: false
},
valueStyle: {
type: Object,
default: function() {
return {};
}
},
format: {
type: String,
default: 'HH:mm:ss:SSS'
},
rate: {
type: Number,
default: 1000
}
},
created() {
this.branch();
},
watch: {
value: function() {
this.branch();
}
},
methods: {
branch() {
let { timeIndices, countDown, dispose} = this;
timeIndices ? countDown() : dispose();
},
magnification(num, mulriple = 1000, groupSeparator = ',') {
// magnification factor
const level = String(mulriple).length - 1;
const reg = new RegExp(`\\d{1,${level}}(?=(\\d{${level}})+$)`, 'g');
const result = String(num)
.replace(reg, '$&,')
.split(',')
.join(groupSeparator);
return result;
},
dispose() {
let { value, precision, groupSeparator, rate } = this;
if (!isNumber(value)) return false;
let [integer, decimal] = String(value).split('.');
if (precision) {
decimal = `${decimal || ''}${(1)
.toFixed(precision)
.replace('.', '')
.slice(1)}`;
decimal = decimal.slice(0, precision);
}
let result = 0;
// 1000 multiplying power
if (groupSeparator) {
integer = this.magnification(integer, rate, groupSeparator);
}
result = [integer, decimal].join(
decimal ? this.decimalSeparator : ''
);
this.disposeValue = result;
return result;
},
diffDate(minuend, subtrahend) {
return Math.max(minuend - subtrahend, 0);
},
suspend(isStop) {
if (isStop) {
if (this.timeTask) {
clearInterval(this.timeTask);
this.timeTask = null;
}
} else {
this.branch();
}
return this.disposeValue;
},
formatTimeStr: function(time) {
let {format} = this;
const escapeRegex = /\[[^\]]*]/g;
const keepList = (format.match(escapeRegex) || []).map(str => str.slice(1, -1));
const timeUnits = [
['Y', 1000 * 60 * 60 * 24 * 365], // years
['M', 1000 * 60 * 60 * 24 * 30], // months
['D', 1000 * 60 * 60 * 24], // days
['H', 1000 * 60 * 60], // hours
['m', 1000 * 60], // minutes
['s', 1000], // seconds
['S', 1] // million seconds
];
let formatText = reduce(
timeUnits,
(con, item) => {
const name = item[0];
return con.replace(new RegExp(`${name}+`, 'g'), (match) => {
let sum = chain(time).divide(item[1]).floor(0).value();
time -= multiply(sum, item[1]);
return padStart(String(sum), String(match).length, 0);
});
},
format
);
let index = 0;
return formatText.replace(escapeRegex, () => {
const match = keepList[index];
index += 1;
return match;
});
},
stopTime(time) {
let result = true; // stop
if (time) {
this.$emit('change', time);
result = false;
} else {
result = true;
this.suspend(true);
this.$emit('finish', true);
}
return result;
},
countDown() {
let {REFRESH_INTERVAL, timeTask, diffDate, formatTimeStr, stopTime, suspend} = this;
if (timeTask) return;
let than = this;
this.timeTask = setInterval(()=> {
let diffTiem = diffDate(than.value, Date.now());
than.disposeValue = formatTimeStr(diffTiem);
stopTime(diffTiem);
}, REFRESH_INTERVAL);
this.$once('hook:beforeDestroy', () => {
suspend(true);
});
}
}
};
</script>

View File

@ -1,6 +1,6 @@
{
"name": "element-theme-chalk",
"version": "2.15.10",
"version": "2.15.13",
"description": "Element component chalk theme.",
"main": "lib/index.css",
"style": "lib/index.css",

View File

@ -77,6 +77,7 @@
@import "./cascader-panel.scss";
@import "./avatar.scss";
@import "./drawer.scss";
@import "./statistic.scss";
@import "./popconfirm.scss";
@import "./skeleton.scss";
@import "./skeleton-item.scss";

View File

@ -0,0 +1,38 @@
@import "mixins/mixins";
@import "common/var";
@include b(statistic) {
$statistic-justify: center;
$statistic-align: center;
width: 100%;
box-sizing: border-box;
margin: 0;
padding: 0;
color: $--color-black;
font-variant: tabular-nums;
list-style: none;
font-feature-settings: "tnum";
text-align: center;
.head {
margin-bottom: 4px;
color: $--color-text-regular;
font-size: $--font-size-small;
}
.con {
font-family: Sans-serif;
display: flex;
justify-content: $statistic-justify;
align-items: $statistic-align;
color: $--color-text-primary;
.number {
font-size: $--font-size-extra-large;
padding: 0 4px;
}
span {
display: inline-block;
margin: 0;
line-height: 100%;
}
}
}

View File

@ -1,12 +1,14 @@
import { once, on } from 'element-ui/src/utils/dom';
import { isMac } from 'element-ui/src/utils/util';
export default {
bind(el, binding, vnode) {
let interval = null;
let startTime;
const maxIntervals = isMac() ? 100 : 200;
const handler = () => vnode.context[binding.expression].apply();
const clear = () => {
if (Date.now() - startTime < 100) {
if (Date.now() - startTime < maxIntervals) {
handler();
}
clearInterval(interval);
@ -18,7 +20,7 @@ export default {
startTime = Date.now();
once(document, 'mouseup', clear);
clearInterval(interval);
interval = setInterval(handler, 100);
interval = setInterval(handler, maxIntervals);
});
}
};

View File

@ -81,6 +81,7 @@ import PageHeader from '../packages/page-header/index.js';
import CascaderPanel from '../packages/cascader-panel/index.js';
import Avatar from '../packages/avatar/index.js';
import Drawer from '../packages/drawer/index.js';
import Statistic from '../packages/statistic/index.js';
import Popconfirm from '../packages/popconfirm/index.js';
import Skeleton from '../packages/skeleton/index.js';
import SkeletonItem from '../packages/skeleton-item/index.js';
@ -168,6 +169,7 @@ const components = [
CascaderPanel,
Avatar,
Drawer,
Statistic,
Popconfirm,
Skeleton,
SkeletonItem,
@ -210,7 +212,7 @@ if (typeof window !== 'undefined' && window.Vue) {
}
export default {
version: '2.15.10',
version: '2.15.13',
locale: locale.use,
i18n: locale.i18n,
install,
@ -296,6 +298,7 @@ export default {
CascaderPanel,
Avatar,
Drawer,
Statistic,
Popconfirm,
Skeleton,
SkeletonItem,

View File

@ -14,7 +14,7 @@ export default {
selectTime: 'Pilih Masa',
startDate: 'Tarikh Mula',
startTime: 'Masa Mula',
endDate: 'Tarik Tamat',
endDate: 'Tarikh Tamat',
endTime: 'Masa Tamat',
prevYear: 'Tahun Lepas',
nextYear: 'Tahun Depan',
@ -33,7 +33,6 @@ export default {
month10: 'Oktober',
month11: 'November',
month12: 'Disember',
// week: '周次',
weeks: {
sun: 'Ahad',
mon: 'Isnin',
@ -68,7 +67,7 @@ export default {
noMatch: 'Tiada maklumat yang sepadan',
loading: 'Sedang dimuat turun',
placeholder: 'Sila pilih',
noData: 'Tiada maklumat buat sementara'
noData: 'Tiada maklumat'
},
pagination: {
goto: 'Seterusnya',
@ -80,23 +79,23 @@ export default {
title: 'Tip',
confirm: 'Sah',
cancel: 'Batal',
error: 'Data yang diisikan tidak sah!'
error: 'Data yang diisi tidak sah!'
},
upload: {
deleteTip: 'Tekan "Padam" untuk memadam',
delete: 'Padam',
preview: 'Semak gambar',
preview: 'Pratonton gambar',
continue: 'Meneruskan muat naik'
},
table: {
emptyText: 'Tiada maklumat buat sementara',
emptyText: 'Tiada maklumat',
confirmFilter: 'Tapis',
resetFilter: 'Set Semula',
clearFilter: 'Semua',
sumText: 'Jumlah'
},
tree: {
emptyText: 'Tiada maklumat buat sementara'
emptyText: 'Tiada maklumat'
},
transfer: {
noMatch: 'Tiada maklumat yang sepadan',
@ -117,7 +116,7 @@ export default {
cancelButtonText: 'Batal'
},
empty: {
description: 'Tiada maklumat buat sementara'
description: 'Tiada maklumat'
}
}
};

View File

@ -16,10 +16,10 @@ export default {
startTime: 'Start Tidspunkt',
endDate: 'Sluttdato',
endTime: 'Sluttidspunkt',
prevYear: 'Previous Year', // to be translated
nextYear: 'Next Year', // to be translated
prevMonth: 'Previous Month', // to be translated
nextMonth: 'Next Month', // to be translated
prevYear: 'Forrige År',
nextYear: 'Neste År',
prevMonth: 'Forrige Måned',
nextMonth: 'Neste Måned',
year: '',
month1: 'Januar',
month2: 'Februar',
@ -82,7 +82,7 @@ export default {
error: 'Ugyldig input'
},
upload: {
deleteTip: 'press delete to remove', // to be translated
deleteTip: 'trykk slett for å ta bort',
delete: 'Slett',
preview: 'Forhåndsvisning',
continue: 'Fortsett'
@ -92,7 +92,7 @@ export default {
confirmFilter: 'Bekreft',
resetFilter: 'Tilbakestill',
clearFilter: 'Alle',
sumText: 'Sum' // to be translated
sumText: 'Sum'
},
tree: {
emptyText: 'Ingen Data'
@ -100,20 +100,20 @@ export default {
transfer: {
noMatch: 'Ingen samsvarende data',
noData: 'Ingen data',
titles: ['List 1', 'List 2'], // to be translated
filterPlaceholder: 'Enter keyword', // to be translated
noCheckedFormat: '{total} items', // to be translated
hasCheckedFormat: '{checked}/{total} checked' // to be translated
titles: ['Liste 1', 'Liste 2'],
filterPlaceholder: 'Tast inn nøkkelord',
noCheckedFormat: '{total} gjenstander',
hasCheckedFormat: '{checked}/{total} sjekket'
},
image: {
error: 'FAILED' // to be translated
error: 'MISLYKTES'
},
pageHeader: {
title: 'Back' // to be translated
title: 'Tilbake'
},
popconfirm: {
confirmButtonText: 'Yes', // to be translated
cancelButtonText: 'No' // to be translated
confirmButtonText: 'Ja',
cancelButtonText: 'Nei'
},
empty: {
description: 'Ingen Data'

View File

@ -62,7 +62,7 @@ export default {
loading: 'Yuklanmoqda',
noMatch: 'Mos maʼlumot yoʻq',
noData: 'Maʼlumot yoʻq',
placeholder: 'Tanladizngiz'
placeholder: 'Tanlang'
},
cascader: {
noMatch: 'Mos maʼlumot topilmadi',
@ -85,8 +85,8 @@ export default {
upload: {
deleteTip: 'Oʻchirish tugmasini bosib oʻchiring',
delete: 'Oʻchirish',
preview: 'Oldin koʻrish',
continue: 'Davom qilish'
preview: 'Oldindan koʻrish',
continue: 'Davom etish'
},
table: {
emptyText: 'Boʻsh',
@ -113,8 +113,8 @@ export default {
title: 'Orqaga'
},
popconfirm: {
confirmButtonText: 'Yes', // to be translated
cancelButtonText: 'No' // to be translated
confirmButtonText: 'Tasdiqlash',
cancelButtonText: 'Bekor qilish'
},
empty: {
description: 'Boʻsh'

18075
src/utils/lodash.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -239,3 +239,7 @@ export function objToArray(obj) {
}
return isEmpty(obj) ? [] : [obj];
}
export const isMac = function() {
return !Vue.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
};

View File

@ -0,0 +1,15 @@
import { createTest, destroyVM } from '../util';
import Statistic from 'packages/statistic';
describe('Statistic', () => {
let vm;
afterEach(() => {
destroyVM(vm);
});
it('create', () => {
vm = createTest(Statistic, true);
expect(vm.$el).to.exist;
});
});

760
types/element-ui.d.ts vendored
View File

@ -1,378 +1,382 @@
import Vue, { PluginObject } from 'vue'
import { ElementUIComponent, ElementUIComponentSize, ElementUIHorizontalAlignment } from './component'
import { ElAlert } from './alert'
import { ElAside } from './aside'
import { ElAutocomplete } from './autocomplete'
import { ElBadge } from './badge'
import { ElBreadcrumb } from './breadcrumb'
import { ElBreadcrumbItem } from './breadcrumb-item'
import { ElButton } from './button'
import { ElButtonGroup } from './button-group'
import { ElCard } from './card'
import { ElCarousel } from './carousel'
import { ElCarouselItem } from './carousel-item'
import { ElCascader } from './cascader'
import { ElCheckbox } from './checkbox'
import { ElCheckboxButton } from './checkbox-button'
import { ElCheckboxGroup } from './checkbox-group'
import { ElCol } from './col'
import { ElCollapse } from './collapse'
import { ElCollapseItem } from './collapse-item'
import { ElColorPicker } from './color-picker'
import { ElContainer } from './container'
import { ElDatePicker } from './date-picker'
import { ElDialog } from './dialog'
import { ElDropdown } from './dropdown'
import { ElDropdownItem } from './dropdown-item'
import { ElDropdownMenu } from './dropdown-menu'
import { ElFooter } from './footer'
import { ElForm } from './form'
import { ElFormItem } from './form-item'
import { ElHeader } from './header'
import { ElInput } from './input'
import { ElInputNumber } from './input-number'
import { ElLoading } from './loading'
import { ElMain } from './main'
import { ElMenu } from './menu'
import { ElMenuItem } from './menu-item'
import { ElMenuItemGroup } from './menu-item-group'
import { ElMessage } from './message'
import { ElMessageBox } from './message-box'
import { ElNotification } from './notification'
import { ElOption } from './option'
import { ElOptionGroup } from './option-group'
import { ElPagination } from './pagination'
import { ElPopover } from './popover'
import { ElProgress } from './progress'
import { ElRate } from './rate'
import { ElRadio } from './radio'
import { ElRadioButton } from './radio-button'
import { ElRadioGroup } from './radio-group'
import { ElRow } from './row'
import { ElSelect } from './select'
import { ElSlider } from './slider'
import { ElStep } from './step'
import { ElSteps } from './steps'
import { ElSubmenu } from './submenu'
import { ElSwitch } from './switch'
import { ElTable } from './table'
import { ElTableColumn } from './table-column'
import { ElTag } from './tag'
import { ElTabs } from './tabs'
import { ElTabPane } from './tab-pane'
import { ElTimeline } from './timeline'
import { ElTimelineItem } from './timeline-item'
import { ElTimePicker } from './time-picker'
import { ElTimeSelect } from './time-select'
import { ElTooltip } from './tooltip'
import { ElTransfer } from './transfer'
import { ElTree, TreeData } from './tree'
import { ElUpload } from './upload'
import { ElLink } from './link'
import { ElDivider } from './divider'
import { ElIcon } from './icon'
import { ElCalendar } from './calendar'
import { ElImage } from './image'
import { ElBacktop } from './backtop'
import { ElInfiniteScroll } from './infinite-scroll'
import { ElPageHeader } from './page-header'
import { ElAvatar } from './avatar'
import { ElDrawer } from './drawer'
import { ElPopconfirm } from './popconfirm'
import { ElSkeleton } from './skeleton'
import { ElSkeletonItem } from './skeleton-item'
import { ElCascaderPanel } from './cascader-panel'
import { ElEmpty } from './empty'
import { ElSpinner } from './spinner'
import { ElDescriptions } from './descriptions'
import { ElDescriptionsItem } from './descriptions-item'
import { ElResult } from './result'
export interface InstallationOptions {
locale: any,
i18n: any,
size: string
}
/** The version of element-ui */
export const version: string
/**
* Install all element-ui components into Vue.
* Please do not invoke this method directly.
* Call `Vue.use(ElementUI)` to install.
*/
export function install (vue: typeof Vue, options: InstallationOptions): void
/** ElementUI component common definition */
export type Component = ElementUIComponent
/** Component size definition for button, input, etc */
export type ComponentSize = ElementUIComponentSize
/** Horizontal alignment */
export type HorizontalAlignment = ElementUIHorizontalAlignment
/** Show animation while loading data */
export const Loading: ElLoading
/** Used to show feedback after an activity. The difference with Notification is that the latter is often used to show a system level passive notification. */
export const Message: ElMessage
/** A set of modal boxes simulating system message box, mainly for message prompt, success tips, error messages and query information */
export const MessageBox: ElMessageBox
/** Displays a global notification message at the upper right corner of the page */
export const Notification: ElNotification
// TS cannot merge imported class with namespace, so declare subclasses instead
/** Alert Component */
export class Alert extends ElAlert {}
/** Aside Component */
export class Aside extends ElAside {}
/** Autocomplete Component */
export class Autocomplete extends ElAutocomplete {}
/** Bagde Component */
export class Badge extends ElBadge {}
/** Breadcrumb Component */
export class Breadcrumb extends ElBreadcrumb {}
/** Breadcrumb Item Component */
export class BreadcrumbItem extends ElBreadcrumbItem {}
/** Button Component */
export class Button extends ElButton {}
/** Button Group Component */
export class ButtonGroup extends ElButtonGroup {}
/** Card Component */
export class Card extends ElCard {}
/** Cascader Component */
export class Cascader extends ElCascader {}
/** Carousel Component */
export class Carousel extends ElCarousel {}
/** Carousel Item Component */
export class CarouselItem extends ElCarouselItem {}
/** Checkbox Component */
export class Checkbox extends ElCheckbox {}
/** Checkbox Button Component */
export class CheckboxButton extends ElCheckboxButton {}
/** Checkbox Group Component */
export class CheckboxGroup extends ElCheckboxGroup {}
/** Colunm Layout Component */
export class Col extends ElCol {}
/** Collapse Component */
export class Collapse extends ElCollapse {}
/** Collapse Item Component */
export class CollapseItem extends ElCollapseItem {}
/** Color Picker Component */
export class ColorPicker extends ElColorPicker {}
/** Container Component */
export class Container extends ElContainer {}
/** Date Picker Component */
export class DatePicker extends ElDatePicker {}
/** Dialog Component */
export class Dialog extends ElDialog {}
/** Dropdown Component */
export class Dropdown extends ElDropdown {}
/** Dropdown Item Component */
export class DropdownItem extends ElDropdownItem {}
/** Dropdown Menu Component */
export class DropdownMenu extends ElDropdownMenu {}
/** Footer Component */
export class Footer extends ElFooter {}
/** Form Component */
export class Form extends ElForm {}
/** Form Item Component */
export class FormItem extends ElFormItem {}
/** Header Component */
export class Header extends ElHeader {}
/** Input Component */
export class Input extends ElInput {}
/** Input Number Component */
export class InputNumber extends ElInputNumber {}
/** Main Component */
export class Main extends ElMain {}
/** Menu that provides navigation for your website */
export class Menu extends ElMenu {}
/** Menu Item Component */
export class MenuItem extends ElMenuItem {}
/** Menu Item Group Component */
export class MenuItemGroup extends ElMenuItemGroup {}
/** Dropdown Select Option Component */
export class Option extends ElOption {}
/** Dropdown Select Option Group Component */
export class OptionGroup extends ElOptionGroup {}
/** Pagination Component */
export class Pagination extends ElPagination {}
/** Popover Component */
export class Popover extends ElPopover {}
/** Progress Component */
export class Progress extends ElProgress {}
/** Rate Component */
export class Rate extends ElRate {}
/** Radio Component */
export class Radio extends ElRadio {}
/** Radio Button Component */
export class RadioButton extends ElRadioButton {}
/** Radio Group Component */
export class RadioGroup extends ElRadioGroup {}
/** Row Layout Component */
export class Row extends ElRow {}
/** Dropdown Select Component */
export class Select extends ElSelect {}
/** Slider Component */
export class Slider extends ElSlider {}
/** Step Component */
export class Step extends ElStep {}
/** Steps Component */
export class Steps extends ElSteps {}
/** Submenu Component */
export class Submenu extends ElSubmenu {}
/** Switch Component */
export class Switch extends ElSwitch {}
/** Table Component */
export class Table extends ElTable {}
/** Table Column Component */
export class TableColumn extends ElTableColumn {}
/** Tabs Component */
export class Tabs extends ElTabs {}
/** Tab Pane Component */
export class TabPane extends ElTabPane {}
/** Tag Component */
export class Tag extends ElTag {}
/** Timeline Component */
export class Timeline extends ElTimeline {}
/** Timeline Item Component */
export class TimelineItem extends ElTimelineItem {}
/** TimePicker Component */
export class TimePicker extends ElTimePicker {}
/** TimeSelect Component */
export class TimeSelect extends ElTimeSelect {}
/** Tooltip Component */
export class Tooltip extends ElTooltip {}
/** Transfer Component */
export class Transfer extends ElTransfer {}
/** Tree Component */
export class Tree<K = any, D = TreeData> extends ElTree<K, D> {}
/** Upload Component */
export class Upload extends ElUpload {}
/** Divider Component */
export class Divider extends ElDivider {}
/** Link Component */
export class Link extends ElLink {}
/** Image Component */
export class Image extends ElImage {}
/** Icon Component */
export class Icon extends ElIcon {}
/** Calendar Component */
export class Calendar extends ElCalendar {}
/** Backtop Component */
export class Backtop extends ElBacktop {}
/** InfiniteScroll Directive */
export const InfiniteScroll: PluginObject<ElInfiniteScroll>;
/** PageHeader Component */
export class PageHeader extends ElPageHeader {}
/** Avatar Component */
export class Avatar extends ElAvatar {}
/** Drawer Component */
export class Drawer extends ElDrawer {}
/** Popconfirm Component */
export class Popconfirm extends ElPopconfirm {}
/** Skeleton Component */
export class Skeleton extends ElSkeleton {}
/** Skeleton Item Component */
export class SkeletonItem extends ElSkeletonItem {}
/** CascaderPanel Component */
export class CascaderPanel extends ElCascaderPanel {}
/** Empty Component */
export class Empty extends ElEmpty {}
/** Spinner Component */
export class Spinner extends ElSpinner {}
/** Description Component */
export class Descriptions extends ElDescriptions {}
/** Description Item Component */
export class DescriptionsItem extends ElDescriptionsItem {}
/** Result Component */
export class Result extends ElResult {}
import Vue, { PluginObject } from 'vue'
import { ElementUIComponent, ElementUIComponentSize, ElementUIHorizontalAlignment } from './component'
import { ElAlert } from './alert'
import { ElAside } from './aside'
import { ElAutocomplete } from './autocomplete'
import { ElBadge } from './badge'
import { ElBreadcrumb } from './breadcrumb'
import { ElBreadcrumbItem } from './breadcrumb-item'
import { ElButton } from './button'
import { ElButtonGroup } from './button-group'
import { ElCard } from './card'
import { ElCarousel } from './carousel'
import { ElCarouselItem } from './carousel-item'
import { ElCascader } from './cascader'
import { ElCheckbox } from './checkbox'
import { ElCheckboxButton } from './checkbox-button'
import { ElCheckboxGroup } from './checkbox-group'
import { ElCol } from './col'
import { ElCollapse } from './collapse'
import { ElCollapseItem } from './collapse-item'
import { ElColorPicker } from './color-picker'
import { ElContainer } from './container'
import { ElDatePicker } from './date-picker'
import { ElDialog } from './dialog'
import { ElDropdown } from './dropdown'
import { ElDropdownItem } from './dropdown-item'
import { ElDropdownMenu } from './dropdown-menu'
import { ElFooter } from './footer'
import { ElForm } from './form'
import { ElFormItem } from './form-item'
import { ElHeader } from './header'
import { ElInput } from './input'
import { ElInputNumber } from './input-number'
import { ElLoading } from './loading'
import { ElMain } from './main'
import { ElMenu } from './menu'
import { ElMenuItem } from './menu-item'
import { ElMenuItemGroup } from './menu-item-group'
import { ElMessage } from './message'
import { ElMessageBox } from './message-box'
import { ElNotification } from './notification'
import { ElOption } from './option'
import { ElOptionGroup } from './option-group'
import { ElPagination } from './pagination'
import { ElPopover } from './popover'
import { ElProgress } from './progress'
import { ElRate } from './rate'
import { ElRadio } from './radio'
import { ElRadioButton } from './radio-button'
import { ElRadioGroup } from './radio-group'
import { ElRow } from './row'
import { ElSelect } from './select'
import { ElSlider } from './slider'
import { ElStep } from './step'
import { ElSteps } from './steps'
import { ElSubmenu } from './submenu'
import { ElSwitch } from './switch'
import { ElTable } from './table'
import { ElTableColumn } from './table-column'
import { ElTag } from './tag'
import { ElTabs } from './tabs'
import { ElTabPane } from './tab-pane'
import { ElTimeline } from './timeline'
import { ElTimelineItem } from './timeline-item'
import { ElTimePicker } from './time-picker'
import { ElTimeSelect } from './time-select'
import { ElTooltip } from './tooltip'
import { ElTransfer } from './transfer'
import { ElTree, TreeData } from './tree'
import { ElUpload } from './upload'
import { ElLink } from './link'
import { ElDivider } from './divider'
import { ElIcon } from './icon'
import { ElCalendar } from './calendar'
import { ElImage } from './image'
import { ElBacktop } from './backtop'
import { ElInfiniteScroll } from './infinite-scroll'
import { ElPageHeader } from './page-header'
import { ElAvatar } from './avatar'
import { ElDrawer } from './drawer'
import { ElPopconfirm } from './popconfirm'
import { ElSkeleton } from './skeleton'
import { ElSkeletonItem } from './skeleton-item'
import { ElCascaderPanel } from './cascader-panel'
import { ElEmpty } from './empty'
import { ElSpinner } from './spinner'
import { ElDescriptions } from './descriptions'
import { ElDescriptionsItem } from './descriptions-item'
import { ElResult } from './result'
import { ElStatistic } from './statistic'
export interface InstallationOptions {
locale: any,
i18n: any,
size: string
}
/** The version of element-ui */
export const version: string
/**
* Install all element-ui components into Vue.
* Please do not invoke this method directly.
* Call `Vue.use(ElementUI)` to install.
*/
export function install (vue: typeof Vue, options: InstallationOptions): void
/** ElementUI component common definition */
export type Component = ElementUIComponent
/** Component size definition for button, input, etc */
export type ComponentSize = ElementUIComponentSize
/** Horizontal alignment */
export type HorizontalAlignment = ElementUIHorizontalAlignment
/** Show animation while loading data */
export const Loading: ElLoading
/** Used to show feedback after an activity. The difference with Notification is that the latter is often used to show a system level passive notification. */
export const Message: ElMessage
/** A set of modal boxes simulating system message box, mainly for message prompt, success tips, error messages and query information */
export const MessageBox: ElMessageBox
/** Displays a global notification message at the upper right corner of the page */
export const Notification: ElNotification
// TS cannot merge imported class with namespace, so declare subclasses instead
/** Alert Component */
export class Alert extends ElAlert {}
/** Aside Component */
export class Aside extends ElAside {}
/** Autocomplete Component */
export class Autocomplete extends ElAutocomplete {}
/** Bagde Component */
export class Badge extends ElBadge {}
/** Breadcrumb Component */
export class Breadcrumb extends ElBreadcrumb {}
/** Breadcrumb Item Component */
export class BreadcrumbItem extends ElBreadcrumbItem {}
/** Button Component */
export class Button extends ElButton {}
/** Button Group Component */
export class ButtonGroup extends ElButtonGroup {}
/** Card Component */
export class Card extends ElCard {}
/** Cascader Component */
export class Cascader extends ElCascader {}
/** Carousel Component */
export class Carousel extends ElCarousel {}
/** Carousel Item Component */
export class CarouselItem extends ElCarouselItem {}
/** Checkbox Component */
export class Checkbox extends ElCheckbox {}
/** Checkbox Button Component */
export class CheckboxButton extends ElCheckboxButton {}
/** Checkbox Group Component */
export class CheckboxGroup extends ElCheckboxGroup {}
/** Colunm Layout Component */
export class Col extends ElCol {}
/** Collapse Component */
export class Collapse extends ElCollapse {}
/** Collapse Item Component */
export class CollapseItem extends ElCollapseItem {}
/** Color Picker Component */
export class ColorPicker extends ElColorPicker {}
/** Container Component */
export class Container extends ElContainer {}
/** Date Picker Component */
export class DatePicker extends ElDatePicker {}
/** Dialog Component */
export class Dialog extends ElDialog {}
/** Dropdown Component */
export class Dropdown extends ElDropdown {}
/** Dropdown Item Component */
export class DropdownItem extends ElDropdownItem {}
/** Dropdown Menu Component */
export class DropdownMenu extends ElDropdownMenu {}
/** Footer Component */
export class Footer extends ElFooter {}
/** Form Component */
export class Form extends ElForm {}
/** Form Item Component */
export class FormItem extends ElFormItem {}
/** Header Component */
export class Header extends ElHeader {}
/** Input Component */
export class Input extends ElInput {}
/** Input Number Component */
export class InputNumber extends ElInputNumber {}
/** Main Component */
export class Main extends ElMain {}
/** Menu that provides navigation for your website */
export class Menu extends ElMenu {}
/** Menu Item Component */
export class MenuItem extends ElMenuItem {}
/** Menu Item Group Component */
export class MenuItemGroup extends ElMenuItemGroup {}
/** Dropdown Select Option Component */
export class Option extends ElOption {}
/** Dropdown Select Option Group Component */
export class OptionGroup extends ElOptionGroup {}
/** Pagination Component */
export class Pagination extends ElPagination {}
/** Popover Component */
export class Popover extends ElPopover {}
/** Progress Component */
export class Progress extends ElProgress {}
/** Rate Component */
export class Rate extends ElRate {}
/** Radio Component */
export class Radio extends ElRadio {}
/** Radio Button Component */
export class RadioButton extends ElRadioButton {}
/** Radio Group Component */
export class RadioGroup extends ElRadioGroup {}
/** Row Layout Component */
export class Row extends ElRow {}
/** Dropdown Select Component */
export class Select extends ElSelect {}
/** Slider Component */
export class Slider extends ElSlider {}
/** Step Component */
export class Step extends ElStep {}
/** Steps Component */
export class Steps extends ElSteps {}
/** Submenu Component */
export class Submenu extends ElSubmenu {}
/** Switch Component */
export class Switch extends ElSwitch {}
/** Table Component */
export class Table extends ElTable {}
/** Table Column Component */
export class TableColumn extends ElTableColumn {}
/** Tabs Component */
export class Tabs extends ElTabs {}
/** Tab Pane Component */
export class TabPane extends ElTabPane {}
/** Tag Component */
export class Tag extends ElTag {}
/** Timeline Component */
export class Timeline extends ElTimeline {}
/** Timeline Item Component */
export class TimelineItem extends ElTimelineItem {}
/** TimePicker Component */
export class TimePicker extends ElTimePicker {}
/** TimeSelect Component */
export class TimeSelect extends ElTimeSelect {}
/** Tooltip Component */
export class Tooltip extends ElTooltip {}
/** Transfer Component */
export class Transfer extends ElTransfer {}
/** Tree Component */
export class Tree<K = any, D = TreeData> extends ElTree<K, D> {}
/** Upload Component */
export class Upload extends ElUpload {}
/** Divider Component */
export class Divider extends ElDivider {}
/** Link Component */
export class Link extends ElLink {}
/** Image Component */
export class Image extends ElImage {}
/** Icon Component */
export class Icon extends ElIcon {}
/** Calendar Component */
export class Calendar extends ElCalendar {}
/** Backtop Component */
export class Backtop extends ElBacktop {}
/** InfiniteScroll Directive */
export const InfiniteScroll: PluginObject<ElInfiniteScroll>;
/** PageHeader Component */
export class PageHeader extends ElPageHeader {}
/** Avatar Component */
export class Avatar extends ElAvatar {}
/** Drawer Component */
export class Drawer extends ElDrawer {}
/** Popconfirm Component */
export class Popconfirm extends ElPopconfirm {}
/** Skeleton Component */
export class Skeleton extends ElSkeleton {}
/** Skeleton Item Component */
export class SkeletonItem extends ElSkeletonItem {}
/** CascaderPanel Component */
export class CascaderPanel extends ElCascaderPanel {}
/** Empty Component */
export class Empty extends ElEmpty {}
/** Spinner Component */
export class Spinner extends ElSpinner {}
/** Description Component */
export class Descriptions extends ElDescriptions {}
/** Description Item Component */
export class DescriptionsItem extends ElDescriptionsItem {}
/** Result Component */
export class Result extends ElResult {}
/** Statistic Component */
export class Statistic extends ElStatistic {}

2
types/image.d.ts vendored
View File

@ -38,4 +38,6 @@ export declare class ElImage extends ElementUIComponent {
previewSrcList: string[]
zIndex: number
initialIndex: number
}

37
types/statistic.d.ts vendored Normal file
View File

@ -0,0 +1,37 @@
import { ElementUIComponent } from './component'
/** Statistic Component */
export declare class ElStatistic extends ElementUIComponent {
/** Set the decimal point */
decimalSeparator: string
/** Sets the thousandth identifier */
groupSeparator: string
/** numerical precision */
precision: number
/** Numerical content */
value: string | number
/** Title of numerical value */
title: string | number
/** Whether to enable the countdown function */
timeIndices: boolean
/** Sets the style of the value */
valueStyle: object
/** Numeric content formatting countdown display */
format: string
/** Set the ratio */
rate: number
/** Set the suffix of the value */
suffix: string
/** Set the prefix of the value */
prefix: string
}

4195
web-types.json Normal file

File diff suppressed because it is too large Load Diff