1
- import { provide , inject , defineComponent , App , Plugin } from 'vue' ;
1
+ import { provide , inject , defineComponent , App , Plugin , ExtractPropTypes } from 'vue' ;
2
2
import omit from 'omit.js' ;
3
3
import PropTypes , { withUndefined } from '../_util/vue-types' ;
4
4
import classNames from '../_util/classNames' ;
@@ -33,6 +33,8 @@ export const ListGridType = {
33
33
34
34
export const ListSize = tuple ( 'small' , 'default' , 'large' ) ;
35
35
36
+ const paginationProps = PaginationConfig ( ) ;
37
+
36
38
export const ListProps = ( ) => ( {
37
39
bordered : PropTypes . looseBool ,
38
40
dataSource : PropTypes . array ,
@@ -42,7 +44,10 @@ export const ListProps = () => ({
42
44
loading : withUndefined ( PropTypes . oneOfType ( [ PropTypes . looseBool , PropTypes . object ] ) ) ,
43
45
loadMore : PropTypes . any ,
44
46
pagination : withUndefined (
45
- PropTypes . oneOfType ( [ PropTypes . shape ( PaginationConfig ( ) ) . loose , PropTypes . looseBool ] ) ,
47
+ PropTypes . oneOfType ( [
48
+ PropTypes . shape < Partial < ExtractPropTypes < typeof paginationProps > > > ( paginationProps ) . loose ,
49
+ PropTypes . looseBool ,
50
+ ] ) ,
46
51
) ,
47
52
prefixCls : PropTypes . string ,
48
53
rowKey : PropTypes . any ,
0 commit comments