我在一个angular应用程序中使用了angular-slickgrid,我想在headermenu中添加更多的菜单项。下面是我使用的代码:
column.header = {
menu: {
items: [
// add Custom Header Menu Item Commands at the bottom of the already existing internal custom items
// you cannot override an internal command but you can hide them and create your own
// also note that the internal custom commands are in the positionOrder range of 50-60,
// if you want yours at the bottom then start with 61, below 50 will make your command(s) on top
{
iconCssClass: 'fa fa-question-circle',
disabled: (column.id === 'effort-driven'), // you can disable a command with certain logic
titleKey: 'GROUP', // use "title" as plain string OR "titleKey" when using a translation key
command: 'group',
positionOrder: 61
}
]
}
};在运行应用程序时,只有图标可见,没有附加上述标题text item.Screen shot的文本:

发布于 2019-11-29 13:38:02
答案很可能就在评论中。
titleKey: 'GROUP', // use "title" as plain string OR "titleKey" when using a translation keytitleKey是当你使用翻译的时候,你很可能没有那个翻译。您应该只将title与常规文本一起使用,这应该是可行的
https://stackoverflow.com/questions/59087685
复制相似问题