import {myfun} from '../static/js/test.js' //se6的正确写法
export default {
methods:{
diyfun:function () {
myfun();
}
}

Vue.prototype.funcName = function (){}
this.funcName();

vue 自定义全局方法,在组件里面的使用介绍 https://www.jb51.net/article/135674.htm

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
猜你喜欢
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
相关资源
相似解决方案