1 实例一: 2 { field: ‘status‘, align: ‘center‘, title: ‘活动状态‘, templet: function (d) { 4 if (d.status == "1") { 5 return "<span class=‘btnNot‘ style=‘background: rgba(13,185,51,0.72); padding: 6px; border-radius: 3px; color: #ffffff;‘>已发布</span>"; 6 } else { 7 return "<span class=‘btnNot‘ style=‘background: rgba(0,0,0,0.37); padding: 6px; border-radius: 3px; color: #ffffff;‘>未发布</span>"; 8 } 9 } 10 }//返回的是发布|未发布的状态;
原文地址:https://www.cnblogs.com/yangguoe/p/8949894.html
时间: 2024-10-15 04:31:31