部分代碼如下
這里我是想根據字段的不同去顯示一個標簽,標簽再添加一些其他的點擊等等。
1 table.render({ 2 3 cols:[ 4 5 {fixed:'right',title:'訂單軌跡',width:150,templet:function(data){ 6 if(data.XXX== "xx") 7 { 8 return ""; 9 }else 10 { 11 return '<a id="XXX" class="XXX" lay-event="">訂單軌跡</a>' 12 } 13 14 } 15 } 16 ] 17 })