志愿者布局调整

master
pan 5 years ago
parent 490163d943
commit daf7211187
  1. 24
      src/index.css
  2. 59
      src/sub/Volunteer.tsx

@ -58,6 +58,30 @@
height: 100px; height: 100px;
} }
/**
*帮助信息高度
*/
.my-help-height{
height: 400px;
}
/**
*求助信息高度
*/
.seek-help-height{ .seek-help-height{
height: 400px; height: 400px;
} }
/**
* 我的留言高度
*/
.my-leave-world-height{
height: 400px;
}
/**
*志愿者页面信息宽度
*/
.volunteer{
width: 1400px;
}

@ -1,5 +1,5 @@
import React from "react"; import React from "react";
import {Button, Card, Col, Container, Row, Table} from "react-bootstrap"; import {Button, Table} from "react-bootstrap";
import {Input} from "../bootstrap/InputGroup"; import {Input} from "../bootstrap/InputGroup";
import {VolunteerProps} from "../entity"; import {VolunteerProps} from "../entity";
import {Page} from "../Page"; import {Page} from "../Page";
@ -80,8 +80,7 @@ export class Volunteer extends React.Component<any, any>{
mail:"admin@qq.com", mail:"admin@qq.com",
//服务地点 //服务地点
address:"广州" address:"广州"
} },
],[
{ {
//个人描述 //个人描述
desc:"个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述", desc:"个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述个人描述",
@ -129,21 +128,6 @@ export class Volunteer extends React.Component<any, any>{
address:this.state.form.address address:this.state.form.address
}})}/> }})}/>
{/*<InputGroup className="mt-3 col-3 ml-auto mr-auto">*/}
{/* <InputGroup.Prepend>*/}
{/* <InputGroup.Text>请选择服务地点</InputGroup.Text>*/}
{/* </InputGroup.Prepend>*/}
{/* <Form.Control as="select" custom value={this.state.form.address} onChange={(e)=>this.setState({*/}
{/* form:{*/}
{/* keyword:this.state.form.keyword,*/}
{/* address:e.target.value*/}
{/* }*/}
{/* })}>*/}
{/* {this.state.addressList.map((address:AddressProps, index:number)=>*/}
{/* <option key={"option"+index} value={address.address} >{address.address}</option>*/}
{/* )}*/}
{/* </Form.Control>*/}
{/*</InputGroup>*/}
<Address onChange={(value:string)=>this.setState({ <Address onChange={(value:string)=>this.setState({
form:{ form:{
keyword:this.state.form.keyword, keyword:this.state.form.keyword,
@ -155,32 +139,31 @@ export class Volunteer extends React.Component<any, any>{
<Page onClick={(page:number)=>this.loadVolunteerList(page)} currentPage={this.state.page.currentPage} totalPage={this.state.page.totalPage} pageSize={this.state.page.pageSize}/> <Page onClick={(page:number)=>this.loadVolunteerList(page)} currentPage={this.state.page.currentPage} totalPage={this.state.page.totalPage} pageSize={this.state.page.pageSize}/>
<Container className="p-3">
{this.state.volunteerList.map((volunteers:Array<VolunteerProps>, index:number)=> {this.state.volunteerList.map((volunteers:Array<VolunteerProps>, index:number)=>
<Row className="justify-content-center p-3" key={"row"+index}>{volunteers.map((volunteer:VolunteerProps, subIndex:number)=> <div className="p-3 d-flex ml-auto mr-auto volunteer overflow-auto" key={"row"+index}>{volunteers.map((volunteer:VolunteerProps, subIndex:number)=>
<Col key={"col"+subIndex} className="col-5"> <div key={"col"+subIndex} className="mr-3">
<Card> <div className="border-info border">
<Card.Header></Card.Header>
<Card.Body> </div>
<p>{volunteer.desc}</p> <div>
</Card.Body> <p className="border-info border m-0">{volunteer.desc}</p>
<Card.Footer> </div>
<Table bordered hover variant="light"> <div >
<Table>
<tbody> <tbody>
<tr> {[[volunteer.name,volunteer.sex,volunteer.age],[volunteer.phone,volunteer.mail,volunteer.address]].map((tr,index)=>
<td className="border-dark">{volunteer.name}</td><td className="border-dark">{volunteer.sex}</td><td className="border-dark">{volunteer.age}</td> <tr key={"tr"+index}>
</tr> {tr.map((td,index)=><td key={"td"+index} className="border border-info">{td}</td>)}
<tr>
<td className="border-dark">{volunteer.phone}</td><td className="border-dark">{volunteer.mail}</td><td className="border-dark">{volunteer.address}</td>
</tr> </tr>
)}
</tbody> </tbody>
</Table> </Table>
</Card.Footer> </div>
</Card> </div>
</Col> )}</div>
)}</Row>
)} )}
</Container>
<Page onClick={(page:number)=>this.loadVolunteerList(page)} currentPage={this.state.page.currentPage} totalPage={this.state.page.totalPage} pageSize={this.state.page.pageSize}/> <Page onClick={(page:number)=>this.loadVolunteerList(page)} currentPage={this.state.page.currentPage} totalPage={this.state.page.totalPage} pageSize={this.state.page.pageSize}/>

Loading…
Cancel
Save