Commit d867d7e7 authored by jim's avatar jim

Modify the document in the mistakes

parent bb85b06d
......@@ -5,6 +5,8 @@ title:
en-US: Basic
---
Authorized demo used
```jsx
import RenderAuthorized from 'ant-design-pro/lib/Authorized';
import { Alert } from 'antd';
......@@ -18,8 +20,8 @@ const havePermission = () => {
};
const havePermissionAsync = new Promise((resolve,reject)=>{
// Call reslove on behalf of passed
setTimeout(()=>reslove(),1000)
// Call resolve on behalf of passed
setTimeout( ()=> resolve() , 1000)
});
ReactDOM.render(
......@@ -30,7 +32,7 @@ ReactDOM.render(
<Authorized authority={['user','admin']} noMatch={noMatch}>
<Alert message="Use Array as a parameter passed!" type="success" showIcon />
</Authorized>
<Authorized authority={Havepermission} noMatch={noMatch}>
<Authorized authority={havePermission} noMatch={noMatch}>
<Alert message="Use function as a parameter passed!" type="success" showIcon />
</Authorized>
<Authorized authority={havePermissionAsync} noMatch={noMatch}>
......
......@@ -5,6 +5,8 @@ title:
en-US: secured
---
secured demo used
```jsx
import RenderAuthorized from 'ant-design-pro/lib/Authorized';
import { Alert } from 'antd';
......@@ -17,8 +19,8 @@ const havePermission = () => {
};
const havePermissionAsync = new Promise((resolve, reject) => {
// Call reslove on behalf of passed
setTimeout(() => reslove(), 1000);
// Call resolve on behalf of passed
setTimeout(() => resolve(), 1000);
});
@Secured('admin', noMatch)
......
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