我目前正在开发一个闪亮的应用程序。因为我没有得到预期的产出。预期输出是
但我得到的输出是
这是使用的代码
ui.R
shinyUI(
dashboardPage(
dashboardSidebar(
sidebarMenu(
id = 'MENU', badgeColor = "aqua",
menuItem('VIEW', tabName = 'view'),
menuItem('EDIT',tabName = 'edit')
)
),
dashboardBody(
tabItems(tabItem(tabName = "edit",
uiOutput("moreControls"))))
server.R
shinyServer(function(input, output, session) {
output$moreControls <- renderUI({
wellPanel(
fluidRow(column(4,wellPanel(
wellPanel("PEOPLE", style = "background-color:#0ec3c6;border-color:#0ec3c6;text-align:center;color: white;font-size: 24px;font-style: bold ;padding: 12px;"),
style ="background-color:RGB(255,255,255); border-color:RGB(255,255,255);align:right;",
textInput('email', 'Enter Email_Id'),
textInput('fn', ' Enter First Name')))))})
})
有人能帮我解决这个问题吗?提前谢谢..。
发布于 2018-10-22 22:36:05
下面的代码将为您提供所需的wellPanel
布局。注意:我没有使用您的完整代码,只是尝试实现指定的布局。因此,如果代码块解决了您的问题,就替换它。
library(shiny)
ui <- fluidPage(
wellPanel(
fluidRow(column(4,
fluidRow(wellPanel("PEOPLE", style = "background-color:#0ec3c6;border-color:#0ec3c6;text-align:center;color: white;font-size: 24px;font-style: bold ;padding: 12px;")),
style = "background-color:RGB(255,255,255); border-color:RGB(255,255,255);align:right;",
fluidRow(column(4, "Enter Email-ID"), column(8, textInput(label = NULL, inputId = 'EmailID' ))),
fluidRow(column(4, "Enter First Name"), column(8, textInput(label = NULL, inputId = 'FirstName')))))))
server <- function(input, output, session) {
onSessionEnded(stopApp)
}
shinyApp(ui, server)
https://stackoverflow.com/questions/52932726
复制相似问题