Skip to content

Commit

Permalink
Merge pull request #4 from ElemeFE/dev
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
qingdengyue committed Jun 4, 2019
2 parents d61eed0 + 36e119e commit 539953b
Show file tree
Hide file tree
Showing 83 changed files with 2,603 additions and 2,225 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.en-US.md
@@ -1,5 +1,26 @@
## Changelog

## 2.9.1

*2019-05-30*

#### New features

- Table
- default-expand-all, expand-row-keys, toggle-row-expansion method and expand-change event are supported in Tree Table (#15709 by @ziyoung)

#### Bug fixes

- Table
- Fix some bugs (#15709 by @ziyoung)
- Theme
- Update api host (#15784 by @iamkun)

#### Optimization

- Chore
- Update InfiniteScroll type (#15794 by @iamkun)

### 2.9.0

*2019-05-30*
Expand Down
113 changes: 67 additions & 46 deletions CHANGELOG.es.md
@@ -1,86 +1,107 @@
## Changelog

## 2.9.1

*2019-05-30*

#### Nuevas características

- Table
- tree-props,default-expand-all, expand-row-keys, toggle-row-expansion method and expand-change event son compatibles con Tree Table (#15709 by @ziyoung)

#### Corrección de errores

- Table
- Corrección de algunos errores (#15709 by @ziyoung)
- Theme
- Actualización del host de la api (#15784 by @iamkun)

#### Optimización

- Tarea
- Una actualización del tipo InfiniteScroll (#15794 by @iamkun)

### 2.9.0

*2019-05-30*

#### New features
#### Nuevas características

- Backtop
- Add Backtop component (#15541 by @iamkun)
- Añadido componente Backtop (#15541 by @iamkun)
- PageHeader
- Add PageHeader component (#15714 by @ziyoung)
- Añadido el componente PageHeader (#15714 by @ziyoung)
- InfiniteScroll
- Add InfiniteScroll directive (#15567 by @iamkun)
- Añadida la directiva InfiniteScroll (#15567 by @iamkun)
- Cascader
- Add multiple mode and filter-method (#15611 by @SimonaliaChen)
- Agregado modo múltiple y método de filtro (#15611 by @SimonaliaChen)
- Message
- Display in stack mode (#15639 by @island205)
- Visualización en modo stack (#15639 by @island205)
- Tag
- Add prop effect (#15725 by @SimonaliaChen)
- Añadido prop effect (#15725 by @SimonaliaChen)
- Tabs
- Left align title when type is card (#15695 by @luckyCao)
- Alinea el título a la izquierda cuando el tipo es card (#15695 by @luckyCao)
- DatePicker
- Support literal strings (#15525 by island205)
- Soporta cadenas literales (#15525 by island205)
- Image
- Add support for transmit attrs and listeners (#15578 by @VanMess)
- Añadido soporte para transmitir attrs y listeners (#15578 by @VanMess)
- Theme
- Add popup background (#15412 by @iamkun)
- Chore
- Update new 2.9.0 index page (#15682 by @iamkun)
- Añadido fondo al popup (#15412 by @iamkun)
- Tarea
- Actualizada la nueva página de índice 2.9.0 (#15682 by @iamkun)

#### Bug fixes
#### Corrección de errores

- Table
- Fix sort-change behaviour when sort condition is null (#15012 by @joelxr)
- Corregido el comportamiento de cambio de orden cuando la condición de orden es nula (#15012 by @joelxr)
- Image
- Fix ssr and object-fit compatibility (#15346 by @SimonaliaChen)
- Corregido ssr y compatibilidad de ajuste de objetos (#15346 by @SimonaliaChen)
- Input
- Fix show-word-count style in el-form (#15359 by @lvjiaxuan)
- Fix clear icon is not centered (#15354 by @YiiGuxing)
- Corregido estilo show-word-count en el-form (#15359 by @lvjiaxuan)
- Corregido el icono de borrar que no estaba centrado (#15354 by @YiiGuxing)
- Calendar
- Fix not correct day of week when the day is Sunday (#15399 by @qingdengyue)
- Fix October disappear bug (#15394 by @qingdengyue)
- Corregido día de la semana no correcto cuando el día es domingo (#15399 by @qingdengyue)
- Corregido error de desaparición de octubre (#15394 by @qingdengyue)
- Tabs
- Fix basic tab nested in card tab padding error (#15461 by @SimonaliaChen)
- Corrección de la pestaña básica anidada en el error de relleno de la pestaña de la tarjeta (#15461 by @SimonaliaChen)
- Tag
- Fix stop propagation problem (#15150 by @infjer)
- Corregido problema de propagación de stop (#15150 by @infjer)
- Form
- Fix input-group within form-item height error (#15457 by @SimonaliaChen)
- Fix resetFields issue (15181 by @luckyCao)
- Corregido el error de grupo de entrada dentro de la altura del elemento de formulario (#15457 by @SimonaliaChen)
- Solucionado el problema de resetFields (15181 by @luckyCao)
- Tooltip
- Fix custom tabindex not work (#15619 by @SimonaliaChen )
- Corregido tabindex personalizado no funcionaba (#15619 by @SimonaliaChen )
- Link
- Fix link icon style class (#15752 by @iamkun)
- Arreglada la clase de estilo del icono de enlace (#15752 by @iamkun)
- Select
- Revert set value to null when cleared (#15447 by @iamkun)
- Revertir el valor establecido a nulo cuando se borra (#15447 by @iamkun)
- Loading
- Fix dom not change when loading state change quickly (#15123 by @FAKER-A)
- Corregido dom no cambia cuando el estado de carga cambia rápidamente (#15123 by @FAKER-A)
- Switch
- Label with el-switch repeating event (#15178 by @FAKER-A)
- Etiqueta con el evento de repetición del interruptor (#15178 by @FAKER-A)
- Slider
- Fix style problem when clicking slider bar(#15561 by @luckyCao)
- Arreglado el problema de estilo al hacer clic en la barra deslizante (#15561 by @luckyCao)
- Radio
- Fix issue 14808 (#14809 by @OverTree)
- Solucionado el problema 14808 (#14809 by @OverTree)
- Form
- Fix resetFields issue (15181 by @luckyCao)
- Chore
- Upgrade dependencies and fix demo bug (#15324 by ziyoung)
- Solucionado el problema de resetFields (15181 by @luckyCao)
- Tarea
- Se actualizaron las dependencias y se corrigió el error de demostración (#15324 by ziyoung)
- Type
- Fix loading type definition (#15635 by @iamkun)
- Fix Icon type (#15634 by @iamkun)
- Fix Link type definition (#15402 by @iamkun)
- Corregida la definición del tipo de carga (#15635 by @iamkun)
- Corregido tipo Icono (#15634 by @iamkun)
- Corregida la definición del tipo de enlace (#15402 by @iamkun)

#### Optimization
#### Optimización

- Cascader
- Refactor (#15611 by @SimonaliaChen)
- Chore
- Update make new component logic (by @iamkun)
- Docs
- Rename variable in docs (#15185 by @liupl)
- Fix image attribute type and default value (#15423 by @haoranyu)
- Fix form doc bug (#15228 by @SHERlocked93)
- Refractorización (#15611 by @SimonaliaChen)
- Tarea
- Actualización hacer nueva lógica de componentes (by @iamkun)
- Documentación
- Renombrar variable en docs (#15185 by @liupl)
- Corregido el atributo type de imagen y el valor por defecto (#15423 by @haoranyu)
- Corregido error en la doc de form (#15228 by @SHERlocked93)

### 2.8.2

Expand Down Expand Up @@ -156,7 +177,7 @@
- Arreglado el estilo del label (#14969 by @ziyoung)
- Los FormItem requeridos muestran astericos cuando el label es auto (#15144 by @ziyoung)
- Pagination
- Arreglaod que el slot no se actualizaba (#14711 by @lucyhao)
- Arreglado que el slot no se actualizaba (#14711 by @lucyhao)
- Table
- Arreglado un bug del load en el modo lazy (#15101 by @ziyoung)
- Arreglado el ancho de la celda cuando colspan es mayor que 1 (#15196 by @ziyoung)
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.fr-FR.md
@@ -1,5 +1,26 @@
## Changelog

## 2.9.1

*2019-05-30*

#### New features

- Table
- tree-props,default-expand-all, expand-row-keys, toggle-row-expansion method and expand-change event are supported in Tree Table (#15709 by @ziyoung)

#### Bug fixes

- Table
- Fix some bugs (#15709 by @ziyoung)
- Theme
- Update api host (#15784 by @iamkun)

#### Optimization

- Chore
- Update InfiniteScroll type (#15794 by @iamkun)

### 2.9.0

*2019-05-30*
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.zh-CN.md
@@ -1,5 +1,26 @@
## 更新日志

### 2.9.1

*2019-05-30*

#### 新特性

- Table
- Tree Table 支持 tree-props,default-expand-all,expand-row-keys 属性, toggle-row-expansion 方法,expand-change 事件 (#15709 by @ziyoung)

#### Bug 修复

- Table
- 修复了一些问题 (#15709 by @ziyoung)
- Theme
- 更新接口域名 (#15784 by @iamkun)

#### 优化

- Chore
- 更新 InfiniteScroll 组件定义文件 (#15794 by @iamkun)

### 2.9.0

*2019-05-30*
Expand Down
4 changes: 2 additions & 2 deletions examples/components/header.vue
Expand Up @@ -380,7 +380,7 @@
import compoLang from '../i18n/component.json';
import Element from 'main/index.js';
import themeLoader from './theme/loader';
import { getVars } from './theme/loader/api.js';
import { getTestEle } from './theme/loader/api.js';
import bus from '../bus';
import { ACTION_USER_CONFIG_UPDATE } from './theme/constant.js';
Expand Down Expand Up @@ -425,7 +425,7 @@
}
},
mounted() {
getVars()
getTestEle()
.then(() => {
this.$isEle = true;
ga('send', 'event', 'DocView', 'Inner');
Expand Down
7 changes: 6 additions & 1 deletion examples/components/theme/loader/api.js
Expand Up @@ -6,7 +6,8 @@ const { version } = Element;
const hostList = {
local: 'http://localhost:3008/',
alpha: 'https://ssr.alpha.elenet.me/element-theme-server/',
production: 'https://ssr.elenet.me/element-theme-server/'
production: 'https://ssr.ele.me/element-theme-server/',
productionEle: 'https://ssr.elenet.me/element-theme-server/'
};

const host = hostList[process.env.FAAS_ENV] || hostList.production;
Expand All @@ -15,6 +16,10 @@ export const getVars = () => {
return get(`${host}getVariable?version=${version}`);
};

export const getTestEle = () => {
return get(`${hostList.productionEle}getVariable?version=${version}`);
};

export const updateVars = (data, cb) => {
return post(`${host}updateVariable?version=${version}`, data, cb);
};
42 changes: 23 additions & 19 deletions examples/docs/en-US/table.md
Expand Up @@ -1332,19 +1332,20 @@ When the row content is too long and you do not want to display the horizontal s

### Tree data and lazy mode

:::demo You can display tree structure data. When using it, the prop `row-key` is required. Also, child row data can be loaded asynchronously. Set `lazy` property of Table to true and the function `load`. Specify `hasChildren` attribute in row to determine which row contains children.
:::demo You can display tree structure data. When row contains the `children` field, it is treated as nested data. For rendering nested data, the prop `row-key` is requiredAlso, child row data can be loaded asynchronously. Set `lazy` property of Table to true and the function `load`. Specify `hasChildren` attribute in row to determine which row contains children. Both `children` and `hasChildren` can be configured via `tree-props`.

```html
<template>
<div>
<el-table
:data="tableData"
style="width: 100%;margin-bottom: 20px;"
row-key="id"
border
row-key="id">
default-expand-all>
<el-table-column
prop="date"
label="Date"
label="date"
sortable
width="180">
</el-table-column>
Expand All @@ -1363,7 +1364,7 @@ When the row content is too long and you do not want to display the horizontal s
border
lazy
:load="load"
>
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column
prop="date"
label="Date"
Expand Down Expand Up @@ -1429,17 +1430,19 @@ When the row content is too long and you do not want to display the horizontal s
},
methods: {
load(tree, treeNode, resolve) {
resolve([
{
id: 31,
date: '2016-05-01',
name: 'wangxiaohu'
}, {
id: 32,
date: '2016-05-01',
name: 'wangxiaohu'
}
])
setTimeout(() => {
resolve([
{
id: 31,
date: '2016-05-01',
name: 'wangxiaohu'
}, {
id: 32,
date: '2016-05-01',
name: 'wangxiaohu'
}
])
}, 1000)
}
},
}
Expand Down Expand Up @@ -1825,7 +1828,7 @@ You can customize row index in `type=index` columns.
| header-cell-style | function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header | Function({row, column, rowIndex, columnIndex})/Object |||
| row-key | key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used. | Function(row)/String |||
| empty-text | Displayed text when data is empty. You can customize this area with `slot="empty"` | String || No Data |
| default-expand-all | whether expand all rows by default, only works when the table has a column type="expand" | Boolean || false |
| default-expand-all | whether expand all rows by default, works when the table has a column type="expand" or contains tree structure data | Boolean || false |
| expand-row-keys | set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop | Array || |
| default-sort | set the default sort column and order. property `prop` is used to set default sort column, property `order` is used to set default sort order | Object | `order`: ascending, descending | if `prop` is set, and `order` is not set, then `order` is default to ascending |
| tooltip-effect | tooltip `effect` property | String | dark/light | | dark |
Expand All @@ -1836,7 +1839,8 @@ You can customize row index in `type=index` columns.
| select-on-indeterminate | controls the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselected. | Boolean || true |
| indent | horizontal indentation of tree data | Number || 16 |
| lazy | whether to lazy loading data | Boolean|||
| load | method for loading child row data, only works when `lazy` is true | Function({ row, treeNode, resolve }) |||
| load | method for loading child row data, only works when `lazy` is true | Function(row, treeNode, resolve) |||
| tree-props | configuration for rendering nested data| Object || { hasChildren: 'hasChildren', children: 'children' } |

### Table Events
| Event Name | Description | Parameters |
Expand All @@ -1857,15 +1861,15 @@ You can customize row index in `type=index` columns.
| filter-change | column's key. If you need to use the filter-change event, this attribute is mandatory to identify which column is being filtered | filters |
| current-change | triggers when current row changes | currentRow, oldCurrentRow |
| header-dragend | triggers after changing a column's width by dragging the column header's border | newWidth, oldWidth, column, event |
| expand-change | triggers when user expands or collapses a row | row, expandedRows |
| expand-change | triggers when user expands or collapses a row (for expandable table, second param is expandedRows; for tree Table, second param is expanded) | row, (expandedRows \| expanded) |

### Table Methods
| Method | Description | Parameters |
|------|--------|-------|
| clearSelection | used in multiple selection Table, clear user selection ||
| toggleRowSelection | used in multiple selection Table, toggle if a certain row is selected. With the second parameter, you can directly set if this row is selected | row, selected |
| toggleAllSelection | used in multiple selection Table, toggle the selected state of all rows | - |
| toggleRowExpansion | used in expandable Table, toggle if a certain row is expanded. With the second parameter, you can directly set if this row is expanded or collapsed | row, expanded |
| toggleRowExpansion | used in expandable Table or tree Table, toggle if a certain row is expanded. With the second parameter, you can directly set if this row is expanded or collapsed | row, expanded |
| setCurrentRow | used in single selection Table, set a certain row selected. If called without any parameter, it will clear selection. | row |
| clearSort | clear sorting, restore data to the original order ||
| clearFilter | clear filters of the columns whose `columnKey` are passed in. If no params, clear all filters | columnKeys |
Expand Down

0 comments on commit 539953b

Please sign in to comment.