如何解决使用shinydashboard的框功能时扩展符号被截断
我有一个仪表板,里面有一个可折叠的盒子,效果很好,但出于某种原因,当盒子折叠时,+
符号被切断(见下文)。有谁知道如何解决这个问题?
## app.R ##
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),dashboardSidebar(),dashboardBody(
Box(id = "tableBox",collapsible = TRUE,collapsed = F,width = "100%",height = "100%","Taco Bell is an American-based chain of fast food restaurants originating in Irvine,California in 1962,by founder Glen Bell. Taco Bell is a
subsidiary of Yum! Brands,Inc. The restaurants serve a variety of Mexican-inspired foods,that include: tacos,burritos,quesadillas,nachos,novelty and specialty items,along with a variety of value menu items. As of 2018,Taco Bell serves over two billion customers each year,at
7,072 restaurants,more than 93 percent of which are owned and operated by independent franchisees and licensees.")
)
)
server <- function(input,output) { }
shinyApp(ui,server)
解决方法
一个可能的解决方法是更改 box()
生成的 html 代码,搜索
## app.R ##
library(shiny)
library(shinydashboard)
box_html <-
'<div class="col-sm-100%">
<div class="box" style="height: 100%">
<div class="box-header" style="height: 40px; width: 50; pxtext-align: right;border: 0;">
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse">
<i class="fa fa-minus" role="presentation" aria-label="minus icon" style="size:10px"></i>
</button>
</div>
</div>
<div class="box-body" id="tableBox">Taco Bell is an American-based chain of fast food restaurants originating in Irvine,California in 1962,by founder Glen Bell. Taco Bell is a
subsidiary of Yum! Brands,Inc. The restaurants serve a variety of Mexican-inspired foods,that include: tacos,burritos,quesadillas,nachos,novelty and specialty items,along with a variety of value menu items. As of 2018,Taco Bell serves over two billion customers each year,at
7,072 restaurants,more than 93 percent of which are owned and operated by independent franchisees and licensees.</div>
</div>
</div>'
ui <- dashboardPage(
dashboardHeader(),dashboardSidebar(),dashboardBody(
uiOutput('box')))
server <- function(input,output) {
output$box <- renderUI({
tagList(
HTML(box_html)
)
})
}
shinyApp(ui,server)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。