在main.js中

// 引入封装好的js文件的路径
import aa from './***/***/***'

// 把全局js挂接到vue原型上    
Vue.prototype.$aa = aa

例子

Vue.prototype.backBefor = () => {
    window.history.back(-1)
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
猜你喜欢
  • 2021-11-05
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
相关资源
相似解决方案