mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-02 12:18:46 +08:00
Table: update Chinese doc (#13177)
This commit is contained in:
parent
3a1ee202a4
commit
cf42b5444e
@ -227,20 +227,20 @@
|
||||
}],
|
||||
tableData7: [{
|
||||
date: '2016-05-02',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1518 弄'
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: 'John',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1517 弄'
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: 'Morgan',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1519 弄'
|
||||
}, {
|
||||
date: '2016-05-03',
|
||||
name: 'Jessy',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1516 弄'
|
||||
}],
|
||||
currentRow: null,
|
||||
multipleSelection: [],
|
||||
@ -1666,10 +1666,11 @@
|
||||
```
|
||||
:::
|
||||
|
||||
### Table with custom header
|
||||
### 自定义表头
|
||||
|
||||
Customize table header so it can be even more customized.
|
||||
:::demo You can customize how the header looks by [Default slot content](https://vuejs.org/v2/guide/components-slots.html#Default-Slot-Content).
|
||||
表头支持自定义。
|
||||
|
||||
:::demo 通过设置 [Scoped slot](https://cn.vuejs.org/v2/guide/components-slots.html#%E4%BD%9C%E7%94%A8%E5%9F%9F%E6%8F%92%E6%A7%BD) 来自定义表头。
|
||||
```html
|
||||
<template>
|
||||
<el-table
|
||||
@ -1710,20 +1711,20 @@ Customize table header so it can be even more customized.
|
||||
return {
|
||||
tableData: [{
|
||||
date: '2016-05-02',
|
||||
name: 'Tom',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1518 弄'
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: 'John',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1517 弄'
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: 'Morgan',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1519 弄'
|
||||
}, {
|
||||
date: '2016-05-03',
|
||||
name: 'Jessy',
|
||||
address: 'No. 189, Grove St, Los Angeles',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1516 弄'
|
||||
}],
|
||||
search: ''
|
||||
}
|
||||
@ -2200,4 +2201,4 @@ Customize table header so it can be even more customized.
|
||||
| name | 说明 |
|
||||
|------|--------|
|
||||
| — | 自定义列的内容,参数为 { row, column, $index } |
|
||||
| header | Custom content for table header. The scope parameter is { column, $index } |
|
||||
| header | 自定义表头的内容. 参数为 { column, $index } |
|
@ -296,7 +296,7 @@ export default {
|
||||
|
||||
// Deprecation warning for renderHeader property
|
||||
if (this.renderHeader) {
|
||||
console.warn('[Element Warn][Table Column] Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.');
|
||||
console.warn('[Element Warn][TableColumn]Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.');
|
||||
}
|
||||
|
||||
this.columnConfig = column;
|
||||
@ -451,7 +451,7 @@ export default {
|
||||
|
||||
if (this.$scopedSlots.header) {
|
||||
if (this.type === 'selection') {
|
||||
console.warn('[Element Warn][TableColumn] Selection column doesn\'t allow to set scoped-slot header.');
|
||||
console.warn('[Element Warn][TableColumn]Selection column doesn\'t allow to set scoped-slot header.');
|
||||
} else {
|
||||
this.columnConfig.renderHeader = this.$scopedSlots.header;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user