import {Form, InputGroup} from "react-bootstrap"; import {AddressProps, OnChangeAddress} from "../entity"; import React from "react"; /** * 加载服务地点信息 */ export class Address extends React.Component }>{ constructor(props: Readonly) { super(props); this.state={ addressList:[], } } componentDidMount() { this.loadAddress() } /** * 加载服务地点 */ loadAddress(){ this.setState({ addressList:[{ address:"北京", }, { address:"广州", }, { address:"上海", }, { address:"安徽", }] }) } render() { return ( 服务地点 this.props.onChange(e.target.value)}> {this.state.addressList.map((address:AddressProps, index:number)=> )} ) } }