DatePicker
获取23.59.59Moment
import moment from 'moment'
// 昨天23.59.59
const yesterDayEnd = moment(moment().subtract(1, 'day')).endOf('day');
// 今天23.59.59
const todayEnd = moment().endOf('day');
// 明天23.59.59
const tomorrowEnd = moment(moment().subtract(1, 'day')).endOf('day');
Modal
- modal中表单内容回显
modal中有表单,会出现第二次打开modal表单自动回显的问题,手动清空表单数据,或使用Modal的destroyOnClose属性,关闭modal后自动清空Modal中的组件
Upload
自定义文件上传(设置customRequest)
- 不指定multipart/form-data头部字段,axios会默认根据文件类型加上
- beforeUpload在自定义文件上传时同样有效