Получить разные страницы в функции Tabsetpanel - PullRequest
0 голосов
/ 28 марта 2019

У меня есть два приложения одной и той же игры LoL, я хочу, если я нажимаю на вкладку типа «сюжет», я получаю входные данные специально для этой вкладки, я пробовал 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

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...