2016-09-21 101 views
-1

我的第二个按钮有时显示奇怪。任何人遇到同样的情况?任何解决方案为什么有些按钮在Shiny中显示奇怪?

enter image description here

第二个按钮是一个下载功能,编码如下:

downloadButton('downloadData', 'Export Keywords'), 

我使用下面的样式:

tags$head(
     tags$link(rel = "stylesheet", type = "text/css", href = "bootstrap.css") 
#tags$style(HTML('#run{background-color:orange}')) 
), 

我试图指定的宽度和高度在按钮类的css文件下。之后,它显示: enter image description here

我认为问题的根源在于该按钮的标签在运行时缺失。当比较的HTML代码,我发现:

<button class="btn btn-default action-button btn-success 
    shiny-bound-input" id="runButton" type="button">Run Analysis! 
    </button> 

    <a id="downloadData" class="btn btn-default shiny-download-link 
    btn-success shiny-bound-output" 
    href="downloadData?w=" target="_blank"></a> 
+0

你能提供一个删除下面的函数问题已经解决完整的可重复的例子请 –

+0

@PorkChop感谢您的评论。这个问题随机发生在我身上。有一半时间,这是正确的。所以我认为用给定的代码很难再现它。 – HappyCoding

+0

我认为您添加到运行分析中的样式可能会影响下载按钮 –

回答

0

后,我从downloadHandler()

闪亮::的validate()

相关问题