Closed velvetflame closed 1 year ago
problem solved by useing mounted block, special thanks to qiqqq provided solution .
import in vue component (share from stackoverflow)
<script>
export default {
name: "yourComponent",
mounted() {
const scriptEl = document.createElement("script");
scriptEl.setAttribute(
"src",
"https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-360-view/latest/js-cloudimage-360-view.min.js?func=proxy"
);
scriptEl.async = true;
document.head.appendChild(scriptEl);
}
}
</script>
i added script tag with CDN link in index.html, but the code in vue templete didn't render functional. Is any idea how to import this js properly?
index.html
myVueComponent.vue