diff --git a/examples/docs/en-US/table.md b/examples/docs/en-US/table.md index 1ae77b9ef..6c192e881 100644 --- a/examples/docs/en-US/table.md +++ b/examples/docs/en-US/table.md @@ -188,7 +188,7 @@ } return ''; }, - + deleteRow(index, rows) { rows.splice(index, 1); } @@ -1362,6 +1362,7 @@ Customize table column so it can be integrated with other components. | row-style | function that returns custom style for a row, or a string assigning custom style for every row | Function(row, index)/Object | — | — | | row-key | key of row data, used for optimizing rendering. Required if `reserve-selection` is on | Function(row)/String | — | — | | context | context of Table, e.g. `_self` refers to the current context, `$parent` parent context, `$root` root context, can be overridden by `context` in `el-table-column` | Object | - | current context where Table lies | +| empty-text | Displayed text when data is empty. You can customize this area with `slot="empty"` | String | | - | No Data | ### Table Events | Event Name | Description | Parameters | diff --git a/examples/docs/zh-CN/table.md b/examples/docs/zh-CN/table.md index 267e603e9..3cba1bd52 100644 --- a/examples/docs/zh-CN/table.md +++ b/examples/docs/zh-CN/table.md @@ -164,7 +164,7 @@ .el-table .positive-row { background: #e2f0e4; } - + .demo-table .name-wrapper { display: inline-block; } @@ -1196,6 +1196,7 @@ | row-style | 行的 style 的回调方法,也可以使用一个固定的 Object 为所有行设置一样的 Style。 | Function(row, index)/Object | — | — | | row-key | 行数据的 Key,用来优化 Table 的渲染;在使用 reserve-selection 功能的情况下,该属性是必填的 | Function(row)/String | — | — | | context | 设置上下文环境,例如设置当前上下文就是 `_self`,父级就是 `$parent`,根组件 `$root`。优先读取 column 的 context 属性。 | Object | - | Table 所处上下文 | +| empty-text | 空数据时显示的文本内容,也可以通过 `slot="empty"` 设置 | String | | - | 暂无数据 | ### Table Events | 事件名 | 说明 | 参数 | diff --git a/packages/table/src/table.vue b/packages/table/src/table.vue index 43dab3663..a0d2710e6 100644 --- a/packages/table/src/table.vue +++ b/packages/table/src/table.vue @@ -29,7 +29,7 @@ :style="{ width: layout.bodyWidth ? layout.bodyWidth - (layout.scrollY ? layout.gutterWidth : 0 ) + 'px' : '' }">
- {{ emptyText || t('el.table.emptyText') }} + {{ emptyText || t('el.table.emptyText') }}
-