获取对象的key值方法 for (const keys in tipTools) { Vue.prototype[keys] = tipTools[keys] } Object.keys(global).forEach(key => { Vue.prototype[key] = global[key] });