1

我正在尝试在使用包 bs4Dash 的闪亮仪表板中添加一个外部 URL,但是当我单击它时,它们没有响应。我有类似下面的例子。newTab = FALSE使用或不起作用newTab = TRUE。我是否遗漏了什么,或者这是它应该表现的方式?

# NOT RUN {
## Only run this example in interactive R sessions
if (interactive()) {
  library(shiny)
  library(bs4Dash)
  
  # A dashboard header with 3 dropdown menus
  header <- dashboardHeader(
    title = "My dashboard"
  )
  
  sidebar <- dashboardSidebar(
    sidebarMenu(
      menuItem("My menu L1", href = "https://rinterface.github.io/bs4Dash/", newTab = FALSE),
      menuItem("My menu L2",
        menuSubItem("My submenu 1", href = "https://rinterface.github.io/bs4Dash/", newTab = TRUE)
      )
    )
  )
  
  shinyApp(
    ui = dashboardPage(
      header,
      sidebar,
      dashboardBody()
    ),
    server = function(input, output) { }
  )
}
# }
4

0 回答 0