嗨,我需要一个 Jmeter 板页脚的可见性是一些数字的条件。 这段代码很好,只是参数
fixed = TRUE`(来自bs4DashFooter)不起作用。
library(shiny)
library(bs4Dash)
library(reactable)
ui = dashboardPage(
header = dashboardHeader(),
sidebar = dashboardSidebar(
sidebarMenu(id = "mmm",
menuItem("Dashboard Tab 1", tabName = "tab1"),
menuItem("Dashboard Tab 2", tabName = "tab2")
)),
footer = uiOutput("f"),
body = dashboardBody(
tabItems(
tabItem(
tabName = "tab1",
h6(("tab 1 content"), style="text-align: center;"),
reactableOutput(outputId = "t")),
tabItem(
tabName = "tab2",
h6("tab 2 content"), style="text-align: center;")
)
)
)
server = function(input, output, session) {
a <- reactiveValues(q = 3)
output$f <- renderUI({
if (as.numeric(isolate(reactiveValuesToList(a)))[1] > 2){
bs4DashFooter(
right = "some foot",
fixed = TRUE)
}
})
output$t <- renderReactable({
reactable(mtcars,
defaultPageSize = 50)})
}
shinyApp(ui, server)
有人能帮忙吗
1条答案
按热度按时间h9vpoimq1#
您可以执行以下操作:
在UI和服务器中: