layui表格嵌套对象无法提取,如何解决?
templet: function (d) {
if (d.col01.status == "1") {
return '<a href="/inout"><span style="color: #c00;" >' + d.col01.name + '</span></a>'
} else if (d.col01.status == "2") {
return '<a href="/inout"><span style="color: #47db11;" >' + d.col01.name + '</span></a>'
}
return '<span style="color: #081702;" >' + d.col01.name + '</span>'
}
@Data
public class Cargo {
private Long id;
private String name;
private String status;
}
@Data
public class SerialVo {
private Long id;
private Cargo col01;
private Cargo col02;
private Cargo col03;
private Cargo col04;
private Cargo col05;
private Cargo col06;
private Cargo col07;
private Cargo col08;
private Cargo col09;
private Cargo col10;
private Cargo col11;
private Cargo col12;
private Cargo col13;
private Cargo col14;
private Cargo col15;
private Cargo col16;
private Cargo col17;
private Cargo col18;
private Cargo col19;
private Cargo col20;
}