You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
411 B
20 lines
411 B
1 month ago
|
from dash.dependencies import Input, Output
|
||
|
|
||
|
from server import app
|
||
|
|
||
|
|
||
|
# url-pathname控制currentKey回调
|
||
|
app.clientside_callback(
|
||
|
'''
|
||
|
(data) => {
|
||
|
if (data) {
|
||
|
return data['current_key'];
|
||
|
}
|
||
|
return window.dash_clientside.no_update;
|
||
|
}
|
||
|
''',
|
||
|
Output('index-side-menu', 'currentKey'),
|
||
|
Input('current-key-container', 'data'),
|
||
|
prevent_initial_call=True
|
||
|
)
|