Table: 在type="index"如果设置了label 优先显示label

pull/102/head
spademan 2016-09-21 11:39:14 +08:00
parent b788476f6f
commit 03a60995d6
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ const forced = {
resizable: false resizable: false
}, },
index: { index: {
headerTemplate: function(h) { return <div>#</div>; }, // headerTemplate: function(h) { return <div>#</div>; },
headerTemplate: function(h) { return <div>{ this.$options.propsData.columns[0].label ? this.$options.propsData.columns[0].label : '#' }</div>; },
template: function(h, { row, $index }) { return <div>{ $index + 1 }</div>; }, template: function(h, { row, $index }) { return <div>{ $index + 1 }</div>; },
sortable: false sortable: false
}, },