🌐 AI搜索 & 代理 主页
Skip to content

Commit c541d3d

Browse files
andrewvasilchukjacobmllr95tmorehouse
authored
feat(b-tabs): add ability to provide custom tab button attributes (closes: #4803) (#4806)
Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com> Co-authored-by: Troy Morehouse <troymore@nbnet.nb.ca>
1 parent 5a2253c commit c541d3d

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/components/tabs/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@
162162
"prop": "titleLinkClass",
163163
"description": "CSS class (or classes) to apply to the tab's control button inner link element"
164164
},
165+
{
166+
"prop": "titleLinkAttributes",
167+
"version": "2.6.0",
168+
"description": "Attributes to apply to the tab's control button inner link element"
169+
},
165170
{
166171
"prop": "noBody",
167172
"description": "When the parent b-tabs has the 'card' prop set, do not render a card-body wrapper"

src/components/tabs/tab.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ export const BTab = /*#__PURE__*/ Vue.extend({
3939
type: [String, Array, Object],
4040
default: null
4141
},
42+
titleLinkAttributes: {
43+
type: Object,
44+
default: null
45+
},
4246
disabled: {
4347
type: Boolean,
4448
default: false

src/components/tabs/tabs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ const BTabButtonHelper = /*#__PURE__*/ Vue.extend({
115115
],
116116
props: { disabled: this.tab.disabled },
117117
attrs: {
118+
...this.tab.titleLinkAttributes,
118119
role: 'tab',
119120
id: this.id,
120121
// Roving tab index when keynav enabled

0 commit comments

Comments
 (0)