@@ -11,6 +11,7 @@ import VcPagination from '../vc-pagination';
11
11
import enUS from '../vc-pagination/locale/en_US' ;
12
12
import classNames from '../_util/classNames' ;
13
13
import useConfigInject from '../_util/hooks/useConfigInject' ;
14
+ import useBreakpoint from '../_util/hooks/useBreakpoint' ;
14
15
15
16
export const paginationProps = ( ) => ( {
16
17
total : Number ,
@@ -43,6 +44,7 @@ export const paginationProps = () => ({
43
44
} ) => any
44
45
> ,
45
46
role : String ,
47
+ responsive : Boolean ,
46
48
showLessItems : { type : Boolean , default : undefined } ,
47
49
onChange : Function as PropType < ( page : number , pageSize : number ) => void > ,
48
50
onShowSizeChange : Function as PropType < ( current : number , size : number ) => void > ,
@@ -82,6 +84,7 @@ export default defineComponent({
82
84
const selectPrefixCls = computed ( ( ) =>
83
85
configProvider . getPrefixCls ( 'select' , props . selectPrefixCls ) ,
84
86
) ;
87
+ const breakpoint = useBreakpoint ( ) ;
85
88
const [ locale ] = useLocaleReceiver ( 'Pagination' , enUS , toRef ( props , 'locale' ) ) ;
86
89
const getIconsProps = ( pre : string ) => {
87
90
const ellipsis = < span class = { `${ pre } -item-ellipsis` } > •••</ span > ;
@@ -132,10 +135,11 @@ export default defineComponent({
132
135
itemRender = slots . itemRender ,
133
136
buildOptionText = slots . buildOptionText ,
134
137
selectComponentClass,
138
+ responsive,
135
139
...restProps
136
140
} = props ;
137
141
138
- const isSmall = size === 'small' ;
142
+ const isSmall = size === 'small' || ! ! ( breakpoint . value ?. xs && ! size && responsive ) ;
139
143
const paginationProps = {
140
144
...restProps ,
141
145
...getIconsProps ( prefixCls . value ) ,
0 commit comments