add param to label-content render function

pull/1876/head
baiyaaaaa 2016-12-20 11:48:24 +08:00 committed by cinwell.li
parent 3a774939ef
commit 076d4303f7
3 changed files with 3 additions and 3 deletions

View File

@ -142,6 +142,6 @@ Border card tabs.
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------- |---------- |------------- |-------- |
| label | title of the tab | string | — | — |
| label-content | render function for tab title | Function(h) | - | - |
| label-content | render function for tab title | Function(h, tab:vueInstance) | - | - |
| disabled | whether Tab is disabled | boolean | - | false |
| name | identifier corresponding to the activeName of Tabs, representing the alias of the tab-pane | string | — | ordinal number of the tab-pane in the sequence, i.e. the first tab-pane is '1' |

View File

@ -137,6 +137,6 @@
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---------- |-------- |---------- |------------- |-------- |
| label | 选项卡标题 | string | — | — |
| label-content | 选项卡的标题的渲染 Function | Function(h) | - | - |
| label-content | 选项卡的标题的渲染 Function | Function(h, tab:vueInstance) | - | - |
| disabled | 是否禁用 | boolean | - | false |
| name | 与选项卡 activeName 对应的标识符,表示选项卡别名 | string | — | 该选项卡在选项卡列表中的顺序值,如第一个选项卡则为'1' |

View File

@ -119,7 +119,7 @@
refInFor: true,
on: { click: (ev) => { handleTabClick(tab, ev); } }
}, [
tab.labelContent ? tab.labelContent.call(this._renderProxy, h) : tab.label,
tab.labelContent ? tab.labelContent.call(this._renderProxy, h, tab) : tab.label,
tab.isClosable ? btnClose : null,
index === 0 ? activeBar : null
]);