UNPKG

bootstrap-vue

Version:

Quickly integrate Bootstrap 4 components with Vue.js

45 lines (43 loc) 1.11 kB
import PopOver from '../../utils/popover.class'; import { warn } from '../../utils'; import { toolpopMixin } from '../../mixins'; 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; } } };