import{$ as e}from"./element-plus-DSMJnpwa.js";import{p as t,d as o}from"./index-mv7arXuk.js";/* empty css               *//* empty css                  */import{B as a,aI as n,H as i,L as l,R as u,M as r,k as s,u as d,c as p}from"./vue-vendor-DZekML78.js";const c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},m=(e,t,o)=>{const a=document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop,n=e-a;let i=0;t=void 0===t?500:t;const l=function(){i+=20;const e=(o=i,u=a,r=n,(o/=t/2)<1?r/2*o*o+u:-r/2*(--o*(o-2)-1)+u);var o,u,r,s;s=e,document.documentElement.scrollTop=s,document.body.parentNode.scrollTop=s,document.body.scrollTop=s,i<t&&c(l)};l()},g=a({name:"Pagination"}),f=o(a({...g,props:{total:t.number,page:t.number.def(1),limit:t.number.def(20),pageSizes:{type:Array,default:()=>[10,20,30,50]},pagerCount:t.number.def(document.body.clientWidth<992?5:7),layout:t.string.def("total, sizes, prev, pager, next, jumper"),background:t.bool.def(!0),autoScroll:t.bool.def(!0),hidden:t.bool.def(!1),float:t.string.def("right")},emits:["update:page","update:limit","pagination"],setup(t,{emit:o}){n(e=>({v27908240:t.float}));const a=t,c=o,g=p({get:()=>a.page,set(e){c("update:page",e)}}),f=p({get:()=>a.limit,set(e){c("update:limit",e)}});function b(e){g.value*e>a.total&&(g.value=1),c("pagination",{page:g.value,limit:e}),a.autoScroll&&m(0,800)}function v(e){c("pagination",{page:e,limit:f.value}),a.autoScroll&&m(0,800)}return(o,a)=>{const n=e;return i(),l("div",{class:u([{hidden:t.hidden},"pagination-container"])},[r(n,{"current-page":d(g),"onUpdate:currentPage":a[0]||(a[0]=e=>s(g)?g.value=e:null),"page-size":d(f),"onUpdate:pageSize":a[1]||(a[1]=e=>s(f)?f.value=e:null),background:t.background,layout:t.layout,"page-sizes":t.pageSizes,"pager-count":t.pagerCount,total:t.total,onSizeChange:b,onCurrentChange:v},null,8,["current-page","page-size","background","layout","page-sizes","pager-count","total"])],2)}}}),[["__scopeId","data-v-33233cd9"]]);export{f as _};
