UNPKG

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.

49 lines (47 loc) 1.14 kB
import PopOver from '../../utils/popover.class'; import warn from '../../utils/warn'; import toolpopMixin from '../../mixins/toolpop'; export default { mixins: [toolpopMixin], render: function render(h) { return h('div', { class: ['d-none'], style: { display: 'none' }, attrs: { 'aria-hidden': true } }, [h('div', { ref: 'title' }, this.$slots.title), h('div', { ref: 'content' }, this.$slots.default)]); }, data: function data() { return {}; }, props: { title: { type: String, default: '' }, content: { type: String, default: '' }, triggers: { type: [String, Array], default: 'click' }, placement: { type: String, default: 'right' } }, methods: { createToolpop: function createToolpop() { // getTarget is in toolpop mixin var target = this.getTarget(); if (target) { this._toolpop = new PopOver(target, this.getConfig(), this.$root); } else { this._toolpop = null; warn("b-popover: 'target' element not found!"); } return this._toolpop; } } };