From ce2f4767f196c01664d66fbd2e9ea256b3e90aad Mon Sep 17 00:00:00 2001 From: JiaoTianBo Date: Sat, 28 Mar 2026 14:32:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(permission):=20=E4=BF=AE=E6=AD=A3=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=8F=82=E6=95=B0=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将permission权限模块分页数据的total、pageSize和currentPage转换为数值类型 - 修复role角色模块中分页数据的类型转换,确保正确数字处理 - 更新user用户模块分页信息的数字类型转换,避免类型错误 - 调整user列表页底部自适应配置的offsetBottom数值,提高布局效果 - 修改角色启用停用确认框模板字符串格式,优化代码可读性 --- src/views/system/permission/utils/hook.tsx | 6 +++--- src/views/system/role/utils/hook.tsx | 6 +++--- src/views/system/user/index.vue | 2 +- src/views/system/user/utils/hook.tsx | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/views/system/permission/utils/hook.tsx b/src/views/system/permission/utils/hook.tsx index d72d419..ebac951 100644 --- a/src/views/system/permission/utils/hook.tsx +++ b/src/views/system/permission/utils/hook.tsx @@ -199,9 +199,9 @@ export function usePermission(tableRef: Ref) { }); if (code === 200) { dataList.value = data?.records || []; - pagination.total = data?.total || 0; - pagination.pageSize = data?.size || 10; - pagination.currentPage = data?.current || 1; + pagination.total = Number(data?.total) || 0; + pagination.pageSize = Number(data?.size) || 10; + pagination.currentPage = Number(data?.current) || 1; } } catch (error) { console.error(error); diff --git a/src/views/system/role/utils/hook.tsx b/src/views/system/role/utils/hook.tsx index 19534e8..7d221c4 100644 --- a/src/views/system/role/utils/hook.tsx +++ b/src/views/system/role/utils/hook.tsx @@ -187,9 +187,9 @@ export function useRole(treeRef: Ref) { }); if (code === 200) { dataList.value = data.records; - pagination.total = data.total; - pagination.pageSize = data.size; - pagination.currentPage = data.current; + pagination.total = Number(data.total); + pagination.pageSize = Number(data.size); + pagination.currentPage = Number(data.current); } setTimeout(() => { diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 00efe88..d84859a 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -139,7 +139,7 @@ const { ref="tableRef" row-key="id" adaptive - :adaptiveConfig="{ offsetBottom: 10 }" + :adaptiveConfig="{ offsetBottom: 120 }" align-whole="center" table-layout="auto" :loading="loading" diff --git a/src/views/system/user/utils/hook.tsx b/src/views/system/user/utils/hook.tsx index 642fc3a..d86605a 100644 --- a/src/views/system/user/utils/hook.tsx +++ b/src/views/system/user/utils/hook.tsx @@ -263,9 +263,9 @@ export function useUser(tableRef: Ref) { }); if (code === 200) { dataList.value = data.records; - pagination.total = data.total; - pagination.pageSize = data.size; - pagination.currentPage = data.current; + pagination.total = Number(data.total); + pagination.pageSize = Number(data.size); + pagination.currentPage = Number(data.current); } setTimeout(() => {