vue引用网络js


 1 export default {
 2   components: {
 3     "remote-js": {
 4       render(createElement) {
 5         return createElement("script", {
 6           attrs: { type: "text/javascript", src: this.src }
 7         });
 8       },
 9       props: {
10         src: { type: String, required: true }
11       }
12     }
13   }
14 };
<remote-js src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></remote-js>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM