From d867d7e7e088ff343ca4e4e1cf4cb107829e6363 Mon Sep 17 00:00:00 2001 From: jim Date: Wed, 10 Jan 2018 12:11:16 +0800 Subject: [PATCH] Modify the document in the mistakes --- src/components/Authorized/demo/basic.md | 8 +++++--- src/components/Authorized/demo/secured.md | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/Authorized/demo/basic.md b/src/components/Authorized/demo/basic.md index 48eb7c44..48f88d0b 100644 --- a/src/components/Authorized/demo/basic.md +++ b/src/components/Authorized/demo/basic.md @@ -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( - + diff --git a/src/components/Authorized/demo/secured.md b/src/components/Authorized/demo/secured.md index 2ff7c2de..de943c0b 100644 --- a/src/components/Authorized/demo/secured.md +++ b/src/components/Authorized/demo/secured.md @@ -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) -- GitLab