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
56 lines (52 loc) • 1.57 kB
JavaScript
import { NAME_TABLE } from '../../../constants/components';
import { getComponentConfig } from '../../../utils/config';
import { BTfoot } from '../tfoot';
export default {
props: {
footClone: {
type: Boolean,
default: false
},
footVariant: {
type: String,
// 'dark', 'light', or `null` (or custom)
default: function _default() {
return getComponentConfig(NAME_TABLE, 'footVariant');
}
},
footRowVariant: {
// Any Bootstrap theme variant (or custom). Falls back to `headRowVariant`
type: String // default: null
},
tfootClass: {
type: [String, Array, Object] // default: null
},
tfootTrClass: {
type: [String, Array, Object] // default: null
}
},
methods: {
renderTFootCustom: function renderTFootCustom() {
var h = this.$createElement;
if (this.hasNormalizedSlot('custom-foot')) {
return h(BTfoot, {
key: 'bv-tfoot-custom',
class: this.tfootClass || null,
props: {
footVariant: this.footVariant || this.headVariant || null
}
}, this.normalizeSlot('custom-foot', {
items: this.computedItems.slice(),
fields: this.computedFields.slice(),
columns: this.computedFields.length
}));
} else {
return h();
}
},
renderTfoot: function renderTfoot() {
// Passing true to renderThead will make it render a tfoot
return this.footClone ? this.renderThead(true) : this.renderTFootCustom();
}
}
};