我在闪亮仪表板的标题上放置了一个操作按钮,它会自动打开默认邮件应用程序并填充 To: 行。但是,当我调整按钮大小时,可折叠侧边栏标题和主标题会错位(请参阅下图以获取参考)。
此外,我在 SO 中查看了这些帖子:
但是,关注他们并没有为我的问题提供足够的帮助。这是代表:
library(shiny)
library(shinydashboard)
library(shinyjs)
library(shinydashboardPlus)
library(htmltools)
library(DT)
ui <- shinydashboardPlus::dashboardPage(
options = list(sidebarExpandOnHover = TRUE),
header = shinydashboardPlus::dashboardHeader(disable = FALSE,
tags$li(class = "dropdown",
tags$a(actionButton(inputId = "email1", label = "",
icon = icon("envelope", lib = "font-awesome")
,
style='height: 20px; width: 30px;
margin-top: 0px; margin-right: 0px;
margin-bottom: 0px; padding:4px 4px 20px 4px;'
),
href="mailto:my_awesome_email_address.com")),
title = tagList(
tags$span(
class = "logo-mini", "small"
),
tags$span(
class = "logo-lg", "LONGER TEXT"
)
)),
sidebar = shinydashboardPlus::dashboardSidebar(
minified= TRUE,
collapsed = TRUE,
sidebarMenu(
),
tags$script(JS("document.getElementsByClassName('sidebar-toggle')[0].style.visibility = 'hidden';"))
),
body = shinydashboard::dashboardBody(
tabItems(
tabItem(tabName = "mainPanel_1",
box(
)
)
),
controlbar = NULL,
footer = NULL
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
任何帮助或提示将不胜感激。