适配语言

This commit is contained in:
2026-02-04 17:00:58 +08:00
parent 4a1c4885ef
commit 01ea6169c9
17 changed files with 217 additions and 99 deletions

View File

@@ -9,15 +9,15 @@
</div>
<button class="create-btn">
<span class="icon"><svg-icon name="add" size="16" /></span>
<span v-show="!isCollapse" class="text">New Project</span>
<span v-show="!isCollapse" class="text">{{ $t('Home.newProject') }}</span>
</button>
<!-- <div class="menu-item" @click="onHome">
<span class="icon"><svg-icon name="home" size="24" /></span>
<span class="title" v-show="!isCollapse">Home</span>
<span class="title" v-show="!isCollapse">{{ $t('Home.home') }}</span>
</div> -->
<div class="menu-item" @click="onHistory" :class="{ active: showHistory }">
<span class="icon"><svg-icon name="history" size="24" /></span>
<span class="title" v-show="!isCollapse">History</span>
<span class="title" v-show="!isCollapse">{{ $t('Home.history') }}</span>
<span class="icon jiantou" v-show="!isCollapse"
><svg-icon name="arrow-right" size="14" />
</span>
@@ -45,6 +45,8 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
const { t: $t } = useI18n()
const route = useRoute()
const router = useRouter()
import { useGlobalStore } from '@/stores'
@@ -57,7 +59,7 @@
const historyList = ref([
{
title: true,
name: 'Today'
name: $t('Home.today')
},
{
name: 'Conversation Item 1'
@@ -67,14 +69,14 @@
},
{
title: true,
name: 'Yesterday'
name: $t('Home.yesterday')
},
{
name: 'Conversation Item 3'
},
{
title: true,
name: 'Earlier Chat'
name: $t('Home.earlierChat')
},
{
name: 'Conversation Item 4'