.vue文件使用script引入外部js文件
created() {let arr = ['//y.gtimg.cn/music/h5/player/player.js?max_age=2592000','//static9.pplive.cn/cloud_platform/ppKit/release/js/player/v5/v_20180426102601/player.min.js','//g.a...
·
created() {
let arr = ['//y.gtimg.cn/music/h5/player/player.js?max_age=2592000',
'//static9.pplive.cn/cloud_platform/ppKit/release/js/player/v5/v_20180426102601/player.min.js',
'//g.alicdn.com/de/prismplayer/2.8.2/aliplayer-h5-min.js',
'//player.alicdn.com/aliplayer/presentation/js/aliplayercomponents.min.js',
'//g.alicdn.com/de/prismplayer/2.8.2/aliplayer-h5-min.js'];
arr.map((item) => {
let script = document.createElement('script');
script.type = 'text/javascript';
script.src = item;
document.getElementsByTagName('body')[0].appendChild(script);
});
},
更多推荐
已为社区贡献33条内容
所有评论(0)