mounted(){ // 将Vue方法传到全局对象window中 window.send = this.sendMsg; }, methods: { sendMsg(){ console.log("send...") } }
本文标题:js中调用实例化Vue中的方法
本文链接:https://www.haomeiwen.com/subject/mplcsltx.html
网友评论