当前位置: 首页>>代码示例>>Python>>正文


Python dash_html_components.A属性代码示例

本文整理汇总了Python中dash_html_components.A属性的典型用法代码示例。如果您正苦于以下问题:Python dash_html_components.A属性的具体用法?Python dash_html_components.A怎么用?Python dash_html_components.A使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在dash_html_components的用法示例。


在下文中一共展示了dash_html_components.A属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: display_page

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import A [as 别名]
def display_page(pathname):
    print(pathname)
    if pathname == '/':
        return html.Div([
            html.Div('You are on the index page.'),

            # the dcc.Link component updates the `Location` pathname
            # without refreshing the page
            dcc.Link(html.A('Go to page 2 without refreshing!'), href="/page-2", style={'color': 'blue', 'text-decoration': 'none'}),
            html.Hr(),
            html.A('Go to page 2 but refresh the page', href="/page-2")
        ])
    elif pathname == '/page-2':
        return html.Div([
            html.H4('Welcome to Page 2'),
            dcc.Link(html.A('Go back home'), href="/"),
        ])
    else:
        return html.Div('I guess this is like a 404 - no content available')

# app.css.append_css({"external_url": "https://codepen.io/chriddyp/pen/bWLwgP.css"}) 
开发者ID:plotly,项目名称:dash-recipes,代码行数:23,代码来源:multi_page.py

示例2: Chapter

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import A [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
    ]) 
开发者ID:plotly,项目名称:dash-docs,代码行数:22,代码来源:Chapter.py

示例3: create_td

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import A [as 别名]
def create_td(series, col):
    val = series[col]
    if col == 'Detail':
        td = html.Td(
            html.A(children='GeoJSON', href='{}'.format(val), target='_blank'))
    else:
        td = html.Td(val)
    return td 
开发者ID:jackdbd,项目名称:dash-earthquakes,代码行数:10,代码来源:app.py

示例4: user_logout

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import A [as 别名]
def user_logout(input1):
    if current_user.is_authenticated:
        return html.A('Logout', href='/logout')
    else:
        return '' 
开发者ID:RafaelMiquelino,项目名称:dash-flask-login,代码行数:7,代码来源:app.py

示例5: print_button

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import A [as 别名]
def print_button():
    printButton = html.A(['Print PDF'],className="button no-print print",style={'position': "absolute", 'top': '-40', 'right': '0'})
    return printButton

# includes page/full view 
开发者ID:timkpaine,项目名称:lantern,代码行数:7,代码来源:app.py

示例6: getHeader

# 需要导入模块: import dash_html_components [as 别名]
# 或者: from dash_html_components import A [as 别名]
def getHeader(app):
    # this is a mess;
    inlineBlock = {"display": "inline-block"}
    headerWidgets = [
        html.Button("Refresh", id='refresh-button'),
        html.Div(
            [
                html.Div("Last refresh @ ", style=inlineBlock.update({"float": "left"})),
                html.Div(datetime.datetime.now(),
                         id='last-refresh', className="showTime",
                         style=inlineBlock.update({"float": "left"})),

                html.Div("%s Start time" % app.startTime,
                         id='start-time', className="showTime",
                         style=inlineBlock.update({"float": "right"})),
                html.Br(),
                html.Center([
                    html.Div(app.epochInfo, id="current-epoch")
                    ])
            ], className="showTime")
    ]

    pageMenu = [
        html.A(html.Button("Evolution Statistics"), href="/"),
        html.A(html.Button("Evaluation Breaks"), href="/evalbreak"),
        html.A(html.Button("View Results"), href="/results")
        # html.Button("View Settings", className="unimplemented"),
        # html.Button("Inspect Population", className="unimplemented")
    ]



    # html.Link(rel='stylesheet', href='/static/promoterz_style.css'),
    header = html.Div(
        [
            html.H2(
                app.webpageTitle,
                style={'padding-top': '20', 'text-align': 'center'},
            ),
            html.Div(headerWidgets),
            html.Div(pageMenu),
        ],
        style=allStyle)

    return header 
开发者ID:Gab0,项目名称:japonicus,代码行数:47,代码来源:layout.py


注:本文中的dash_html_components.A属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。