vue3 分环境引入外部js sdk
2022-08-23 本文已影响0人
用技术改变世界
1. vue 里面 index.html 里面是读取不到node环境变量的,所以外部引入得动态创建script标签
可以在app.vue 里 const s = document.createElement('script');
s.type = 'text/javascript';
s.src = ’xxx‘;
document.body.appendChild(s);
1. vue 里面 index.html 里面是读取不到node环境变量的,所以外部引入得动态创建script标签
可以在app.vue 里 const s = document.createElement('script');
s.type = 'text/javascript';
s.src = ’xxx‘;
document.body.appendChild(s);