fix: edm flashing on change lang
This commit is contained in:
parent
f1b07a527b
commit
7d9467fdd0
1 changed files with 6 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ import { getInstance } from 'src/services/keycloak';
|
||||||
import { useNavigator } from 'src/stores/navigator';
|
import { useNavigator } from 'src/stores/navigator';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
import { initLang } from 'src/utils/ui';
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { locale } = useI18n();
|
const { locale } = useI18n();
|
||||||
|
|
@ -25,6 +26,8 @@ function sendMessage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
initLang();
|
||||||
|
currentLocale.value = locale.value;
|
||||||
navigatorStore.current.title = 'menu.dms';
|
navigatorStore.current.title = 'menu.dms';
|
||||||
navigatorStore.current.path = [
|
navigatorStore.current.path = [
|
||||||
{
|
{
|
||||||
|
|
@ -47,12 +50,14 @@ watch(
|
||||||
watch([locale, $q.dark], () => {
|
watch([locale, $q.dark], () => {
|
||||||
sendMessage();
|
sendMessage();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const currentLocale = ref(locale.value);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<iframe
|
<iframe
|
||||||
ref="iframe"
|
ref="iframe"
|
||||||
:src="`${EDM_SERVICE}/?at=${at}&rt=${rt}&lang=${locale}`"
|
:src="`${EDM_SERVICE}/?at=${at}&rt=${rt}&lang=${currentLocale}`"
|
||||||
frameborder="0"
|
frameborder="0"
|
||||||
class="full-width full-height rounded"
|
class="full-width full-height rounded"
|
||||||
allowtransparency="true"
|
allowtransparency="true"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue