UNPKG

@ithinkdt/naive

Version:

iThinkDT Naive UI

46 lines (45 loc) 962 B
import { defineComponent as n, createVNode as a } from "vue"; import { NPagination as o } from "ithinkdt-ui"; import { useI18n as r } from "@ithinkdt/core"; const f = /* @__PURE__ */ n({ name: "DtPagin", props: { total: { type: Number, default: 0 }, currentPage: { type: Number, default: 0 }, onCurrentChange: { type: Function, default: () => 0 }, onSizeChange: { type: Function, default: () => 0 } }, setup(e) { const { t } = r("global"); return () => a(o, { page: e.currentPage, itemCount: e.total, onUpdatePage: e.onCurrentChange, onUpdatePageSize: e.onSizeChange, pageSizes: [10, 20, 30, 50], showQuickJumper: !0, showSizePicker: !0, style: "justify-content: flex-end" }, { prefix: () => t("page.paginPrefix", e.total ?? 0), suffix: () => "页" }); } }); export { f as DtPagin };