refactor: 重命名客户端工程
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<div class="app-shell home">
|
||||
<div class="logo">艺</div>
|
||||
<h1>{{ t('home.title') }}</h1>
|
||||
<p class="muted">{{ t('home.hint') }}</p>
|
||||
<button class="lang" @click="toggleLang">{{ otherLangLabel }}</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { setLocale } from '@/locales';
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
const otherLangLabel = computed(() => (locale.value === 'zh-CN' ? 'EN' : '中文'));
|
||||
function toggleLang() {
|
||||
setLocale(locale.value === 'zh-CN' ? 'en-US' : 'zh-CN');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.home {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
padding: 40px 28px;
|
||||
gap: 14px;
|
||||
}
|
||||
.logo {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
border-radius: 18px;
|
||||
background: linear-gradient(135deg, #1f3864, #2e5496);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 36px;
|
||||
font-weight: 700;
|
||||
}
|
||||
h1 {
|
||||
font-size: 22px;
|
||||
margin: 8px 0 0;
|
||||
}
|
||||
.lang {
|
||||
margin-top: 16px;
|
||||
border: 1px solid #d0d7e2;
|
||||
background: #fff;
|
||||
border-radius: 999px;
|
||||
padding: 6px 18px;
|
||||
color: var(--brand);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user