Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
安博
ant-design-pro
Commits
ba1f8358
Commit
ba1f8358
authored
Jun 12, 2018
by
安博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update readme.md
parent
7595ac07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
README.md
README.md
+22
-1
No files found.
README.md
View file @
ba1f8358
...
@@ -1013,4 +1013,25 @@ render() {
...
@@ -1013,4 +1013,25 @@ render() {
return CheckPermissions(authority, childrenRender, noMatch);
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,
},
};
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment