Commit 94f2ddf9 by fengzhaoyu

时间组件加1.5小时

parent 76af030b
import { getInterTime } from '../../utils/utils'; import { getInterTime } from '../../utils/utils';
const currentDate = new Date(); const currentDate = new Date();
const weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']; const weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
const durationList = [{ value: 30, label: '30分钟' }, { value: 60, label: '1小时' }, { value: 120, label: '2小时' }]; const durationList = [{ value: 30, label: '30分钟' }, { value: 60, label: '1小时' }, { value: 90, label: '1.5小时' }, { value: 120, label: '2小时' }];
const timeData = generateDate(365); const timeData = generateDate(365);
const timeHour = generateHour(24); const timeHour = generateHour(24);
const timeMin = generateMin(60); const timeMin = generateMin(60);
...@@ -188,10 +188,10 @@ Component({ ...@@ -188,10 +188,10 @@ Component({
const min = endDate.getMinutes(); const min = endDate.getMinutes();
endDate.setMinutes(min + 30); endDate.setMinutes(min + 30);
// 赋值 // 赋值
if (this.props.startTime && new Date(this.props.startTime).getFullYear()) { if (this.props.startTime) {
startDate = new Date(this.props.startTime); startDate = new Date(this.props.startTime);
} }
if (this.props.endTime && new Date(this.props.endTime).getFullYear()) { if (this.props.endTime) {
endDate = new Date(this.props.endTime); endDate = new Date(this.props.endTime);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment