首先在main.js引入JS文件 --> import xxx from where将xxx挂在Vue的原型下 --> Vue.prototype.$xxx = xxx;通过this.$xxx 全局使用