bootstrap-vue
Version:
BootstrapVue provides one of the most comprehensive implementations of Bootstrap 4 components and grid system for Vue.js and with extensive and automated WAI-ARIA accessibility markup.
30 lines (27 loc) • 565 B
JavaScript
import { mergeData } from 'vue-functional-data-merge'
export const props = {
disabled: {
type: Boolean,
default: false
}
}
export default {
functional: true,
props,
render (h, { props, data, parent, children }) {
return h(
'button',
mergeData(data, {
props,
staticClass: 'dropdown-item',
attrs: { role: 'menuitem', type: 'button', disabled: props.disabled },
on: {
click (e) {
parent.$root.$emit('clicked::link', e)
}
}
}),
children
)
}
}