本文整理匯總了Python中dash_html_components.Ul方法的典型用法代碼示例。如果您正苦於以下問題:Python dash_html_components.Ul方法的具體用法?Python dash_html_components.Ul怎麽用?Python dash_html_components.Ul使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dash_html_components
的用法示例。
在下文中一共展示了dash_html_components.Ul方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: build_loc_mode_hover_children
# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import Ul [as 別名]
def build_loc_mode_hover_children(loc_mode):
if loc_mode is None:
return None
loc_mode_cfg = LOC_MODE_INFO[loc_mode]
url, examples, desc = (loc_mode_cfg.get(p) for p in ["url", "examples", "desc"])
body = []
if url is not None:
body.append(
html.Div([html.Span("View", className="mr-3"), loc_mode_cfg["url"]])
)
if examples is not None:
body.append(
html.Ul(
[
html.Li(e, style={"listStyleType": "disc"}, className="mb-3")
for e in loc_mode_cfg["examples"]
],
className="pt-3 mb-0",
)
)
if desc is not None:
body.append(html.Span(desc))
return [
html.I(className="ico-help-outline", style=dict(color="white")),
html.Div(
body,
className="hoverable__content build-code",
style=dict(width="auto", whiteSpace="nowrap", left="-2em", top="auto"),
),
]
示例2: create_contents
# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import Ul [as 別名]
def create_contents(contents):
h = []
for i in contents:
if isinstance(i, list):
h.append(create_contents(i))
else:
h.append(html.Li(i))
return html.Ul(h)
示例3: Section
# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import Ul [as 別名]
def Section(title, links, description=None, headerStyle={}):
return html.Div(className='toc--section', children=[
html.H2(title, style=merge(styles['underline'], headerStyle)),
(
html.Div(description)
if description is not None else None
),
html.Ul(links, className='toc--chapters')
])
示例4: make_nav
# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import Ul [as 別名]
def make_nav(self, current_path, **kwargs):
nav_items = []
route_prefix = server.config["ROUTES_PATHNAME_PREFIX"]
for i, (path, text) in enumerate(self.nav_items):
href = get_url(path)
active = (current_path == href) or (i == 0 and current_path == route_prefix)
nav_item = dbc.NavItem(dbc.NavLink(text, href=href, active=active))
nav_items.append(nav_item)
return html.Ul(nav_items, className="navbar-nav", **kwargs)
示例5: make_header
# 需要導入模塊: import dash_html_components [as 別名]
# 或者: from dash_html_components import Ul [as 別名]
def make_header(**kwargs):
return dbc.Navbar(
id="header",
className="sticky-top",
color="dark",
dark=True,
children=[
make_brand(),
html.Ul(
id=server.config["NAVBAR_CONTAINER_ID"], className="navbar-nav ml-auto"
),
],
**kwargs,
)