-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 修复AntdMenu在AntdSider内部时受折叠切换状态时显示异常的问题
- Loading branch information
Showing
4 changed files
with
79 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
if True: | ||
import sys | ||
|
||
sys.path.append('../../../') | ||
from dash import Dash | ||
import feffery_antd_components as fac | ||
|
||
app = Dash(__name__) | ||
|
||
app.layout = fac.AntdLayout( | ||
[ | ||
fac.AntdSider( | ||
[ | ||
fac.AntdMenu( | ||
menuItems=[ | ||
{ | ||
'component': 'Item', | ||
'props': { | ||
'key': f'图标{icon}', | ||
'title': f'图标{icon}', | ||
'icon': icon, | ||
}, | ||
} | ||
for icon in [ | ||
'antd-home', | ||
'antd-cloud-upload', | ||
'antd-bar-chart', | ||
'antd-pie-chart', | ||
'antd-dot-chart', | ||
'antd-line-chart', | ||
'antd-apartment', | ||
'antd-app-store', | ||
'antd-app-store-add', | ||
'antd-bell', | ||
'antd-calculator', | ||
'antd-calendar', | ||
'antd-database', | ||
'antd-history', | ||
] | ||
], | ||
mode='inline', | ||
style={ | ||
'height': '100%', | ||
'width': '100%', | ||
'overflow': 'hidden auto', | ||
}, | ||
) | ||
], | ||
collapsible=True, | ||
collapsedWidth=60, | ||
style={'backgroundColor': 'rgb(240, 242, 245)'}, | ||
), | ||
fac.AntdContent( | ||
fac.AntdCenter( | ||
fac.AntdTitle( | ||
'内容区示例', | ||
level=2, | ||
style={'margin': '0'}, | ||
), | ||
style={ | ||
'height': '100%', | ||
}, | ||
), | ||
style={'backgroundColor': 'white'}, | ||
), | ||
], | ||
style={'height': '100vh'}, | ||
) | ||
|
||
if __name__ == '__main__': | ||
app.run(debug=True) |