mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-01 17:34:23 +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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { ref, watch, defineComponent, toRefs } from "vue";
|
import { ref, watch, defineComponent, toRefs, onUnmounted } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
@ -282,6 +282,10 @@ limitations under the License. -->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
document.body.removeEventListener("click", handleClick, false);
|
||||||
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => (props.data.children || []).map((d: any) => d.expression),
|
() => (props.data.children || []).map((d: any) => d.expression),
|
||||||
(old: string[], data: string[]) => {
|
(old: string[], data: string[]) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user