我正在尝试获取menuItem的徽章以根据服务器上的某些条件进行更新。
这是针对我自己的闪亮应用程序,当我当前未查看菜单项中的错误时,我想通知我
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Split app code across multiple files"),
dashboardSidebar(
sidebarMenu(
id ="menu",
menuItem("Dashboard", tabName = "dashboard",icon = icon("dashboard")),
menuItem("Widgets", tabName = "widgets",icon = icon("th"),
badgeLabel = "new", badgeColor = "green")),
menuItem("Help", tabName = "help", icon = icon("question"))
)
),
),
dashboardBody(
tabItems(
# include the UI for each tab
source(file.path("ui", "tab1.R"), local = T)$value,
source(file.path("ui", "tab2.R"), local = T)$value
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui = ui, server = server)