一:1:在main.js中Vue.prototype.myfunction = function() {/*你的自定义Vue方法*/}2:在mounted(或其他生命周期中) 或者 methods里面的方法中直接调用 myfunction()二:1:再main.js中window.myfunctio