mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
refactor: improved vue-i18n implementation
This commit is contained in:
@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<ConfirmModal
|
||||
:confirm-text="$t('word.discard')"
|
||||
:cancel-text="$t('word.stay')"
|
||||
:confirm-text="t('word.discard')"
|
||||
:cancel-text="t('word.stay')"
|
||||
@confirm="emit('confirm')"
|
||||
@hide="emit('close')"
|
||||
>
|
||||
<template #header>
|
||||
<div class="d-flex">
|
||||
<i class="mdi mdi-24px mdi-content-save-alert mr-1" /> {{ $t('message.unsavedChanges') }}
|
||||
<i class="mdi mdi-24px mdi-content-save-alert mr-1" /> {{ t('message.unsavedChanges') }}
|
||||
</div>
|
||||
</template>
|
||||
<template #body>
|
||||
<div>
|
||||
{{ $t('message.discardUnsavedChanges') }}
|
||||
{{ t('message.discardUnsavedChanges') }}
|
||||
</div>
|
||||
</template>
|
||||
</ConfirmModal>
|
||||
@ -21,6 +21,9 @@
|
||||
<script setup lang="ts">
|
||||
import ConfirmModal from '@/components/BaseConfirmModal.vue';
|
||||
import { onBeforeUnmount } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const emit = defineEmits(['confirm', 'close']);
|
||||
|
||||
|
Reference in New Issue
Block a user