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