let list = res.data
let arr = [];
//替换属性
list.forEach( (item, index) => {
var object = {};
object.label = item.classdata; // 展示label
object.value = item.classdata; // value
//object.extra = res.data[i].dictCode; // 传递额外的参数
arr.push(object);
})
this.options = arr;
console.log(this.options)
网友评论