1

Rshiny 中的罐装包为任何基本的 Rshiny 应用程序提供了一个普通的外观。更高级的用户可能会选择HTML 模板。我为 Rshiny UI 遇到的罐头包是Shiny DashboardShiny Material DesignFlex dashboard。但是,为什么不能调用仪表板页面然后有闪亮的材料设计按钮、输入或卡片,反之亦然?

是什么阻止他们集成和使用cross 来定制应用程序?

类似于以下代码的内容(未按预期运行)

library(shinydashboard)
library(shiny)
library(shinymaterial)
ui <- dashboardPage(dashboardHeader(),
                    dashboardSidebar(material_row(
                      material_column(
                        width = 2,
                        material_card(
                          title = "",
                          depth = 4,
                          material_switch(
                            input_id = "trend_line",
                            label = "Trend Line",
                            off_label = "",
                            on_label = ""
                          ),
                          material_radio_button(
                            input_id = "plot_theme",
                            label = "Theme",
                            choices =
                              c(
                                "Default" = "default",
                                "Classic" = "classic",
                                "Light" = "light",
                                "Dark" = "dark"
                              )
                          )
                        )
                      )
                    )),
                    dashboardBody())

server <- function(input, output) {

}
shinyApp(ui, server)
4

1 回答 1

1

这似乎是一个当前无法混合和匹配的问题,因为 shinymaterial 中使用的一些 CSS 样式表与其他包的样式表重叠,例如一些基本的闪亮输入或 htmlwidgets(参见此处)。

于 2018-03-24T22:21:21.563 回答