File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
dash-fastapi-frontend/callbacks Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ def check_api_response(data):
2828
2929# api拦截器——退出登录二次确认
3030@app .callback (
31- Output ('redirect-container' , 'children' , allow_duplicate = True ),
31+ [Output ('redirect-container' , 'children' , allow_duplicate = True ),
32+ Output ('token-container' , 'data' , allow_duplicate = True )],
3233 Input ('token-invalid-modal' , 'okCounts' ),
3334 prevent_initial_call = True
3435)
@@ -41,10 +42,11 @@ def redirect_page(okCounts):
4142 dcc .Location (
4243 pathname = '/login' ,
4344 id = 'index-redirect'
44- )
45+ ),
46+ None
4547 ]
4648
47- return dash .no_update
49+ return [ dash .no_update ] * 2
4850
4951
5052# 应用初始化主题颜色
Original file line number Diff line number Diff line change 4545
4646# 退出登录回调
4747@app .callback (
48- Output ('redirect-container' , 'children' , allow_duplicate = True ),
48+ [Output ('redirect-container' , 'children' , allow_duplicate = True ),
49+ Output ('token-container' , 'data' , allow_duplicate = True )],
4950 Input ('logout-modal' , 'okCounts' ),
5051 prevent_initial_call = True
5152)
@@ -60,9 +61,10 @@ def logout_confirm(okCounts):
6061 pathname = '/login' ,
6162 id = 'index-redirect'
6263 ),
64+ None
6365 ]
6466
65- return dash .no_update
67+ return [ dash .no_update ] * 2
6668
6769
6870# 全局页面重载回调
You can’t perform that action at this time.
0 commit comments