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);
本文标题:vue3 分环境引入外部js sdk
本文链接:https://www.haomeiwen.com/subject/cshggrtx.html
网友评论