在 ExtJS 网格中,actioncolumn我希望根据行中的数据(实际上,在行的特定列中)具有不同的图标/工具提示。
getClass和getTip回调的第一个参数是v,在文档中描述为:
列的配置字段的值(如果有)。
我已经定义了我actioncolumn的如下,使用dataIndex属性指定“配置字段”:
{
xtype: "actioncolumn",
flex: 0.25,
dataIndex: "action_name", // Defines which field should be passed in as v, below
getClass: function(v, metadata, r, rowIndex, colIndex, store) {
// v is "", yet r.get("action_name") is "Capture Fill"
}
});
在getClass回调中,我可以通过 访问 *action_name* 字段的值r.get("action_name"),但 v 是""。
我在这里做错了什么?