From 4e2e57e86d1f3cc4651c262b2df0cebaef35b573 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: Wed, 25 Mar 2026 11:01:08 +0800
Subject: [PATCH] 新增类型

---
 src/utils/index.js |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/utils/index.js b/src/utils/index.js
index 4e65504..51445ef 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -20,6 +20,7 @@
  * @param {string} option
  * @returns {string}
  */
+
 export function formatTime(time, option) {
   if (('' + time).length === 10) {
     time = parseInt(time) * 1000
@@ -93,6 +94,15 @@
   return s
 }
 
+export function computePageCount(totalCount, pageSize) {
+  if (pageSize == 0) {
+    return 0
+  }
+  return totalCount % pageSize == 0
+      ? totalCount / pageSize
+      : totalCount / pageSize + 1
+}
+
 /**
  * @param {Array} actual
  * @returns {Array}

--
Gitblit v1.9.2