vue单文件组件如何引入CDN文件
发布于 7 年前 作者 archie 5529 次浏览 最后一次编辑是 7 年前 来自 问答
粉丝福利 : 关注VUE中文社区公众号,回复视频领取粉丝福利

问题

之前在html中直接用script标签就可引入CDN文件,但是在vue单文件组件(.vue)中如何引入呢。还有类似于腾讯公益404 这样的代码如何使用?

这样的例子很多,比如网易云音乐的外链:

<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=501467216&auto=1&height=66"></iframe>

比如心知天气的API

<script type="text/javascript" src="https://api.seniverse.com/v3/weather/now.json?location=beijing&ts=1443079775&ttl=30&uid=[your_uid]&sig=[your_signature]&callback=showWeather"></script>
回到顶部