本文整理汇总了Python中dash_html_components.Li方法的典型用法代码示例。如果您正苦于以下问题:Python dash_html_components.Li方法的具体用法?Python dash_html_components.Li怎么用?Python dash_html_components.Li使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dash_html_components
的用法示例。
在下文中一共展示了dash_html_components.Li方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Chapter
# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import Li [as 别名]
def Chapter(name, href=None, caption=None):
linkComponent = html.A if href.startswith('http') else dcc.Link
return html.Div(className='toc--chapter', children=[
html.Li(
linkComponent(
name,
href=relpath(href),
id=href,
className='toc--chapter-link'
),
),
html.Small(
className='toc--chapter-content',
children=Markdown(caption or ''),
style={
'display': 'block',
'marginTop': '-10px' if caption else ''
}
) if caption else None
])
示例2: build_loc_mode_hover_children
# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import Li [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"),
),
]
示例3: create_contents
# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import Li [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)