wangjiahai 2 years ago
parent
commit
8cfdb2b0a8
  1. 10
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue

10
uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue

@ -1,5 +1,5 @@
<template>
<view class="uni-date">
<cover-view class="uni-date">
<view class="uni-date-editor" @click="show">
<slot>
<view class="uni-date-editor--x"
@ -109,7 +109,7 @@
:startPlaceholder="startPlaceholder" :endPlaceholder="endPlaceholder" :default-value="defaultValue"
:pleStatus="endMultipleStatus" :showMonth="false" :range="isRange" :hasTime="hasTime" :insert="false"
:hideSecond="hideSecond" @confirm="mobileChange" @maskClose="close" />
</view>
</cover-view>
</template>
<script>
/**
@ -496,6 +496,7 @@
}).exec()
setTimeout(() => {
this.pickerVisible = !this.pickerVisible
this.$emit('showing', this.pickerVisible)
if (!this.isPhone && this.isRange && this.isFirstShow) {
this.isFirstShow = false
const {
@ -519,6 +520,7 @@
close() {
setTimeout(() => {
this.pickerVisible = false
this.$emit('showing', false)
this.$emit('maskClick', this.value)
this.$refs.mobile && this.$refs.mobile.close()
}, 20)
@ -611,6 +613,7 @@
}
this.setEmit(this.displayValue)
this.pickerVisible = false
this.$emit('showing', false)
},
leftChange(e) {
const {
@ -680,6 +683,7 @@
confirmRangeChange() {
if (!this.tempRange.startDate || !this.tempRange.endDate) {
this.pickerVisible = false
this.$emit('showing', false)
return
}
if (!checkDate(this.tempRange.startDate)) {
@ -760,6 +764,7 @@
const displayRange = [start, end]
this.setEmit(displayRange)
this.pickerVisible = false
this.$emit('showing', false)
},
handleStartAndEnd(before, after, temp = false) {
if (!(before && after)) return
@ -838,6 +843,7 @@
.uni-date {
width: 100%;
flex: 1;
z-index: 999;
}
.uni-date-x {

Loading…
Cancel
Save