在Tabsetpanel功能中获取不同的页面

时间:2019-03-28 20:28:37

标签: r shiny

我有同一个游戏大声笑的两个应用程序,我想如果我单击“情节”之类的选项卡,我会得到此选项卡的特殊输入,我尝试了tabsetpanel,但是我在同一页面上得到了所有输入,我的代码,我没有包含服务器部分

    ui= fluidPage(theme= "bootstrap.css", 
              tabsetPanel(type = "tabs",
                          tabPanel("plot", plotOutput("plot")),
                          tabPanel("summary", verbatimTextOutput("summary"))

              ),
   # Application title
   tags$style(type="text/css",
              ".shiny-output-error { visibility: hidden; }",
              ".shiny-output-error:before { visibility: hidden; }",
              "h1 {
              text-align:center;
              color: blue; 
              }",

              "h2 {
              text-align:center;

              }"
   ),

   titlePanel(h1("League of Legends")), 
   wellPanel(
     tags$style(type="text/css", '#leftPanel { max-width:300px; float:left;}'),
     id = "leftPanel",target="plot",
   target="summary",
   selectInput(inputId = "patch",
               label = "Patch",
               choices = patches),

   selectInput(inputId = "champ1",
               label = "Champion 1",
               choices = champs),

   selectInput(inputId = "champ2",
               label = "Champion 2",
               choices = champs)),
   # Sidebar with a slider input for number of bins 
  wellPanel(
     tags$style(type="text/css", '#leftPanel { max-width:300px; float:left;}'),
     id = "leftPanel",target="Summary",
      numericInput("gdat10", "Gold difference at 10:00", 0, width="250px"),
      numericInput("gdat15", "Total gold earned at 15:00", 0, width="250px"),
      numericInput("fb", "First blood kill",0, width="250px"),
      numericInput("teamkills", "Total kills by team", 0, width="250px"),
      numericInput("teamdeaths", "Total deaths by team", 0, width="250px")

     ), 


   wellPanel(
     tags$style(type="text/css", '#RightPanel { max-width:300px; float:right;}'),
     id = "RightPanel",target=plot,
   numericInput("ft", "First tower of game killed",0, width="250px"),
      numericInput("fd", "First dragon of game killed", 0, width="250px"),
      numericInput("teamdragkills", "Total dragons killed by team", 0, width="250px"),
      numericInput("oppdragkills", "Total dragons killed by opposing team", 0, width="250px"),
      numericInput("teamtowerkills", "Total tower killed by team", 0, width="250px"),
      numericInput("opptowerkills", "Total tower killed by opposing team", 0, width="250px")

      # Show a plot of the generated distribution

),       h2(textOutput('txtOutput')), 

我的界面是什么样子 标签一: Tab plot 标签二: Tab summary

0 个答案:

没有答案