UNPKG

bootstrap-vue

Version:

BootstrapVue, with over 40 plugins and more than 80 custom components, custom directives, and over 300 icons, provides one of the most comprehensive implementations of Bootstrap v4 components and grid system for Vue.js. With extensive and automated WAI-AR

20 lines (18 loc) 741 B
import { hasNormalizedSlot, normalizeSlot } from '../utils/normalize-slot' import { concat } from '../utils/array' export default { methods: { hasNormalizedSlot(names) { // Returns true if the either a $scopedSlot or $slot exists with the specified name // `names` can be a string name or an array of names return hasNormalizedSlot(names, this.$scopedSlots, this.$slots) }, normalizeSlot(names, scope = {}) { // Returns an array of rendered VNodes if slot found. // Returns undefined if not found. // `names` can be a string name or an array of names const vNodes = normalizeSlot(names, scope, this.$scopedSlots, this.$slots) return vNodes ? concat(vNodes) : vNodes } } }