console.log(res); this.optionsEp = res.map(item => { return { value: item.id, label: item.name }; });
效果:
数组对象用map修改键名
原文:https://www.cnblogs.com/lpp-11-15/p/11904761.html