【发布时间】:2018-05-29 21:46:05
【问题描述】:
类似于shinydashboard 中可用的dropdownMenu 和messageItem 函数我想在基于navbarPage 的应用程序的导航栏右侧显示消息项。此处相关函数示例:https://rstudio.github.io/shinydashboard/structure.html
我尝试将相同的功能插入到 navbarPage 应用程序中,但它没有按预期工作 - 未正确对齐。
作为一个非常基本的可重现示例,这是我的应用程序的结构,我尝试包含消息项:
library(shiny)
library(shinydashboard)
ui <- shinyUI(
navbarPage("Navbar!",
tabPanel("Plot",
sidebarLayout(
sidebarPanel(),
mainPanel()
)
),
tabPanel(
dropdownMenu(type = "messages",
messageItem(
from = "Sales Dept",
message = "Sales are steady this month."
)
)
)
)
)
server = function(input, output) { }
shinyApp(ui = ui, server = server)
【问题讨论】: