diff --git a/stores/media.ts b/stores/media.ts index b2b9f01d..30fe4313 100644 --- a/stores/media.ts +++ b/stores/media.ts @@ -10,6 +10,7 @@ export const useMedia = defineStore('media', { folderList: {} as FolderObject, folderCrumbs: [] as Crumb[], isLoading: false, + notExist: useNuxtApp().$i18n.t('media.notExists'), }), getters: {}, @@ -19,7 +20,6 @@ export const useMedia = defineStore('media', { this.isLoading = true } - const { t } = useI18n() const authStore = useAuth() const configStore = useConfig() const indexStore = useIndex() @@ -37,7 +37,7 @@ export const useMedia = defineStore('media', { if (response.status === 200) { return response.json() } else { - indexStore.msgAlert('error', t('media.notExists'), 3) + indexStore.msgAlert('error', this.notExist, 3) return { source: '',