diff --git a/packages/renderless/src/calendar-view/index.ts b/packages/renderless/src/calendar-view/index.ts index 7914ad0ec9..874804616f 100644 --- a/packages/renderless/src/calendar-view/index.ts +++ b/packages/renderless/src/calendar-view/index.ts @@ -57,18 +57,17 @@ export const handleMouseenter = ($event, val) => { const tooltip = vm.$refs.tooltip tooltip.state.referenceElm = $event.target - tooltip.state.popperElm && (tooltip.state.popperElm.style.display = 'none') - tooltip.doDestroy() state.eventTipContent = val - state.eventTipVisible = true - setTimeout(tooltip.updatePopper, 20) + setTimeout(tooltip.show(), 20) } export const handleMouseleave = - ({ state }) => + ({ vm }) => () => { - state.eventTipVisible = false + const tooltip = vm.$refs.tooltip + tooltip.setExpectedState(false) + tooltip.debounceClose() } export const isSelectedDate = diff --git a/packages/renderless/src/calendar-view/vue.ts b/packages/renderless/src/calendar-view/vue.ts index b58f0658c0..61996066d2 100644 --- a/packages/renderless/src/calendar-view/vue.ts +++ b/packages/renderless/src/calendar-view/vue.ts @@ -120,7 +120,6 @@ const initState = ({ reactive, props, computed, api, images, modesIcon }) => { showMonth: false, showSelectedDateEvents: false, multiSelect: computed(() => props.multiSelect), - eventTipVisible: false, cascaderVisible: false, eventTipContent: {}, activeYear: props.year, @@ -287,7 +286,7 @@ const initApi = ({ vm, api, state, t, props, emit, nextTick }) => { goPrevMonth: throttle(50, true, goPrevMonth({ state })), goNextMonth: throttle(50, true, goNextMonth({ state })), handleMouseenter: handleMouseenter({ vm, state }), - handleMouseleave: handleMouseleave({ state }), + handleMouseleave: handleMouseleave({ vm }), isSelectedDate: isSelectedDate({ state }), isStartOrEndDay: isStartOrEndDay({ state }), getDayBgColor: getDayBgColor({ props }), diff --git a/packages/vue/src/calendar-view/src/mobile-first.vue b/packages/vue/src/calendar-view/src/mobile-first.vue index cd8e05d450..c7760b913c 100644 --- a/packages/vue/src/calendar-view/src/mobile-first.vue +++ b/packages/vue/src/calendar-view/src/mobile-first.vue @@ -1,13 +1,6 @@