Commit 84111a4 1 parent e6c9b42 commit 84111a4 Copy full SHA for 84111a4
File tree 3 files changed +3
-39
lines changed
3 files changed +3
-39
lines changed Original file line number Diff line number Diff line change @@ -352,12 +352,6 @@ function MyTable(props) {
352
352
} ) ;
353
353
} , [ props ] ) ;
354
354
355
- const expandData = ( ) => {
356
- setState ( {
357
- ...state ,
358
- showSize : state . showSize + 25 ,
359
- } ) ;
360
- } ;
361
355
const updateDate = ( newstate ) => {
362
356
console . log ( 'table update' , newstate ) ;
363
357
// 先获取原先的表格属性
@@ -520,39 +514,13 @@ function MyTable(props) {
520
514
// scroll={{ x: 1500, y: 300 }}
521
515
columns = { columns }
522
516
rowKey = { ( record ) => record . rank }
523
- dataSource = { data . slice ( 0 , Math . min ( showSize , data . length ) ) }
524
- pagination = { false }
517
+ dataSource = { data }
518
+ pagination = { { position : [ 'bottomRight' ] , pageSize : showSize } }
525
519
loading = { loading }
526
520
scroll = { { x : 'max-content' } }
527
521
/>
528
522
< Row style = { { marginTop : '10px' } } >
529
- < Col span = { 12 } >
530
- < Row justify = "start" >
531
- < Col >
532
- { showSize < data . length ? (
533
- < a
534
- style = { {
535
- color : '#FFCC19' ,
536
- fontSize : '18px' ,
537
- } }
538
- onClick = { expandData }
539
- >
540
- { t ( 'showMore' ) + '>>' }
541
- </ a >
542
- ) : (
543
- < span
544
- style = { {
545
- color : 'gray' ,
546
- fontSize : '18px' ,
547
- } }
548
- >
549
- { t ( 'noMore' ) }
550
- </ span >
551
- ) }
552
- </ Col >
553
- </ Row >
554
- </ Col >
555
- < Col span = { 12 } >
523
+ < Col span = { 24 } >
556
524
< Row justify = "end" >
557
525
< Col >
558
526
< QAmiss />
Original file line number Diff line number Diff line change 25
25
"activity" : " Activity" ,
26
26
"influence" : " OpenRank" ,
27
27
"details" : " Details" ,
28
- "showMore" : " show more" ,
29
- "noMore" : " no more" ,
30
28
"issue_comments" : " Issue Comments" ,
31
29
"open_issues" : " Open Issues" ,
32
30
"open_pulls" : " Open PRs" ,
Original file line number Diff line number Diff line change 25
25
"activity" : " 活跃度" ,
26
26
"influence" : " OpenRank" ,
27
27
"details" : " 详情" ,
28
- "showMore" : " 展示更多" ,
29
- "noMore" : " 没有更多啦" ,
30
28
"issue_comments" : " Issue 评论" ,
31
29
"open_issues" : " 创建 Issue" ,
32
30
"open_pulls" : " 创建 PR" ,
You can’t perform that action at this time.
0 commit comments