diff --git a/examples/routers/table.vue b/examples/routers/table.vue
index 2639c9a8..5e471454 100644
--- a/examples/routers/table.vue
+++ b/examples/routers/table.vue
@@ -1,57 +1,29 @@
-
+
+
+ 显示边框
+ 显示斑马纹
+ 显示索引
+ 显示多选框
+ 显示表头
+ 表格滚动
+
+
+ 表格尺寸
+
+ 大
+ 中
+ 小
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/table/table-body.vue b/src/components/table/table-body.vue
index a374624c..efb81834 100644
--- a/src/components/table/table-body.vue
+++ b/src/components/table/table-body.vue
@@ -7,6 +7,7 @@
-
+
|
diff --git a/src/components/table/table-head.vue b/src/components/table/table-head.vue
index aa1d69c5..563e1d7a 100644
--- a/src/components/table/table-head.vue
+++ b/src/components/table/table-head.vue
@@ -26,7 +26,7 @@
- {{ item.label }}
+ {{ item.label }}
diff --git a/src/components/table/table.vue b/src/components/table/table.vue
index 5e8cc1d5..40259411 100644
--- a/src/components/table/table.vue
+++ b/src/components/table/table.vue
@@ -44,7 +44,7 @@
:styleObject="fixedTableStyle"
:columns="leftFixedColumns"
:obj-data="objData"
- :columns-width.sync="columnsWidth"
+ :columns-width="columnsWidth"
:data="rebuildData">
@@ -95,6 +95,9 @@
const prefixCls = 'ivu-table';
+ let rowKey = 1;
+ let columnKey = 1;
+
export default {
name: 'Table',
mixins: [ Locale ],
@@ -562,7 +565,10 @@
},
makeData () {
let data = deepCopy(this.data);
- data.forEach((row, index) => row._index = index);
+ data.forEach((row, index) => {
+ row._index = index;
+ row._rowKey = rowKey++;
+ });
return data;
},
makeDataWithSort () {
@@ -629,6 +635,7 @@
columns.forEach((column, index) => {
column._index = index;
+ column._columnKey = columnKey++;
column._width = column.width ? column.width : ''; // update in handleResize()
column._sortType = 'normal';
column._filterVisible = false;