建立一个类,把公用函数定义的静态函数,放在components里边,即可在其他地方通过类名::函数()来进行调用。 转载于:https://www.cnblogs.com/bigpowerlz/p/3314772.html