11import Vue from '../../utils/vue'
2- import { props as BDropdownProps } from '../dropdown/dropdown'
3- import idMixin from '../../mixins/id'
4- import dropdownMixin from '../../mixins/dropdown'
5- import normalizeSlotMixin from '../../mixins/normalize-slot'
62import pluckProps from '../../utils/pluck-props'
73import { htmlOrText } from '../../utils/html'
4+ import dropdownMixin from '../../mixins/dropdown'
5+ import idMixin from '../../mixins/id'
6+ import normalizeSlotMixin from '../../mixins/normalize-slot'
7+ import { props as BDropdownProps } from '../dropdown/dropdown'
88import { BLink } from '../link/link'
99
10- // -- Constants --
11-
10+ // --- Props ---
1211export const props = pluckProps (
1312 [ 'text' , 'html' , 'menuClass' , 'toggleClass' , 'noCaret' , 'role' , 'lazy' ] ,
1413 BDropdownProps
1514)
1615
16+ // --- Main component ---
1717// @vue /component
1818export const BNavItemDropdown = /*#__PURE__*/ Vue . extend ( {
1919 name : 'BNavItemDropdown' ,
@@ -41,16 +41,13 @@ export const BNavItemDropdown = /*#__PURE__*/ Vue.extend({
4141 }
4242 } ,
4343 render ( h ) {
44- const button = h (
44+ const $ button = h (
4545 BLink ,
4646 {
4747 ref : 'toggle' ,
4848 staticClass : 'nav-link dropdown-toggle' ,
4949 class : this . toggleClasses ,
50- props : {
51- href : '#' ,
52- disabled : this . disabled
53- } ,
50+ props : { disabled : this . disabled } ,
5451 attrs : {
5552 id : this . safeId ( '_BV_button_' ) ,
5653 'aria-haspopup' : 'true' ,
@@ -68,7 +65,8 @@ export const BNavItemDropdown = /*#__PURE__*/ Vue.extend({
6865 h ( 'span' , { domProps : htmlOrText ( this . html , this . text ) } )
6966 ]
7067 )
71- const menu = h (
68+
69+ const $menu = h (
7270 'ul' ,
7371 {
7472 staticClass : 'dropdown-menu' ,
@@ -84,14 +82,15 @@ export const BNavItemDropdown = /*#__PURE__*/ Vue.extend({
8482 } ,
8583 ! this . lazy || this . visible ? this . normalizeSlot ( 'default' , { hide : this . hide } ) : [ h ( ) ]
8684 )
85+
8786 return h (
8887 'li' ,
8988 {
9089 staticClass : 'nav-item b-nav-dropdown dropdown' ,
9190 class : this . dropdownClasses ,
9291 attrs : { id : this . safeId ( ) }
9392 } ,
94- [ button , menu ]
93+ [ $ button, $ menu]
9594 )
9695 }
9796} )
0 commit comments