【发布时间】:2020-03-01 08:51:52
【问题描述】:
我有一个这样的 UI 文件:
library(dplyr)
library(tidyr)
library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
library(shinythemes)
library(shinyjs)
library(flexdashboard)
library(DT)
ui <- dashboardPage(
dashboardHeader(
title = "Sales and Leads"),
#sidebar content
dashboardSidebar(
sidebarMenu(
menuItem("Breakdown by Day", tabName = "overview", icon = icon("dashboard")),
menuItem("Breakdown by Month", tabName = "borders", icon = icon("th")),
menuItem("Breakdown by Year", tabName = "sectors", icon = icon("th"))
)
),
#body content
dashboardBody(
tags$head(tags$style(HTML('
.content-wrapper, .main-body {
font-weight: normal;
font-size: 18px;
} '))),
tabItems(
#first tab content
tabItem(tabName = "overview",
fluidRow(
infoBoxOutput("DialsYesterday"),
infoBoxOutput("SalesYesterday"),
infoBoxOutput("LeadsYesterday")
)
),
#second tab content
tabItem(tabName = "borders",
fluidRow(
infoBoxOutput("DialsMonth"),
infoBoxOutput("SalesMonth"),
infoBoxOutput("LeadsMonth"))
),
#third tab content
tabItem(tabName = "sectors",
fluidRow(
infoBoxOutput("DialsYear"),
infoBoxOutput("SalesYear"),
infoBoxOutput("LeadsYear"),
fluidRow(
infoBoxOutput("DialsAll"),
infoBoxOutput("SalesAll"),
infoBoxOutput("LeadsAll"))
)
)
)
)
)
不过,当我运行代码时,出现的只是第一个输入框(“DialsYesterday”)。
我没有出现的所有其他输入。当您单击其他选项卡时,它只是一个空白。我一定做错了什么,但不确定是什么。我没有收到任何错误消息,所以这不是服务器端问题。我只是认为订单操作的构建方式有误。
【问题讨论】:
标签: r shiny shinydashboard shiny-server shinyapps