mirror of https://github.com/ElemeFE/element
Table: 在type="index"如果设置了label 优先显示label
parent
b788476f6f
commit
03a60995d6
|
@ -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
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue