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.
45 lines
859 B
45 lines
859 B
import React from 'react';
|
|
import { Button, Table } from 'antd';
|
|
import { connect } from 'dva';
|
|
|
|
@connect(({ user }) => ({ user }))
|
|
export default class extends React.PureComponent {
|
|
|
|
constructor(props) {
|
|
super(props);
|
|
const { dispatch, id } = props;
|
|
this.state = {id:sessionStorage.getItem("helloworld-id")}
|
|
|
|
dispatch({
|
|
type: 'user/query',
|
|
});
|
|
}
|
|
|
|
render() {
|
|
const { user, test } = this.props;
|
|
const { list } = user;
|
|
const columns = [
|
|
{
|
|
dataIndex: 'id',
|
|
title: 'ID',
|
|
},
|
|
{
|
|
dataIndex: 'name',
|
|
title: 'Name',
|
|
},
|
|
{
|
|
dataIndex: 'email',
|
|
title: 'Email',
|
|
},
|
|
];
|
|
|
|
return (
|
|
<div>
|
|
<strong style={{color:'red'}}>000{test}</strong>
|
|
<Table rowKey="id" columns={columns} dataSource={list} />
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|