<script> getCurrWeekDays() { const { form: { setFieldsValue }, } = this.props; let start = moment() .startOf('week') .format('YYYY-MM-DD'); //获取这星期的第一天 let end = moment() .endOf('days') //获取这天的结束 .format('YYYY-MM-DD'); // debugger; this.setState({ beginDate: start, endData: end, }); setFieldsValue({ beginDate: moment(start), endDate: moment(end) }); this.handleSearch(); </script>