mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-01 17:44:48 +00:00
fix: remove click event after unmounted (#372)
This commit is contained in:
parent
7342036646
commit
d0ebdefcee
@ -120,7 +120,7 @@ limitations under the License. -->
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { ref, watch, defineComponent, toRefs } from "vue";
|
||||
import { ref, watch, defineComponent, toRefs, onUnmounted } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useRoute } from "vue-router";
|
||||
import type { PropType } from "vue";
|
||||
@ -282,6 +282,10 @@ limitations under the License. -->
|
||||
}
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
document.body.removeEventListener("click", handleClick, false);
|
||||
});
|
||||
|
||||
watch(
|
||||
() => (props.data.children || []).map((d: any) => d.expression),
|
||||
(old: string[], data: string[]) => {
|
||||
|
Loading…
Reference in New Issue
Block a user