UNPKG

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

38 lines (35 loc) 951 B
import Vue, { mergeData } from '../../vue' import { NAME_NAV_FORM } from '../../constants/components' import { omit } from '../../utils/object' import { BForm, props as BFormProps } from '../form/form' export const props = { ...omit(BFormProps, ['inline']), formClass: { type: [String, Array, Object] // default: null } } // @vue/component export const BNavForm = /*#__PURE__*/ Vue.extend({ name: NAME_NAV_FORM, functional: true, props, render(h, { props, data, children, listeners = {} }) { const attrs = data.attrs // The following data properties are cleared out // as they will be passed to BForm directly data.attrs = {} data.on = {} const $form = h( BForm, { class: props.formClass, props: { ...props, inline: true }, attrs, on: listeners }, children ) return h('li', mergeData(data, { staticClass: 'form-inline' }), [$form]) } })