import * as React from 'react'; import { withRouter, RouteChildrenProps } from 'react-router-dom'; import Collect from './UI.Child.Collect'; import Sublist from './UI.Child.Sublist' /** Props接口 */ interface IProps { } class UIComponents extends React.Component { constructor(props) { super(props); this.state = { radioValue: 'collect' }; } radioChange = (value) => { this.setState({ radioValue: value }) } componentDidMount() { } render() { const { radioValue } = this.state; return (
{radioValue === 'collect' && } {radioValue === 'sublist' && }
); } } export default withRouter(UIComponents as any)