我想在闪亮的语义页面中添加一个tabset。直接在选项卡中定义的元素显示在应用程序中,但不显示渲染对象。这是一个例子:
UI.R:
library(shiny)
shinyUI(semanticPage(
suppressDependencies("bootstrap"),
shinyjs::useShinyjs(),
tabset(tabs=
list(
list(menu="First Tab", content=
div(class="ui text shape",
div(class="sides",
div(class="ui header side active","This side starts visible."),
div(class="ui header side","This is yet another side"),
div(class="ui header side","This is the last side")
),
tags$button(id="test",class="ui button","Flip")
)),
list(menu="Second Tab",content=plotOutput("plot1"))
))
))
Server.R:
library(shiny)
library(shinyjs)
library(shiny.semantic)
library(highlighter)
jsCode <- "
$(document).ready(function() {
$('.shape').shape();
$('#test').on('click', function(){$('.shape').shape('flip up');});
});
"
shinyServer(function(input, output) {
runjs(jsCode)
output$plot1 <- renderPlot(plot(1,1))
})
此处标签中未显示渲染图“plot1”。我该如何解决这个问题?