哑铃glyphicon不与shinydashboard合作

时间:2016-09-16 03:28:56

标签: r shiny shinydashboard

虽然大量的字形有效,但哑铃不是其中之一。有什么想法吗?

server.r

library(shinydashboard)
shinyServer(function(input, output) {})

ui.r

dashboardPage(
      title = "O8 Trainer",
      dashboardHeader(
        title = "Train!"
      ),
      dashboardSidebar(
        sidebarMenu(
          menuItem("Trainer", 
          tabName = "trainTab", 
          icon = icon("dumbbell", lib = "glyphicon")) #"cog" works here, for instance.
        )
      )
    )

2 个答案:

答案 0 :(得分:1)

原始答案:免费图标集中没有哑铃图标

以下评论是正确的:使用icon()闪亮只允许您访问根据http://getbootstrap.com/components/#glyphicons

通过引导程序提供的任何字形编辑

答案 1 :(得分:0)

大多数答案链接到 getbootstrap.com 组件页面(包括图标小插图),但不清楚该列表在该页面上的位置。 getbootstrap.com 上的图标列表主要包含不适用于 Shiny 的图标。相反,我使用 this list 并且它们都运行良好。

在该页面上只包含图标名称的尾部。例如,对于图标名称“glyphicon glyphicon-music”,正确的闪亮代码是:

icon("music", lib = "glyphicon")