Commit 076d4303 authored by baiyaaaaa's avatar baiyaaaaa Committed by cinwell.li

add param to label-content render function

parent 3a774939
...@@ -142,6 +142,6 @@ Border card tabs. ...@@ -142,6 +142,6 @@ Border card tabs.
| Attribute | Description | Type | Accepted Values | Default | | Attribute | Description | Type | Accepted Values | Default |
|---------- |-------- |---------- |------------- |-------- | |---------- |-------- |---------- |------------- |-------- |
| label | title of the tab | string | — | — | | 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 | | 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' | | 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' |
...@@ -137,6 +137,6 @@ ...@@ -137,6 +137,6 @@
| 参数 | 说明 | 类型 | 可选值 | 默认值 | | 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---------- |-------- |---------- |------------- |-------- | |---------- |-------- |---------- |------------- |-------- |
| label | 选项卡标题 | string | — | — | | label | 选项卡标题 | string | — | — |
| label-content | 选项卡的标题的渲染 Function | Function(h) | - | - | | label-content | 选项卡的标题的渲染 Function | Function(h, tab:vueInstance) | - | - |
| disabled | 是否禁用 | boolean | - | false | | disabled | 是否禁用 | boolean | - | false |
| name | 与选项卡 activeName 对应的标识符,表示选项卡别名 | string | — | 该选项卡在选项卡列表中的顺序值,如第一个选项卡则为'1' | | name | 与选项卡 activeName 对应的标识符,表示选项卡别名 | string | — | 该选项卡在选项卡列表中的顺序值,如第一个选项卡则为'1' |
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
refInFor: true, refInFor: true,
on: { click: (ev) => { handleTabClick(tab, ev); } } 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, tab.isClosable ? btnClose : null,
index === 0 ? activeBar : null index === 0 ? activeBar : null
]); ]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment