发光的UI无法读取仪表板格式

问题描述 投票:0回答:1

我有一个看起来像这样的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”)。

我没有显示的所有其他输入。当您单击其他选项卡时,它只是空白。我一定在做错事,但是不确定。我没有收到任何错误消息,所以这不是服务器端的问题。我只是认为我的订单操作与其构建方式有误。

enter image description here

r shiny shinydashboard shiny-server shinyapps
1个回答
0
投票

嗨,我已经根据您的UI代码进行了尝试,因为您没有提供足够的代码来重现该代码。这是我的代码,它工作正常。您可以根据需要进行更改。

© www.soinside.com 2019 - 2024. All rights reserved.