Invalid prop: custom validator check failed for prop “pagerCount”.
at <ElPagination size=“small” current-page=4 onUpdate:currentPage=fn … >
at <List key=1 header= (5) [{…}, {…}, {…}, {…}, {…}] data= [] … >
at
at <Index onVnodeUnmounted=fn ref=Ref< Proxy(Object) {__v_skip: true} > >
at
at <Index onVnodeUnmounted=fn ref=Ref< Proxy(Object) {__v_skip: true} > >
at

错误代码

<el-pagination size="small" v-model:current-page="currentPage" v-model:page-size="pageSize"
                :page-sizes="[1, 2, 3, 5, 10, 20, 30]" :pager-count="3" background @size-change="handleSizeChange"
                @current-change="handleCurrentChange" layout="total, sizes,prev, pager, next" :total="total" />

在这里插入图片描述
参考:可选值必须要大于等于 5 且小于等于 21 的奇数

解决:将分页中:pager-count=“3”,改为最小可选值:pager-count="5"即可

Logo

欢迎加入DeepSeek 技术社区。在这里,你可以找到志同道合的朋友,共同探索AI技术的奥秘。

更多推荐