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