wideangle-vuejs/index.js

17 lines
470 B
JavaScript
Raw Normal View History

2023-05-16 20:01:42 +00:00
import { initWideAngle } from "./dist";
import { ref } from 'vue';
export { initWideAngle } from "./dist";
export default {
install: (app, options) => {
const waaRef = ref()
2023-05-16 20:01:42 +00:00
app.provide('waa', waaRef);
2023-03-10 21:02:26 +00:00
initWideAngle(options)
2023-05-16 20:01:42 +00:00
.then(waa => {
waaRef.value = waa;
console.debug("[WAA] Wide Angle Analytics instance available");
}).catch(e => { console.error("[WAA] Failed to load Wide Angle Plugin", e)});
return waaRef;
2023-03-10 21:02:26 +00:00
}
}