Compare commits

...

2 Commits

Author SHA1 Message Date
2fa89460eb Feature: 添加Layout布局 2025-08-14 13:30:32 +08:00
3e32e0f59b Fix: 移除字体依赖 2025-08-13 17:01:58 +08:00
6 changed files with 48 additions and 23 deletions

View File

@ -1,5 +1,7 @@
<template>
<div>
<NuxtPage />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
</template>

View File

@ -7,32 +7,32 @@
<!-- 导航菜单 -->
<el-menu default-active="productions" class="header-menu" mode="horizontal" :ellipsis="false" router>
<el-menu-item index="/productions">
<span class="title">产品中心</span>
<span class="title">{{ $t('productions') }}</span>
</el-menu-item>
<el-menu-item index="/solutions">
<span class="title">解决方案</span>
<span class="title">{{ $t('solutions') }}</span>
</el-menu-item>
<el-menu-item index="/support">
<span class="title">服务支持</span>
<span class="title">{{ $t('support') }}</span>
</el-menu-item>
<el-menu-item index="/about">
<span class="title">关于我们</span>
<span class="title">{{ $t('about-us') }}</span>
</el-menu-item>
</el-menu>
<!-- 右侧功能区 -->
<div class="header-actions">
<el-input
v-model="searchQuery" class="search-input" placeholder="搜索..." :prefix-icon="Search" clearable
@keyup.enter="handleSearch" />
<el-dropdown>
v-model="searchQuery" class="search-input" :placeholder="$t('search-placeholder')"
:prefix-icon="Search" clearable @keyup.enter="handleSearch" />
<el-dropdown @command="setLocale">
<el-link type="info" :underline="false">
<el-icon class="mdi mdi-translate translate-link" />
</el-link>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item>中文</el-dropdown-item>
<el-dropdown-item>English</el-dropdown-item>
<el-dropdown-item command="zh">中文</el-dropdown-item>
<el-dropdown-item command="en">English</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
@ -43,6 +43,8 @@ v-model="searchQuery" class="search-input" placeholder="搜索..." :prefix-icon=
<script setup lang="ts">
import { Search } from '@element-plus/icons-vue';
const { setLocale } = useI18n();
const searchQuery = ref('')
const handleSearch = () => {

10
app/layouts/default.vue Normal file
View File

@ -0,0 +1,10 @@
<template>
<el-container>
<el-header>
<jinshen-header />
</el-header>
<el-main>
<slot />
</el-main>
</el-container>
</template>

View File

@ -1,4 +1,9 @@
{
"back": "back",
"not-found": "Not found"
"not-found": "Not found",
"productions": "Productions",
"solutions": "Solutions",
"support": "Support",
"about-us": "About Us",
"search-placeholder": "Search..."
}

View File

@ -1,4 +1,9 @@
{
"back": "返回",
"not-found": "页面不存在"
"back": "返回",
"not-found": "页面不存在",
"productions": "产品中心",
"solutions": "解决方案",
"support": "服务支持",
"about-us": "关于我们",
"search-placeholder": "搜索..."
}

View File

@ -4,7 +4,7 @@ import {
presetIcons,
presetTypography,
presetUno,
presetWebFonts,
// presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
@ -21,13 +21,14 @@ export default defineConfig({
scale: 1.2,
}),
presetTypography(),
presetWebFonts({
fonts: {
sans: 'DM Sans',
serif: 'DM Serif Display',
mono: 'DM Mono',
},
}),
// presetWebFonts({
// provider: 'none',
// fonts: {
// sans: 'DM Sans',
// serif: 'DM Serif Display',
// mono: 'DM Mono',
// },
// }),
],
transformers: [
transformerDirectives(),