【问题标题】:R shiny: loading icon works in browser, but not when run in RstudioR闪亮:加载图标在浏览器中有效,但在Rstudio中运行时无效
【发布时间】:2016-10-26 00:53:24
【问题描述】:

使用下面的代码块,我在我的 Shiny 应用程序中添加了一个加载图标。但是,它仅在我在 Web 浏览器中打开应用程序时才显示图标,而不是在我仅在 Rstudio 中运行它时显示。有没有办法可以改变它,让它出现在两个界面中?

谢谢!

tagList(
    tags$head(
      tags$link(rel="stylesheet", type="text/css",href="style.css"),
      tags$script(type="text/javascript", src = "busy.js")
    )
  ),
div(class = "busy",
      p("Calculation in progress.."),
      img(src="https://media.giphy.com/media/3oEjI6SIIHBdRxXI40/giphy.gif")
  ),
plotOutput("distPlot"),

【问题讨论】:

    标签: r shiny shiny-server


    【解决方案1】:

    如果您下载图像并从本地路径访问它,它可能会起作用。我想你看到的是我不久前在 Shiny 中报告的一个错误:https://github.com/rstudio/shiny/issues/1148

    【讨论】:

    • 所以我将图像移动到本地路径,它仍然无法正常工作。如果我放了不正确的链接,甚至没有空白的 jpg 图像;在 Rstudio 中,好像 tagList 和 div 命令都不存在
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多