文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit ba1f8358 by 安博

update readme.md

parent 7595ac07
......@@ -1013,4 +1013,25 @@ render() {
return CheckPermissions(authority, childrenRender, noMatch);
}
```
它调用了`CheckPermissions`检查权限,其定义在`checkPermissions.js`中,返回授权不通过的页面或者抛出一个错误。判定标准是菜单中设定的权限和上面API返回的权限是否严格相等。
它调用了`CheckPermissions`检查权限,其定义在`checkPermissions.js`中,返回授权不通过时应展示的页面或者抛出一个错误。判定标准是菜单中设定的权限和上面API返回的权限是否严格相等。
第7章          其他
===
7.1          分页处理
---
根据框架里的mock数据 `mock/rule.js`,它采用的方式是前端向服务器提交两个分页字段 `pageSize``currentPage`,服务器返回这两个字段并附带上`total`字段描述总的数据条数。
```
let pageSize = 10;
if (params.pageSize) {
pageSize = params.pageSize * 1;
}
const result = {
list: dataSource,
pagination: {
total: dataSource.length,
pageSize,
current: parseInt(params.currentPage, 10) || 1,
},
};
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment