You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
740 B
29 lines
740 B
import React, { Component } from 'react';
|
|
import { Button } from 'antd';
|
|
import AuthorityControl from '../../components/AuthorityControl';
|
|
import GlobalAuthority from '../../layouts/GlobalAuthorityContext';
|
|
|
|
export default class Home extends Component {
|
|
state = {};
|
|
|
|
render() {
|
|
// 定义认证的属性 TODO
|
|
const GlobalAuthorityProps = {
|
|
user: 'admin',
|
|
login: 'success',
|
|
authList: {
|
|
'auth.button': true,
|
|
},
|
|
};
|
|
|
|
return (
|
|
<GlobalAuthority.Provider value={GlobalAuthorityProps}>
|
|
<AuthorityControl authKey="home.button">
|
|
<Button type="primary">按钮 控制</Button>
|
|
</AuthorityControl>
|
|
<h1>home...</h1>
|
|
</GlobalAuthority.Provider>
|
|
);
|
|
}
|
|
}
|