将bspopover插入光面

将bspopover插入光面,r,shiny,R,Shiny,我想在文本“Shapefile导入”旁边插入一个BSPover。对于过滤器选项,我可以插入,正如您在下面的代码中看到的,但是对于FileInput no.可执行代码如下。 有人能帮我吗 谢谢大家! library(shinyBS) library(shiny) popoverTempate <- '<div class="popover popover-lg" role="tooltip"><div class="

我想在文本“Shapefile导入”旁边插入一个BSPover。对于过滤器选项,我可以插入,正如您在下面的代码中看到的,但是对于FileInput no.可执行代码如下。 有人能帮我吗

谢谢大家!

library(shinyBS)
library(shiny)

popoverTempate <- 
  '<div class="popover popover-lg" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'

DES_filter1<-paste("Text text text text text text.", sep = "<br>")

ui <- fluidPage(
  
  tags$head(
    tags$style(HTML(".popover.popover-lg {width: 500px; max-width: 500px;}"))
  ),
  titlePanel("Old Faithful Geyser Data"),
  
  sidebarLayout(
    sidebarPanel(
 
      fileInput("shp", h3("Shapefile import"), multiple = TRUE, accept = c('.shp', '.dbf','.sbn', '.sbx', '.shx', '.prj')),
  
      radioButtons(
        "filter1", 
        h3("Select properties"), 
        choiceValues = c(1, 2),
        choiceNames = list(
          tagList(
            tags$span("All properties"),
            tags$span(icon("info-circle"), id = "icon1", style = "color: blue;")
          ), 
          tagList(
            tags$span("Exclude properties"),
            tags$span(icon("info-circle"), id = "icon2", style = "color: blue;")
          )
        ),
        selected = 1
      ),
      
      bsPopover("icon1", "TITLE1", DES_filter1, placement = "right", 
                options = list(template = popoverTempate)), 
      bsPopover("icon2", "TITLE2", "CONTENT2", placement = "right"), 
      
      radioButtons("filter2", h3("Select"),
                   choices = list("All" = 1, 
                                  "Exclude" = 2),
                   selected = 1),
    ),
    
    mainPanel(
      
    )
  )
)

server <- function(input, output) {
  
}

shinyApp(ui = ui, server = server) 
库(shinyBS)
图书馆(闪亮)

popoverTempate您可以在
文件输入
标题中添加图标:

sidebarPanel(
    
    fileInput("shp", 
              h3(
                  span("Shapefile import"),
                  span(icon("info-circle"), id = "icon3", style = "color: blue")
                  ), 
              multiple = TRUE, 
              accept = c('.shp', '.dbf','.sbn', '.sbx', '.shx', '.prj')
              ),
    bsPopover("icon3", "TITLE3", "CONTENT3", placement = "right"),
    ...

谢谢你的回复,但是我想把“Shapefile导入”旁边的“I”图标保留在过滤器中。非常感谢!