File tree Expand file tree Collapse file tree 5 files changed +76
-6
lines changed Expand file tree Collapse file tree 5 files changed +76
-6
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { OptionProps } from 'rc-select/es/Option';
33import  KEYCODE  from  'rc-util/lib/KeyCode' ; 
44import  classNames  from  'classnames' ; 
55import  React  from  'react' ; 
6- import  type  {  PaginationLocale ,  PaginationProps  }  from  './interface' ; 
6+ import  type  {  PaginationLocale ,  PaginationProps  }  from  '.. /interface' ; 
77
88interface  InternalSelectProps  extends  SelectProps  { 
99  /** 
Original file line number Diff line number Diff line change 1- /* eslint react/prop-types: 0 */ 
21import  classNames  from  'classnames' ; 
32import  React  from  'react' ; 
4- import  type  {  PaginationProps  }  from  './interface' ; 
3+ import  type  {  PaginationProps  }  from  '.. /interface' ; 
54
65export  interface  PagerProps  extends  Pick < PaginationProps ,  'itemRender' >  { 
76  rootPrefixCls : string ; 
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import KeyCode from 'rc-util/lib/KeyCode';
44import  pickAttrs  from  'rc-util/lib/pickAttrs' ; 
55import  warning  from  'rc-util/lib/warning' ; 
66import  React ,  {  useEffect  }  from  'react' ; 
7- import  type  {  PaginationProps  }  from  './interface' ; 
8- import  zhCN  from  './locale/zh_CN' ; 
7+ import  type  {  PaginationProps  }  from  '.. /interface' ; 
8+ import  zhCN  from  '.. /locale/zh_CN' ; 
99import  Options  from  './Options' ; 
1010import  type  {  PagerProps  }  from  './Pager' ; 
1111import  Pager  from  './Pager' ; 
Original file line number Diff line number Diff line change 1+ import  React  from  'react' ; 
2+ import  type  {  PaginationProps  }  from  '../interface' ; 
3+ 
4+ const  Simple : React . FC < PaginationProps >  =  ( { 
5+   locale, 
6+   prefixCls, 
7+   current, 
8+   allPages, 
9+   disabled, 
10+   internalInputVal, 
11+   handleKeyDown, 
12+   handleKeyUp, 
13+   handleBlur, 
14+   handleGoTO, 
15+   goButton, 
16+   showTitle, 
17+ } )  =>  { 
18+   const  isReadOnly  =  typeof  simple  ===  'object'  ? simple . readOnly  : ! simple ; 
19+   let  gotoButton : any  =  goButton ; 
20+ 
21+   if  ( goButton )  { 
22+     if  ( typeof  goButton  ===  'boolean' )  { 
23+       gotoButton  =  ( 
24+         < button  type = "button"  onClick = { handleGoTO }  onKeyUp = { handleGoTO } > 
25+           { locale . jump_to_confirm } 
26+         </ button > 
27+       ) ; 
28+     }  else  { 
29+       gotoButton  =  ( 
30+         < span  onClick = { handleGoTO }  onKeyUp = { handleGoTO } > 
31+           { goButton } 
32+         </ span > 
33+       ) ; 
34+     } 
35+ 
36+     gotoButton  =  ( 
37+       < li 
38+         title = { showTitle  ? `${ locale . jump_to } ${ current }  /${ allPages }  `  : null } 
39+         className = { `${ prefixCls }  -simple-pager` } 
40+       > 
41+         { gotoButton } 
42+       </ li > 
43+     ) ; 
44+   } 
45+ 
46+   return  ( 
47+     < li 
48+       title = { showTitle  ? `${ current }  /${ allPages }  `  : null } 
49+       className = { `${ prefixCls }  -simple-pager` } 
50+     > 
51+       { isReadOnly  ? ( 
52+         internalInputVal 
53+       )  : ( 
54+         < input 
55+           type = "text" 
56+           value = { internalInputVal } 
57+           disabled = { disabled } 
58+           onKeyDown = { handleKeyDown } 
59+           onKeyUp = { handleKeyUp } 
60+           onChange = { handleKeyUp } 
61+           onBlur = { handleBlur } 
62+           size = { 3 } 
63+         /> 
64+       ) } 
65+       < span  className = { `${ prefixCls }  -slash` } > /</ span > 
66+       { allPages } 
67+     </ li > 
68+   ) ; 
69+ } ; 
70+ 
71+ export  default  Simple ; 
Original file line number Diff line number Diff line change 1- export  {  default  }  from  './Pagination' ; 
1+ export  {  default  }  from  './components/ Pagination' ; 
22export  type  {  PaginationLocale ,  PaginationProps  }  from  './interface' ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments