首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Angular-slickgrid不显示自定义标题菜单项文本(只有标题菜单项图标可见)

Angular-slickgrid不显示自定义标题菜单项文本(只有标题菜单项图标可见)
EN

Stack Overflow用户
提问于 2019-11-28 19:19:26
回答 1查看 287关注 0票数 0

我在一个angular应用程序中使用了angular-slickgrid,我想在headermenu中添加更多的菜单项。下面是我使用的代码:

代码语言:javascript
复制
 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的文本:

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-11-29 13:38:02

答案很可能就在评论中。

代码语言:javascript
复制
titleKey: 'GROUP', // use "title" as plain string OR "titleKey" when using a translation key

titleKey是当你使用翻译的时候,你很可能没有那个翻译。您应该只将title与常规文本一起使用,这应该是可行的

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59087685

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档