如何删除 bsmodal 上的页脚
How to remove the footer on a bsmodal
我一直在四处寻找,我发现的文档说他们向 bsmodal 函数添加了一个页脚和 button.close 参数,但它似乎不起作用。有谁知道如何删除(甚至只是更改)关闭按钮,and/or 删除 bsmodal 弹出窗口的整个页脚部分?
这是一个有效的测试应用程序。我添加了一些 css 元素,以防有人有兴趣看到应用(我在自己的实际应用程序中使用调整)
找到信息 here:如果我像示例中那样应用它,它只会在弹出窗口中打印 false。
library(shiny)
library(shinyBS)
server <- function(input, output){
}
ui <- fluidPage(
fluidRow(
actionButton(inputId = "test", label = "test", style = "background-color:red")
),
bsModal(id = "AppZoom",
title = div(HTML('<span style="color:white; font-size: 40px; font-weight:bold; font-family:sans-serif ">Zoom Factor App<span>')),
actionButton(inputId = "Abutton", label = "SOMEBUTTON", style = "background-color:red"),
trigger = "test",
size = "small",
footer = NULL, close.button = FALSE
),
tags$head(tags$style(HTML(".modal-body {padding: 10px}
.modal-content {-webkit-border-radius: 6px !important;-moz-border-radius: 6px !important;border-radius: 6px !important;}
.modal-sm { width: 380px;}
.modal-header {background-color: #3c8dbc; border-top-left-radius: 6px; border-top-right-radius: 6px}
.modal { text-align: right; padding-right: 20px; padding-top: 24px;}
.modal-dialog { display: inline-block; text-align: left; vertical-align: top;} ")))
)
shinyApp(ui = ui, server = server)
似乎要启用该功能,您需要从 GitHub 安装最新版本的 shinyBS
,使用以下方式安装:
install.packages("devtools")
devtools::install_github("ebailey78/shinyBS")
请注意,它可能是一个不稳定的版本,所以要小心。
您也可以使用 CSS 将页脚的显示 属性 设置为 'none':
bsModal('boxPopUp1', 'test','test'),
tags$head(tags$style("#boxPopUp1 .modal-footer{ display:none}"))
希望对您有所帮助!
我一直在四处寻找,我发现的文档说他们向 bsmodal 函数添加了一个页脚和 button.close 参数,但它似乎不起作用。有谁知道如何删除(甚至只是更改)关闭按钮,and/or 删除 bsmodal 弹出窗口的整个页脚部分?
这是一个有效的测试应用程序。我添加了一些 css 元素,以防有人有兴趣看到应用(我在自己的实际应用程序中使用调整)
找到信息 here:如果我像示例中那样应用它,它只会在弹出窗口中打印 false。
library(shiny)
library(shinyBS)
server <- function(input, output){
}
ui <- fluidPage(
fluidRow(
actionButton(inputId = "test", label = "test", style = "background-color:red")
),
bsModal(id = "AppZoom",
title = div(HTML('<span style="color:white; font-size: 40px; font-weight:bold; font-family:sans-serif ">Zoom Factor App<span>')),
actionButton(inputId = "Abutton", label = "SOMEBUTTON", style = "background-color:red"),
trigger = "test",
size = "small",
footer = NULL, close.button = FALSE
),
tags$head(tags$style(HTML(".modal-body {padding: 10px}
.modal-content {-webkit-border-radius: 6px !important;-moz-border-radius: 6px !important;border-radius: 6px !important;}
.modal-sm { width: 380px;}
.modal-header {background-color: #3c8dbc; border-top-left-radius: 6px; border-top-right-radius: 6px}
.modal { text-align: right; padding-right: 20px; padding-top: 24px;}
.modal-dialog { display: inline-block; text-align: left; vertical-align: top;} ")))
)
shinyApp(ui = ui, server = server)
似乎要启用该功能,您需要从 GitHub 安装最新版本的 shinyBS
,使用以下方式安装:
install.packages("devtools")
devtools::install_github("ebailey78/shinyBS")
请注意,它可能是一个不稳定的版本,所以要小心。
您也可以使用 CSS 将页脚的显示 属性 设置为 'none':
bsModal('boxPopUp1', 'test','test'),
tags$head(tags$style("#boxPopUp1 .modal-footer{ display:none}"))
希望对您有所帮助!