From 3e54ec1ca93b58c3a61d86c04db10d2268ee7484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E4=BB=A3=E7=B6=BA=E5=87=9B?= Date: Sat, 4 Jan 2025 22:18:37 +0800 Subject: [PATCH] fix: tooltips remains --- src/views/Material/index.js | 8 ++++++++ src/views/Material/index.vue | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/views/Material/index.js b/src/views/Material/index.js index 7a54dedb..acabd8cb 100644 --- a/src/views/Material/index.js +++ b/src/views/Material/index.js @@ -202,6 +202,11 @@ export default defineComponent({ highlightCost: {}, jsonStorageAvailable: !!JSON_STORAGE_SERVER, suppliesStagesCurTimeUpdateTimer: null, + forceHideMduiTooltip: markRaw( + _.throttle(() => this.$$('.mdui-tooltip-open').removeClass('mdui-tooltip-open'), 100, { + trailing: false, + }), + ), }; }, watch: { @@ -1900,6 +1905,9 @@ export default defineComponent({ this.initPlanner(); } }, + deactivated() { + this.forceHideMduiTooltip(); + }, beforeDestroy() { this.$root.importItemsListening = false; this.$root.$off('import-items', this.handleImportItemsEvent); diff --git a/src/views/Material/index.vue b/src/views/Material/index.vue index fde63f2e..d99ce1c4 100644 --- a/src/views/Material/index.vue +++ b/src/views/Material/index.vue @@ -558,7 +558,12 @@ id="material-normal" tag="div" name="material-group-wrap-transition" - @before-leave="$root.transitionBeforeLeave" + @before-leave=" + (...args) => { + $root.transitionBeforeLeave(...args); + forceHideMduiTooltip(); + } + " @after-leave="$root.transitionAfterLeaveBeforeEnter" @before-enter="$root.transitionAfterLeaveBeforeEnter" > @@ -580,7 +585,12 @@ class="material-group-wrap" tag="div" name="material-group-wrap-transition" - @before-leave="$root.transitionBeforeLeave" + @before-leave=" + (...args) => { + $root.transitionBeforeLeave(...args); + forceHideMduiTooltip(); + } + " @after-leave="$root.transitionAfterLeaveBeforeEnter" @before-enter="$root.transitionAfterLeaveBeforeEnter" >