Browse Source

【PC端优化】时间控件添加赋值方法-王公峰-2020-07-31

master
wanggongfeng 5 years ago
parent
commit
0a431154a2
  1. 5
      src/mixins/view-module.js

5
src/mixins/view-module.js

@ -152,9 +152,14 @@ export default {
},
// 时间段控件取值变化事件-清空一个其他都清空
changeTime (dateValue) {
var startTimeIsNull = this.dataForm.startTime === '' || this.dataForm.startTime === 'null' || this.dataForm.startTime === null
var endTimeIsNull = this.dataForm.endTime === '' || this.dataForm.endTime === 'null' || this.dataForm.endTime === null
if (dateValue === null || dateValue === '' || dateValue === 'null') {
this.dataForm.startTime = ''
this.dataForm.endTime = ''
} else if (startTimeIsNull || endTimeIsNull) {
this.dataForm.startTime = dateValue
this.dataForm.endTime = dateValue
}
}
}

Loading…
Cancel
Save