如何从角度4中获取下面的所有类型值?
console.log('rows', this._column);
rows
0: {name: "...", type: "string", ...}
1: {name: "...", type: "string", ...}
2: {name: "...", type: "datetime", ...}
3: {name: "...", type: "string", ...}
4: {name: "...", type: "number", ...}
5: {name: "...", type: "time", ...}
答案 0 :(得分:1)
使用地图功能:
var types = this._column.map(data => data.type)
console.log('rows', types );