案例效果

针对一个功能做数据已读未读的标识

实现思路

  1. 勾选功能配置中“启用修改标记”配置项

  2. 注册需标记字段的列内容格式化事件(renderer),编写代码,例如用案例编号作为标记字段

操作步骤

1. 勾选功能配置中“启用修改标记”配置项

2. 注册需标记字段的列内容格式化事件(renderer),编写代码,例如用案例编号作为标记字段

相关代码

function(value,metaData,record,rowIndex,colIndex,store,view){
    var grid = this,
    column = grid.columnManager.getHeaderAtIndex(colIndex);//当前列
    //找到编辑列
    var funcedit = record.get("SY_FUNCEDIT");
    //如果编辑列状态为0,则是未读否则是已读
    if(funcedit=='0'){
        return '<div style="width: 10px;height: 10px;background: #b0adad;border-radius: 100%;display:inline-block;margin-right:5px;"></div>'+value;
    }else{
        return '<div style="width: 10px;height: 10px;background: red;border-radius: 100%;display:inline-block;margin-right:5px;"></div>'+value;
    }
}

关键字,相关问题

  • 已读未读
  • 列表数据
最后编辑: 呼丽华  文档更新时间: 2024-03-05 11:49   作者:呼丽华