vue-cool-lightbox
Version:
A pretty Vue.js component to display an image gallery lightbox inspired by fancybox
26 lines (20 loc) • 514 B
JavaScript
import CoolLightBox from "./components/CoolLightBox.vue";
function install(Vue) {
if (install.installed) return;
install.installed = true;
Vue.component("CoolLightBox", CoolLightBox);
}
const plugin = {
install
};
let GlobalVue = null;
if (typeof window !== "undefined") {
GlobalVue = window.Vue;
} else if (typeof global !== "undefined") {
GlobalVue = global.vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
}
CoolLightBox.install = install;
export default CoolLightBox;