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

Commit b6cbbb8

Browse files
committed
Update nav-item-dropdown.js
1 parent e918f3d commit b6cbbb8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/components/nav/nav-item-dropdown.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export const BNavItemDropdown = /*#__PURE__*/ Vue.extend({
2323
mixins: [idMixin, dropdownMixin, normalizeSlotMixin],
2424
props,
2525
computed: {
26-
buttonId() {
27-
return this.safeId('_BV_button_')
26+
toggleId() {
27+
return this.safeId('_BV_toggle_')
2828
},
2929
isNav() {
3030
// Signal to dropdown mixin that we are in a navbar
@@ -47,19 +47,19 @@ export const BNavItemDropdown = /*#__PURE__*/ Vue.extend({
4747
}
4848
},
4949
render(h) {
50-
const { buttonId, visible } = this
50+
const { toggleId, visible } = this
5151

52-
const $button = h(
52+
const $toggle = h(
5353
BLink,
5454
{
5555
staticClass: 'nav-link dropdown-toggle',
5656
class: this.toggleClasses,
5757
props: {
58-
href: this.href || `#${buttonId}`,
58+
href: this.href || `#${toggleId}`,
5959
disabled: this.disabled
6060
},
6161
attrs: {
62-
id: buttonId,
62+
id: toggleId,
6363
role: 'button',
6464
'aria-haspopup': 'true',
6565
'aria-expanded': visible ? 'true' : 'false'
@@ -85,7 +85,7 @@ export const BNavItemDropdown = /*#__PURE__*/ Vue.extend({
8585
class: this.menuClasses,
8686
attrs: {
8787
tabindex: '-1',
88-
'aria-labelledby': buttonId
88+
'aria-labelledby': toggleId
8989
},
9090
on: {
9191
keydown: this.onKeydown // Handle UP, DOWN and ESC
@@ -102,7 +102,7 @@ export const BNavItemDropdown = /*#__PURE__*/ Vue.extend({
102102
class: this.dropdownClasses,
103103
attrs: { id: this.safeId() }
104104
},
105-
[$button, $menu]
105+
[$toggle, $menu]
106106
)
107107
}
108108
})

0 commit comments

Comments
 (0)