todo: userConfig
This commit is contained in:
@@ -11,7 +11,7 @@ const { Option } = Select;
|
||||
|
||||
const App = () => (
|
||||
|
||||
<SiderConfig ></SiderConfig>
|
||||
<SiderConfig></SiderConfig>
|
||||
|
||||
);
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@ class Login extends React.Component {
|
||||
form.append("pwd", pwd);
|
||||
axios.post("/api/login", form).then(value => {
|
||||
console.log(value);
|
||||
ReactDom.render(<SiderConfig></SiderConfig>, document.getElementById('root'))
|
||||
console.log("Cookies are ", document.cookie)
|
||||
ReactDom.render(<SiderConfig userName={user}></SiderConfig>, document.getElementById('root'))
|
||||
return
|
||||
|
||||
});
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import { TreeSelect } from 'antd';
|
||||
import axios from 'axios';
|
||||
|
||||
const { TreeNode } = TreeSelect;
|
||||
|
||||
@@ -17,6 +18,13 @@ class NamespaceSelect extends React.Component {
|
||||
|
||||
};
|
||||
|
||||
onDropdownVisibleChange = (open) => {
|
||||
if(open) {
|
||||
var resp = axios.post("/api/user/config")
|
||||
console.log(resp)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
@@ -31,6 +39,7 @@ class NamespaceSelect extends React.Component {
|
||||
multiple={false}
|
||||
treeDefaultExpandAll
|
||||
onChange={this.onChange}
|
||||
onDropdownVisibleChange={this.onDropdownVisibleChange}
|
||||
>
|
||||
<TreeNode value="parent %#@" title="parent 112312312321312313132131313131231" key="0-1">
|
||||
<TreeNode value="parent 1%#@0" title="parent 112312312321312313132131313131231-0" key="0-1-1">
|
||||
|
||||
@@ -43,12 +43,14 @@ class SiderConfig extends React.Component {
|
||||
</Menu>
|
||||
</Sider>
|
||||
<Layout>
|
||||
<Header style={{ background: '#fff', padding: 0, }}>
|
||||
<Header itemType="flex" style={{ justifyContent: "flex-end", background: '#fff', padding: 0, }}>
|
||||
|
||||
<Row type="flex" justify="end">
|
||||
|
||||
<Col span={4}> <Text style={{fontSize: 16, color: "#f37b1d"}}>用户:</Text> <Text style={{fontSize: 16}}>黄思敏</Text> </Col>
|
||||
<Col span={4}><Button type="primary" style={{ width: '100px', }}>退出</Button></Col>
|
||||
<Col>
|
||||
<Text style={{ alignSelf: "flex-end", fontSize: 16, color: "#f37b1d" }}>用户:</Text>
|
||||
<Text style={{ fontSize: 16 }}>{this.props.userName}</Text>
|
||||
<Button type="primary" style={{ margin: "0px 10px 0 20px", width: '100px', }}>退出</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
</Header >
|
||||
@@ -57,7 +59,7 @@ class SiderConfig extends React.Component {
|
||||
<Breadcrumb.Item>User</Breadcrumb.Item>
|
||||
<Breadcrumb.Item>Bill</Breadcrumb.Item>
|
||||
</Breadcrumb>
|
||||
<TextArea style={{ minHeight: '90vh' }}>
|
||||
<TextArea style={{ minHeight: '92%' }}>
|
||||
|
||||
</TextArea>
|
||||
</Content>
|
||||
|
||||
Reference in New Issue
Block a user