easyui列表页单独给某列加样式

$.each(baseOption.columns[0], function(i, item) {
        if (item.field == 'zzzsdqrq') {
            baseOption.columns[0][i].styler = function(value, rec, index) {
                if (value == undefined) {
                    return "";
                }
                var baseDate = new Date(value);
                var nowDate = new Date();
                var left = Math.floor((baseDate.getTime() - nowDate.getTime()) / (24 * 3600 * 1000));
                debugger;
                if (left <= 30) {
                    return 'background-color:red;';
                }
                return '';
            }
        }
    });
});

 

上一篇:达梦数据库查询数据库中所有的外键约束


下一篇:译(四十三)-Python改变DataFrame列顺序