【问题标题】:How to add a link to Browse button shiny app如何添加链接到浏览按钮闪亮的应用程序
【发布时间】:2020-05-09 06:31:56
【问题描述】:

我想知道如何将“示例文件”添加到闪亮应用程序的“浏览”按钮中,以便很好地对齐? 我找到了使用 tags$ .... 的示例,但链接与浏览器按钮未正确对齐。我的结果:

我想要这样:

我的代码:

tags$a(href ="data/INPUT.txt",
       target="_blank",
       "EXAMPLE_test"), 

fileInput(inputId  = "InputFile",
          label    = "Choose File",
          multiple = TRUE,
          accept   = c("text",
                       "text/comma-separated-values,text/plain",
                       ".txt") )

感谢任何帮助。 谢谢。

【问题讨论】:

    标签: css shiny text-alignment


    【解决方案1】:

    我希望这是你想要达到的目标。

    ui <- shinyUI(fluidPage(
      fileInput(inputId  = "InputFile",
                label    = tags$a(href = "data/INPUT.txt",
                                  target = "_blank",
                                  "EXAMPLE_test"),
                multiple = TRUE,
                accept   = c("text",
                             "text/comma-separated-values,text/plain",
                             ".txt") )
    )
    )
    

    【讨论】:

    • 谢谢,这正是我想要的。
    猜你喜欢
    • 2020-08-22
    • 1970-01-01
    • 2017-07-27
    • 2021-11-19
    • 2015-06-15
    • 1970-01-01
    • 2013-07-04
    • 2014-10-04
    • 2019-10-27
    相关资源
    最近更新 更多