bootstrap-vue-next
Version:
BootstrapVueNext is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.
44 lines (43 loc) • 1.75 kB
JavaScript
import "vue";
import { r as resolveActiveStatus, a as resolveContent, b as bind, c as resolveDirectiveProps, u as unbind } from "../../../floatingUi-kZrrCabB.mjs";
import { d as defaultsKey } from "../../../keys-CFfh7DXf.mjs";
const vBPopover = {
mounted(el, binding) {
var _a, _b, _c, _d;
const defaults = (_d = (_c = (_b = (_a = binding.instance) == null ? void 0 : _a.$.appContext) == null ? void 0 : _b.provides) == null ? void 0 : _c[defaultsKey]) == null ? void 0 : _d.value;
const isActive = resolveActiveStatus(binding.value);
if (!isActive) return;
const text = resolveContent(binding.value, el);
if (!text.content && !text.title) return;
el.$__binding = JSON.stringify([binding.modifiers, binding.value]);
bind(el, binding, {
...defaults["BPopover"] || {},
...resolveDirectiveProps(binding, el),
...text
});
},
updated(el, binding) {
var _a, _b, _c, _d;
const defaults = (_d = (_c = (_b = (_a = binding.instance) == null ? void 0 : _a.$.appContext) == null ? void 0 : _b.provides) == null ? void 0 : _c[defaultsKey]) == null ? void 0 : _d.value;
const isActive = resolveActiveStatus(binding.value);
if (!isActive) return;
const text = resolveContent(binding.value, el);
if (!text.content && !text.title) return;
delete binding.oldValue;
if (el.$__binding === JSON.stringify([binding.modifiers, binding.value])) return;
unbind(el);
bind(el, binding, {
...defaults["BPopover"] || {},
...resolveDirectiveProps(binding, el),
...text
});
el.$__binding = JSON.stringify([binding.modifiers, binding.value]);
},
beforeUnmount(el) {
unbind(el);
}
};
export {
vBPopover
};
//# sourceMappingURL=index.mjs.map