function renameKeys(obj, newKeys) { const keyValues = Object.keys(obj).map(key => { const newKey = newKeys[key] || key; return { [newKey]: obj[key] }; }); return Object.assign({}, ...keyValues); }, let newKeys = {} // 获取对象的key集合进行处理(此处是处理 大写转小写) Object.keys(object).forEach(item => { let lowItem = item.toLowerCase() this.$set(newKeys, item, lowItem ) }) let uploadObj = this.renameKeys(r.data.data[0], newKeys)