我在用
invalidateLater(5000, session)
在我的闪亮代码中,它正在工作。每隔5秒钟,我就会刷新一次查询并更新一个图。但是屏幕和图每5秒钟变灰一次,因此在进行更新时页面似乎已死。有没有一种方法可以使地块仅更新并让页面避免看起来像已经死了?
@JOhn-谢谢你,这是我的ui.r
shinyUI(pageWithSidebar(
headerPanel("tst"),
sidebarPanel(
sliderInput("n", "Number of plots", value=2, min=1, max=7),
width = 2
),
mainPanel(
# This is the dynamic UI for the plots
uiOutput("plots")
)
))
谢谢你。
问题是,当更新某些内容时,默认的.css为它提供了类,.recalculating
而这就是使其看起来为灰色的原因。您可以通过以下方法解决此问题
tags$style(type="text/css",
".recalculating { opacity: 1.0; }"
)
ui.r
如果.css
您正在使用一个,则将其放入您的设备或将其放入其中。显然,如果您了解CSS,也可以尝试其他想法。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句