import{c as e,X as a,Y as t,b as l,au as s,g as o,w as r,q as u,v as n,x as p,N as i,m as d,y as g,D as c,z as v,A as x,F as b,av as h}from"./base-lib.js?v=1761009159";import{_ as f}from"./utils-lib.js?v=1761009159";const m={key:1,class:"flex items-center h-[28px]"},y={class:"!border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center"},k=f(e({__name:"index",props:a({row:{},page:{},total:{},type:{default:"default"},name:{default:"row"},layout:{default:"prev, pager, next, sizes, total, jumper"},rowList:{default:()=>[10,20,50,100]},useStorage:{type:Boolean,default:!0}},{row:{default:10},rowModifiers:{},page:{default:1},pageModifiers:{},total:{default:0},totalModifiers:{}}),emits:a(["change"],["update:row","update:page","update:total"]),setup(e,{emit:a}){const f=t(e,"row"),k=t(e,"page"),w=t(e,"total"),z=e,_=l(),C="".concat(null==_?void 0:_.fullPath.replace(/\//g,"_"),"_").concat(null==z?void 0:z.name),S=s(C,f.value||z.rowList[0]),$=a,j=o(()=>(f.value=z.useStorage?S.value:f.value,z.useStorage?S.value:f.value));r(()=>S.value,e=>{e!==f.value&&(f.value=e,$("change",k.value,e))});const L=e=>{k.value=1,e!==f.value&&(f.value=e),S.value=e,$("change",k.value,e)},M=e=>{k.value=e,$("change",e,j.value)};return u(()=>{}),(e,a)=>{const t=h;return n(),p(b,null,["default"===e.type?(n(),i(t,d({key:0,background:"",size:"small"},e.$attrs,{total:w.value,"page-size":g(j),"page-sizes":e.rowList,"current-page":k.value,"pager-count":5,layout:e.layout,onSizeChange:L,onCurrentChange:M}),null,16,["total","page-size","page-sizes","current-page","layout"])):c("",!0),"unknown"===e.type?(n(),p("div",m,[k.value>1?(n(),p("span",{key:0,class:"bt-link !border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center",onClick:a[0]||(a[0]=a=>e.$emit("change",1,a))}," 首页 ")):c("",!0),k.value>1?(n(),p("span",{key:1,class:"bt-link !border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center",onClick:a[1]||(a[1]=a=>e.$emit("change",k.value-1,a))}," 上一页 ")):c("",!0),f.value>=w.value?(n(),p("span",{key:2,class:"bt-link !border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center",onClick:a[2]||(a[2]=a=>e.$emit("change",k.value+1,a))}," 下一页 ")):c("",!0),v("span",y," 第 "+x(k.value)+" 页 ",1)])):c("",!0)],64)}}}),[["__scopeId","data-v-2b0b56a9"]]);export{k as _};
