Commit 8ec9ff17 by xiexiaoqin

fix: time picker every time didmount

parent ba8416cb
import { getInterTime } from '../../utils/utils';
const currentDate = new Date();
const weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
const durationList = [{ value: 60, label: '1小时' }, { value: 120, label: '2小时' }, { value: 30, label: '30分钟' }];
const durationList = [{ value: 30, label: '30分钟' }, { value: 60, label: '1小时' }, { value: 120, label: '2小时' }];
const timeData = generateDate(365);
const timeHour = generateHour(24);
const timeMin = generateMin(60);
......@@ -160,7 +160,7 @@ Component({
showTime: '',
},
duration: {
pickValue: [2],
pickValue: [0],
showTime: '',
label: '30分钟',
},
......@@ -176,7 +176,8 @@ Component({
},
didUpdate() {
},
didUnmount() { },
didUnmount() {
},
methods: {
//设置初始值
setInitialValue() {
......@@ -193,7 +194,6 @@ Component({
if (this.props.endTime) {
endDate = new Date(this.props.endTime);
}
console.log(this.props)
this.changeStart(startDate);
this.changeEnd(endDate);
......
......@@ -228,13 +228,13 @@
</view>
</block>
<view a:else>正在加载</view>
<popup title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup">
<popup a:if="{{popupShow}}" title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup">
<meeting-time-picker a:if="{{'time' === comType}}" onComplete="onComplete" startTime="{{$data.startTime}}" endTime="{{$data.endTime}}"></meeting-time-picker>
<hlist a:if="{{'participator' === comType}}" dataComList="{{comHListData.contactData}}" onSelectComHList="selectComHList"></hlist>
<list multiple="{{comListData.multiple}}" onCompelete="selectAheadtimes" comSelectList="{{comListData.aheadTimesListId}}" complete="{{comType=='aheadTime' ? true : false}}"a:if="{{comType=='repeat' || comType=='meetingWayModel' || comType=='aheadTime'}}" dataComList="{{comType=='repeat' ? comListData.repeatList : (comType=='aheadTime' ? comListData.aheadTimesList : comListData.meetingWayList)}}" onComSelectList="selectComList" comSelectListId="{{comType=='repeat' ? comListData.comSelectListId : (comType=='aheadTime'?comListData.aheadTimesListId : comListData.meetingWayModelId)}}" iconType="{{comListData.iconType}}">
</list>
</popup>
<popup show="{{show}}" onClose="closePop" title="{{pop.title}}">
<popup a:if="{{show}}" show="{{show}}" onClose="closePop" title="{{pop.title}}">
<!-- 任务创建弹出框 -->
<task-panel a:if="{{pop.type === 'createTask'}}" onComplete="complete" action='create'/>
<!-- 任务修改弹出框 -->
......
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