I'm having problem with Vue 3 element-plus el-pagination, i have this warning:
ElementPlusError: [ElPagination] Deprecated usages detected, please refer to the el-pagination documentation for more details
ElementPlusError error.ts:4
debugWarn error.ts:13
setup pagination.ts:211
renderComponentRoot runtime-core.esm-bundler.js:876
componentUpdateFn runtime-core.esm-bundler.js:5995
run reactivity.esm-bundler.js:176
update runtime-core.esm-bundler.js:6126
setupRenderEffect runtime-core.esm-bundler.js:6136
mountComponent runtime-core.esm-bundler.js:5904
error.ts:14:12
My code works but can't find the reason of this showing. Tried what element-plus have on their website but without success, when i remove page size related options, warning dissapears.
<el-pagination
@size-change="changePerPage"
@current-change="changeCurrentPage"
:current-page="currentPage"
:page-size="per_page"
:page-sizes="[5, 10, 20]"
layout="total, sizes, prev, pager, next"
:total="usersData.total"
class="mt-2 border p-2"
/>
const currentPage = ref(1);
const per_page = ref(5)
function changeCurrentPage(val: any) {
currentPage.value = val
search()
};
function changePerPage(val: any) {
per_page.value = val
search()
};
onBeforeMount(async () => {
search()
})