我尝试使用post =“%”将%添加到滑块栏中的值,但它不会在滑块栏下方的刻度中添加%。请帮我将%添加到滑块栏下面的值。
library(shiny)
library(shinydashboard)
ui <- dashboardPage(skin = "black",
dashboardHeader(title = "test"),
dashboardSidebar(
sidebarMenu(
menuItem("Complete", tabName = "comp"))),
dashboardBody(
tabItems(
tabItem(tabName = "comp",
fluidRow(
sliderInput("range_var", "", value = 1, min = 1, max = 10, width = '100%', post = " %")
)))))
server <- function(input, output, session) {
}
shinyApp(ui, server)
谢谢, SJB
答案 0 :(得分:2)
您可以使用一些CSS手动添加%
:
dashboardBody(
tags$style(type = "text/css", ".irs-grid-text:after {content: '%';}"),
tabItems(...)
...
)