Has anybody got this into a vue 3 ts / vite app and was able to control it?
<script setup lang="ts" >
const vMyDirective: any = {
beforeMount: (el: any) => {
let foo = document.createElement('script');
foo.setAttribute("type", "text/javascript");
foo.setAttribute("charset", "utf-8");
foo.setAttribute("src", "/src/assets/countUp.hyperesources/countup_hype_generated_script.js?64669");
foo.setAttribute("data-transaction-amount", "14.90")
el.append(foo)
console.log('el', el)
}
}
</script>
<template>
<div
v-my-directive
id="countup_hype_container"
class="HYPE_document"
style="margin:auto;position:relative;width:600px;height:400px;overflow:hidden;"
></div>
</template>