【发布时间】:2018-01-02 03:20:48
【问题描述】:
我一直在环顾四周,我发现的文档说他们为 bsmodal 函数添加了页脚和 button.close 参数,但它似乎不起作用。有人知道如何删除(甚至只是更改)关闭按钮,和/或删除 bsmodal 弹出窗口的整个页脚部分吗?
这是一个有效的测试应用。我添加了一些 css 元素,以防有人有兴趣看到它的应用(我在自己的实际应用中使用了这些调整)
Info was found 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.com/ebailey78/shinyBS/blob/shinyBS3/R/bsModal.R
-
我做到了,并没有变得更聪明。我试图复制该代码并对其进行修改以创建我自己的 bsModal2 函数,但这会吐出一个关于未找到最后一个 html 依赖项的错误。
-
您是从 github 安装最新版本还是从 CRAN 安装?
标签: r shiny bootstrap-modal shinybs