用于刷新页面的 Dash 应用程序 Python 按钮

Eri*_*und 7 python plotly-dash

是否有可能在 Dash (Python) 中为按钮编写回调函数以重新加载页面(例如浏览器中的更新按钮?

app.layout =html.Div([
            html.Button(id="refresh"),
            ])

@app.callback(Output('???', '???'),
              [Input('refresh', 'n_clicks')])
def refresh(n):

?
return
?
Run Code Online (Sandbox Code Playgroud)

Eri*_*und 8

解决了!

html.A(html.Button('Refresh Data'),href='/'),
Run Code Online (Sandbox Code Playgroud)