import React, { Component } from 'react' import { connect } from 'react-redux' import PropTypes from 'prop-types' import { Menu } from 'antd' import { fetchNewsData } from '../../../actions/news.js' const logList = [{ name: '用户' },{ name: '分组' },{ name: '接口' },{ name: '项目' }]; @connect( state => { return { newsData: state.news.newsData } }, { fetchNewsData } ) class NewsList extends Component { static propTypes = { fetchNewsData: PropTypes.func, setLoading: PropTypes.func } constructor(props) { super(props) this.state = { selectedKeys: 0 } } getLogData(e){ // page,size,logId // console.log(e.key); this.setState({ selectedKeys: +e.key }) const that = this; this.props.setLoading(true); this.props.fetchNewsData(+e.key).then(function(){ that.props.setLoading(false); }) } render () { return (

日志类型

{logList.map((item,i)=>{ return ( {item.name} ) })}
) } } export default NewsList