Skip to content

Commit

Permalink
fixbug: i8n
Browse files Browse the repository at this point in the history
  • Loading branch information
jsxiaosi committed Sep 3, 2022
1 parent 52c87a4 commit da0ac3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/layouts/pageLayouts/components/Sidebar/Item.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<template>
<SvgIcon :class-name="className" :name="icon" />
<span v-if="title">{{ t(title) }}</span>
<span v-if="title">{{ $t(title) }}</span>
</template>

<script setup lang="ts">
import SvgIcon from '@/components/SvgIcon/index.vue';
import { useI18n } from '@/hooks/web/useI18n';
defineProps({
icon: {
type: String,
Expand All @@ -20,7 +19,6 @@
default: '',
},
});
const { t } = useI18n();
</script>

<style scoped>
Expand Down
8 changes: 4 additions & 4 deletions src/views/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<div class="login-form">
<h2 class="enter-x p-4">{{ appConfigMode.title }}</h2>
<div class="enter-x"
>{{ t('sys.login.userName') }}:admin {{ t('sys.login.password') }}:admin123</div
>{{ $t('sys.login.userName') }}:admin {{ $t('sys.login.password') }}:admin123</div
>
<div class="input-group user enter-x">
<SvgIcon class-name="icon" name="iEL-avatar"></SvgIcon>
<div>
<h5>{{ t('sys.login.userName') }}</h5>
<h5>{{ $t('sys.login.userName') }}</h5>
<input
v-model="user"
type="text"
Expand All @@ -33,7 +33,7 @@
<SvgIcon class-name="icon" name="password"></SvgIcon>

<div>
<h5>{{ t('sys.login.password') }}</h5>
<h5>{{ $t('sys.login.password') }}</h5>
<input
v-model="pwd"
type="password"
Expand All @@ -59,12 +59,12 @@
import { ref } from 'vue';
import { addClass, removeClass } from '@/utils/operate';
import { useI18n } from '@/hooks/web/useI18n';
import { initAsyncRoute } from '@/router/utils';
import { useRouter } from 'vue-router';
import { getUserInfo, UseInfoType } from '@/server/useInfo';
import { setStorage } from '@/utils/storage';
import { useAppStoreHook } from '@/store/modules/app';
import { useI18n } from '@/hooks/web/useI18n';
const { appConfigMode } = useAppStoreHook();
Expand Down

0 comments on commit da0ac3c

Please sign in to comment.