浏览代码

Table: Render `default` slot in `table-column` to get a correct `columnRows`

lirilsu 7 年之前
父节点
当前提交
0ca040fb42
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/table/src/table-column.js

+ 1 - 1
packages/table/src/table-column.js

@@ -181,7 +181,7 @@ export default {
 
 
   created() {
   created() {
     this.customRender = this.$options.render;
     this.customRender = this.$options.render;
-    this.$options.render = h => h('div');
+    this.$options.render = h => h('div', this.$slots.default);
     this.columnId = (this.$parent.tableId || (this.$parent.columnId + '_')) + 'column_' + columnIdSeed++;
     this.columnId = (this.$parent.tableId || (this.$parent.columnId + '_')) + 'column_' + columnIdSeed++;
 
 
     let parent = this.$parent;
     let parent = this.$parent;