UNPKG

bootstrap-vue-3

Version:

Early (but lovely) implementation of Vue 3, Bootstrap 5 and Typescript

15 lines (11 loc) 372 B
import {DirectiveBinding} from 'vue' export default { mounted(el: HTMLElement, binding: DirectiveBinding): void { let target: string = binding.value if (Object.keys(binding.modifiers).length > 0) { ;[target] = Object.keys(binding.modifiers) } el.setAttribute('data-bs-toggle', 'modal') el.setAttribute('data-bs-target', `#${target}`) }, }