优化字典 select 和 text

This commit is contained in:
sin
2019-03-15 22:59:37 +08:00
parent 888151f523
commit 70b5ea48b3
19 changed files with 184 additions and 216 deletions

View File

@@ -1,33 +1,23 @@
import React, { Component } from 'react';
import { Button } from 'antd';
import AuthorityControl from '../../components/AuthorityControl';
import UrlsContext from '../../layouts/UrlsContext';
import DictionaryValueSelect from '../Dictionary/DictionaryValueSelect';
import DictionaryValueText from '../Dictionary/DictionaryValueText';
import DictionarySelect from '@/components/Dictionary/DictionarySelect';
import DictionaryText from '@/components/Dictionary/DictionaryText';
import AuthorityControl from '@/components/AuthorityControl';
export default class Home extends Component {
state = {};
render() {
// 定义认证的属性 TODO
const GlobalAuthorityProps = {
user: 'admin',
login: 'success',
authList: {
'auth.button': true,
},
};
return (
<UrlsContext.Provider value={GlobalAuthorityProps}>
<div>
<AuthorityControl authKey="home.button">
<Button type="primary">按钮 控制</Button>
</AuthorityControl>
<h1>home...</h1>
<DictionaryValueSelect dataKey="gender" defaultValue={1} />
<DictionaryValueText dataKey="gender" value="1" />
</UrlsContext.Provider>
<DictionarySelect dicKey="gender" defaultValue="1" />
<DictionaryText dicKey="gender" dicValue="2" />
</div>
);
}
}