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> <template>
<div> <div>
<NuxtLayout>
<NuxtPage /> <NuxtPage />
</NuxtLayout>
</div> </div>
</template> </template>

View File

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

View File

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