-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
88 additions
and
3 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
85 changes: 85 additions & 0 deletions
85
tests/dataDisplay/AntdTable/fix_summary_multi_level_header.py
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,85 @@ | ||
if True: | ||
import sys | ||
|
||
sys.path.append('../../../') | ||
import dash | ||
from dash import html | ||
import feffery_antd_components as fac | ||
|
||
app = dash.Dash(__name__) | ||
|
||
app.layout = html.Div( | ||
[ | ||
fac.AntdTable( | ||
columns=[ | ||
{ | ||
'title': '字段1', | ||
'dataIndex': '字段1', | ||
}, | ||
{ | ||
'title': '字段2', | ||
'dataIndex': '字段2', | ||
}, | ||
{ | ||
'title': '字段3', | ||
'dataIndex': '字段3', | ||
'group': '组1', | ||
}, | ||
{ | ||
'title': '字段4', | ||
'dataIndex': '字段4', | ||
'group': '组1', | ||
}, | ||
{ | ||
'title': '字段5', | ||
'dataIndex': '字段5', | ||
}, | ||
{ | ||
'title': '字段6', | ||
'dataIndex': '字段6', | ||
}, | ||
], | ||
data=[ | ||
{ | ||
f'字段{i}': f'示例内容{i}' | ||
for i in range(1, 7) | ||
} | ||
] | ||
* 5, | ||
bordered=True, | ||
summaryRowContents=[ | ||
{'content': '第1列总结', 'align': 'center'}, | ||
{ | ||
'content': '第2到3列总结', | ||
'colSpan': 2, | ||
'align': 'center', | ||
}, | ||
{'content': '第4列总结', 'align': 'center'}, | ||
{ | ||
'content': '第5到6列总结', | ||
'colSpan': 2, | ||
'align': 'center', | ||
}, | ||
{'content': 'xxx', 'align': 'center'}, | ||
{ | ||
'content': 'xxx', | ||
'colSpan': 2, | ||
'align': 'center', | ||
}, | ||
{'content': 'xxx', 'align': 'center'}, | ||
{ | ||
'content': 'xxx', | ||
'colSpan': 2, | ||
'align': 'center', | ||
}, | ||
], | ||
rowSelectionType='radio', | ||
summaryRowBlankColumns=1, | ||
), | ||
], | ||
style={'padding': 100}, | ||
) | ||
|
||
|
||
if __name__ == '__main__': | ||
app.run(debug=True) |