bootstrap-vue
Version:
With more than 85 components, over 45 available plugins, several directives, and 1000+ icons, BootstrapVue provides one of the most comprehensive implementations of the Bootstrap v4 component and grid system available for Vue.js v2.6, complete with extens
28 lines (21 loc) • 635 B
JavaScript
import { extend } from '../../../vue'
import { SLOT_NAME_TABLE_COLGROUP } from '../../../constants/slots'
// --- Props ---
export const props = {}
// --- Mixin ---
// @vue/component
export const colgroupMixin = extend({
methods: {
renderColgroup() {
const { computedFields: fields } = this
const h = this.$createElement
let $colgroup = h()
if (this.hasNormalizedSlot(SLOT_NAME_TABLE_COLGROUP)) {
$colgroup = h('colgroup', { key: 'colgroup' }, [
this.normalizeSlot(SLOT_NAME_TABLE_COLGROUP, { columns: fields.length, fields })
])
}
return $colgroup
}
}
})