index-89d02e79.js 1.5 KB

1
  1. import{d as b,V as f,b as p,r as y,be as z,C as x,a1 as h,o as C,l as N,a as P,_ as S,__tla as U}from"./index-afaf388d.js";import{E as k,__tla as j}from"./index-0eed91e1.js";let m,q=Promise.all([(()=>{try{return U}catch{}})(),(()=>{try{return j}catch{}})()]).then(async()=>{m=S(b({name:"Pagination",__name:"index",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:20},pagerCount:{type:Number,default:document.body.clientWidth<992?5:7}},emits:["update:page","update:limit","pagination","pagination"],setup(t,{emit:g}){const c=f(),s=p(()=>c.currentSize),o=y(s.value==="small");z(()=>{o.value=s.value==="small"});const u=t,l=g,e=p({get:()=>u.page,set(a){l("update:page",a)}}),i=p({get:()=>u.limit,set(a){l("update:limit",a)}}),d=a=>{e.value*a>u.total&&(e.value=1),l("pagination",{page:e.value,limit:a})},_=a=>{l("pagination",{page:a,limit:i.value})};return(a,n)=>{const v=k;return x((C(),N(v,{"current-page":e.value,"onUpdate:currentPage":n[0]||(n[0]=r=>e.value=r),"page-size":i.value,"onUpdate:pageSize":n[1]||(n[1]=r=>i.value=r),background:!0,"page-sizes":[10,20,30,50,100],"pager-count":t.pagerCount,total:t.total,small:P(o),class:"float-right mb-15px mt-15px",layout:"total, sizes, prev, pager, next, jumper",onSizeChange:d,onCurrentChange:_},null,8,["current-page","page-size","pager-count","total","small"])),[[h,t.total>0]])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/components/Pagination/index.vue"]])});export{m as _,q as __tla};