我假设如何连接<i>
图标和电话号码并返回值
phone = () =>{
let mapvalue = this.props.mapvalue
return <i class='fa fa-map-marker'></i> mapvalue
}
render() {
return (
{this.phone()}
)
}
发布于 2018-07-27 04:05:56
React.Fragment仅在React v.16或更高版本上可用
render () {
return (
<React.Fragment>
<i class='fa fa-map-marker'></i>{this.props.mapvalue}
</React.Fragment>
)
}
https://stackoverflow.com/questions/51546657
复制相似问题