當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。