微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

改变下拉菜单闪亮

如何解决改变下拉菜单闪亮

在下面的应用程序中,有没有办法删除数字 3(基本上,我们可以删除显示在那里的数字)?那里只需要显示消息框

library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(dropdownMenu(type = "messages",messageItem(
                                 from = "Sales Dept",message = "Sales are steady this month."
                               ),messageItem(
                                 from = "New User",message = "How do I register?",icon = icon("question"),time = "13:45"
                               ),messageItem(
                                 from = "Support",message = "The new server is ready.",icon = icon("life-ring"),time = "2014-12-01"
                               )
  )),dashboardSidebar(),dashboardBody()
)

server <- function(input,output,session) {
  
}

shinyApp(ui,server)

result

解决方法

不确定我是否正确理解您的问题,但我想这就是您想要的?

library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(dropdownMenu(type = "messages",messageItem(
                                 from = "Sales Dept",message = "Sales are steady this month."
                               ),messageItem(
                                 from = "New User",message = "How do I register?",icon = icon("question"),time = "13:45"
                               ),messageItem(
                                 from = "Support",message = "The new server is ready.",icon = icon("life-ring"),time = "2014-12-01"
                               )
  )),dashboardSidebar(),dashboardBody(
                tags$script(HTML(
                  "document.querySelector('body > div.wrapper > header > nav > div > ul > li > a > span').style.visibility = 'hidden';"
                ))
                )
)

server <- function(input,output,session) {}

shinyApp(ui,server)

result

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。