0
我創建了一個閃亮的應用「側邊欄」如下:「shinydashboard」是用包「shinydashboard」不顯示項目正確的
library(shinydashboard)
library(shiny)
sidebar <- dashboardSidebar(
sidebarMenu(id="tabs",
menuItem("ABC", tabName="ABC", icon=icon("line-chart"), selected=TRUE),
menuItem("ABC1", tabName="ABC1", icon=icon("line-chart"), selected=FALSE)
),
conditionalPanel("input.tabs == 'ABC'",
fluidRow(
column(11, offset = 1, h5((' Note')))
)
),
conditionalPanel("input.tabs == 'ABC1'",
fluidRow(
column(11, offset = 1, style = "height:20px; color:rgb(30,144,255);", h1((' Update')))
)
))
body <- dashboardBody(
tabItems(
tabItem(tabName = "ABC",br())
),
tabItems(
tabItem(tabName = "ABC1",br())
)
)
ui = dashboardPage(
dashboardHeader(title = "ABC"),
sidebar,
body
)
server = function(input, output){}
shinyApp(ui = ui, server = server)
不過,我已經注意到的是,當我運行的應用程序一個奇怪的行爲,最初「input.tabs =='ABC'」中的註釋'Note'是不可見的。但是,當我點擊「input.tabs =='ABC1'」,然後點擊「ABC」時,「註釋」註釋變得可見。
有人能指出我在上面的代碼中出錯的地方嗎?
任何幫助將不勝感激。
感謝,
一切對我的作品。我在'閃亮'版本1.0.3和'shinydashboard'版本0.5.3 –
嗨,我正在使用Shiny&shinydashboard的最新版本,如下所示。 > packageVersion('shiny') [1]'1.0.3' > packageVersion('shinydashboard') [1]'0.6.0' – Bogaso