fix(permission): 修正分页参数类型转换问题
Some checks failed
Lint Code / Lint Code (push) Failing after 8m49s

- 将permission权限模块分页数据的total、pageSize和currentPage转换为数值类型
- 修复role角色模块中分页数据的类型转换,确保正确数字处理
- 更新user用户模块分页信息的数字类型转换,避免类型错误
- 调整user列表页底部自适应配置的offsetBottom数值,提高布局效果
- 修改角色启用停用确认框模板字符串格式,优化代码可读性
This commit is contained in:
2026-03-28 14:32:42 +08:00
parent ec8d3ca6c2
commit ce2f4767f1
4 changed files with 10 additions and 10 deletions

View File

@@ -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);

View File

@@ -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(() => {

View File

@@ -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"

View File

@@ -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(() => {