fix: lang change
This commit is contained in:
+4
-7
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeMount, watch } from "vue";
|
||||
import { ref, onMounted, onBeforeMount } from "vue";
|
||||
import { WhoIs } from "./lib/whois";
|
||||
import { DomainFactory } from "./lib/factory";
|
||||
|
||||
@@ -73,17 +73,14 @@ onMounted(() => {
|
||||
setTimeout(() => {
|
||||
visible.value = true;
|
||||
});
|
||||
});
|
||||
watch(
|
||||
() => document.location.hash,
|
||||
() => {
|
||||
setInterval(() => {
|
||||
const newLang = getLang();
|
||||
if (newLang !== lang.value) {
|
||||
lang.value = newLang;
|
||||
newDomain();
|
||||
}
|
||||
},
|
||||
);
|
||||
}, 100);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user