mirror of
https://git-qiuchenly.yltfspace.com/QiuChenly/corepatch
synced 2025-11-25 21:32:25 +08:00
6 lines
926 B
JavaScript
6 lines
926 B
JavaScript
import{d as a,a as t,b as e,e as s,g as n,z as o,F as r,h as g}from"./CdD4XvnD.js"
|
|
import{a as c}from"./BaSQ3xJt.js"
|
|
const i={key:0,class:"pagination"},l=["disabled"],d={class:"pagination-info"},P=["disabled"],p=c(a({__name:"Pagination",props:{currentPage:{},totalPages:{},total:{}},emits:["page-change"],setup(a,{emit:c}){const p=a,u=c,b=()=>{p.currentPage>1&&u("page-change",p.currentPage-1)},m=()=>{p.currentPage<p.totalPages&&u("page-change",p.currentPage+1)}
|
|
return(c,p)=>a.totalPages>1?(g(),t("div",i,[s("button",{onClick:b,disabled:1===a.currentPage,class:"btn btn-sm"}," 上一页 ",8,l),s("span",d,[n(" 第 "+o(a.currentPage)+" 页,共 "+o(a.totalPages)+" 页",1),void 0!==a.total?(g(),t(r,{key:0},[n("(共 "+o(a.total)+" 条)",1)],64)):e("",!0)]),s("button",{onClick:m,disabled:a.currentPage>=a.totalPages,class:"btn btn-sm"}," 下一页 ",8,P)])):e("",!0)}}),[["__scopeId","data-v-fde42dc3"]])
|
|
export{p as P}
|