diff --git a/components/tpx-date-input/tpx-date-input.vue b/components/tpx-date-input/tpx-date-input.vue index f735a62..ba921fe 100644 --- a/components/tpx-date-input/tpx-date-input.vue +++ b/components/tpx-date-input/tpx-date-input.vue @@ -139,7 +139,7 @@ methods: { handleSelectDate() { - this.handleSwitchCladar() + this.handleClaShow() }, handleChange(val){ if(Array.isArray(val)) { @@ -156,23 +156,22 @@ }, handleClaValChange(val) { this.handleChange(val) + this.handleClaClose() }, handleClaClose(res){ - this.handleSwitchCladar() + this.showCladar = false }, - handleSwitchCladar() { - this.showCladar = !this.showCladar + handleClaShow() { + this.showCladar = true // 手动唤起日期事件 setTimeout(()=> { - if(this.showCladar) { - this.$refs.unDateTimePckRef.show() - } - }, 300) + this.$refs.unDateTimePckRef.show() + }, 1000) }, handleToolsRangChange(val) { this.rangeVal = val if(val == -1) { - this.handleSwitchCladar() + this.handleClaShow() } else { let sltRang = this.toolsRangesList.filter(t=> t.val == val)[0].range this.handleChange(sltRang, ) diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue index 3418f49..b93ab18 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue @@ -509,7 +509,7 @@ this.$nextTick(() => { setTimeout(() => { this.show = false - this.$emit('close') + // this.$emit('close') }, 300) }) },