我有以下应用程序:
library(bslib)
library(shiny)
id <- "hi"
ns <- NS(id)
page_navbar(
id = ns("navbar"),
title = "Example App",
sidebar = sidebar(
id = ns("sidebar"),
open = "open"
),
nav_panel(
title = "Overview",
h1("Overview")),
nav_panel(
title = "Table",
h1("table"))
)
)
我想在右侧添加第二个(关闭的)侧边栏。根据可能链接的文档page_fillable()
,当我坚持时,我的方法不会让我走上正确的轨道page_navbar
。有什么提示吗?
我的做法:
page_navbar(
layout_sidebar(
sidebar = sidebar("Left sidebar"),
layout_sidebar(
sidebar = sidebar("Right sidebar", position = "right", open = FALSE),
)
),
nav_panel(
title = "Overview",
h1("Overview")),
nav_panel(
title = "Table",
h1("table"))
)
)
看起来不可能 with
page_navbar
,但你可以得到一些接近的东西navset_underline
。