美文网首页
vue 引入远程js方法

vue 引入远程js方法

作者: AR7_ | 来源:发表于2018-11-07 10:09 被阅读40次

只需在vue页面上,加上如下代码,然后就可以直接引用js里面的对象或者函数。

  mounted () {
    const s = document.createElement('script')
    s.type = 'text/javascript'
    s.src = 'http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js'
    document.body.appendChild(s)
  },

相关文章

网友评论

      本文标题:vue 引入远程js方法

      本文链接:https://www.haomeiwen.com/subject/yjumxqtx.html