vue--自定义全局方法,在组件里面使用

在main.js里进行全局注册

Vue.prototype.funcName = function (){}

在所有组件里可调用

this.funcName();

猜你喜欢

转载自blog.csdn.net/qq_26522773/article/details/79358796