R flash中的页面刷新按钮

我尝试在链接 here之后实现页面刷新按钮.但是当我在shinyapp.io中累积部署时,它失败并要求安装我已经完成的v8.该应用程序在机器上正常工作.我用过的电路是

jsResetCode <- "shinyjs.reset = function() {history.go(0)}",useShinyjs(),# Include shinyjs in the UI
 extendShinyjs(text = jsResetCode),`                      # Add the js code to the page


 p(actionButton("reset_button","Reset Tool"))

服务器

observeEvent(input$reset_button,{js$reset()})

有没有办法做没有shinejs的thios?

解决方法

为了完整,下面的代码是一个使用“刷新”按钮的工作Shiny应用程序的最小示例

library(shiny)
library(shinyjs)

jscode <- "shinyjs.refresh = function() { history.go(0); }"

ui <- fluidPage(
  useShinyjs(),extendShinyjs(text = jscode),textInput("text","Text"),actionButton("refresh","Refresh app")
)

server <- function(input,output,session) {
  observeEvent(input$refresh,{
    js$refresh();
  })
}

shinyApp(ui = ui,server = server)

编辑:从闪亮版本0.13.0开始,可以使用Shiny的session $reload()函数刷新页面

相关文章

  译序:JWMediaPlayer是开源的网页使用的Flash播放器。本...
    Flash编程原理都是只能将1写为0,而不能将0写成1.所...
 上传setenvgatewayip192.168.1.1;setenvserverip192.168.1...
Error:FlashDownloadFailed-"Cortex-M3"出现一般有...
jPlayer是一个用于控制和播放mp3文件的jQuery插件。它在后台...
#ifndef__FONTUPD_H__#define__FONTUPD_H__#include"sy...