File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 11611161 <h2 >Modal</h2 >
11621162 <b-button @click =" showModal = !showModal" > Toggle modal v-model </b-button >
11631163 {{ showModal }}
1164- <!-- <b-button v-b-modal:exampleModal>Launch demo modal</b-button> -->
1165- <b-modal id =" exampleModal" v-model =" showModal" size =" xl" title =" Modal title" fade >
1166- ...
1167- </b-modal >
1164+ <b-button v-b-modal =" 'exampleModal'" >Launch demo modal (value)</b-button >
1165+ <b-button v-b-modal.exampleModal >Launch demo modal </b-button >
1166+ <b-modal id =" exampleModal" size =" xl" title =" Modal title" fade > ... </b-modal >
11681167 </div >
11691168
11701169 <!-- <b-nav pills>
Original file line number Diff line number Diff line change @@ -2,7 +2,13 @@ import {DirectiveBinding} from 'vue'
22
33export default {
44 mounted ( el : HTMLElement , binding : DirectiveBinding ) : void {
5+ let target : string = binding . value
6+
7+ if ( Object . keys ( binding . modifiers ) . length > 0 ) {
8+ ; [ target ] = Object . keys ( binding . modifiers )
9+ }
10+
511 el . setAttribute ( 'data-bs-toggle' , 'modal' )
6- el . setAttribute ( 'data-bs-target' , `#${ binding . arg } ` )
12+ el . setAttribute ( 'data-bs-target' , `#${ target } ` )
713 } ,
814}
You can’t perform that action at this time.
0 commit comments