- 添加菜单权限控制

- url 权限控制
This commit is contained in:
sin
2019-03-01 18:15:12 +08:00
parent 814ca633aa
commit 21bacc19d8
14 changed files with 160 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { Button } from 'antd';
import AuthorityControl from '../../components/AuthorityControl';
import GlobalAuthority from '../../layouts/GlobalAuthorityContext';
import UrlsContext from '../../layouts/UrlsContext';
export default class Home extends Component {
state = {};
@@ -17,12 +17,12 @@ export default class Home extends Component {
};
return (
<GlobalAuthority.Provider value={GlobalAuthorityProps}>
<UrlsContext.Provider value={GlobalAuthorityProps}>
<AuthorityControl authKey="home.button">
<Button type="primary">按钮 控制</Button>
</AuthorityControl>
<h1>home...</h1>
</GlobalAuthority.Provider>
</UrlsContext.Provider>
);
}
}