feat: 补全i18n适配 #57
@ -8,15 +8,17 @@
|
|||||||
</template>
|
</template>
|
||||||
<dl class="text-gray-600 space-y-1 mb-6">
|
<dl class="text-gray-600 space-y-1 mb-6">
|
||||||
<div>
|
<div>
|
||||||
<dt class="font-semibold inline">类型:</dt>
|
<dt class="font-semibold inline">{{ $t('document-meta.type') }}:</dt>
|
||||||
<dd class="inline">{{ file.type }}</dd>
|
<dd class="inline">{{ file.type }}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<dt class="font-semibold inline">大小:</dt>
|
<dt class="font-semibold inline">{{ $t('document-meta.size') }}:</dt>
|
||||||
<dd class="inline">{{ formatFileSize(file.filesize) }}</dd>
|
<dd class="inline">{{ formatFileSize(file.filesize) }}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<dt class="font-semibold inline">上传时间:</dt>
|
<dt class="font-semibold inline">
|
||||||
|
{{ $t('document-meta.upload-at') }}:
|
||||||
|
</dt>
|
||||||
<dd class="inline">
|
<dd class="inline">
|
||||||
{{ new Date(file.uploaded_on).toLocaleDateString() }}
|
{{ new Date(file.uploaded_on).toLocaleDateString() }}
|
||||||
</dd>
|
</dd>
|
||||||
@ -24,10 +26,12 @@
|
|||||||
</dl>
|
</dl>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<el-button type="primary" @click="handleDownload">下载</el-button>
|
<el-button type="primary" @click="handleDownload">{{
|
||||||
<el-button v-if="file.previewable" @click="handlePreview"
|
$t('document-action.download')
|
||||||
>预览</el-button
|
}}</el-button>
|
||||||
>
|
<el-button v-if="file.previewable" @click="handlePreview">{{
|
||||||
|
$t('document-action.preview')
|
||||||
|
}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="homepage-section">
|
<section class="homepage-section">
|
||||||
<h2>推荐产品</h2>
|
<h2>{{ $t('homepage.recommended-products') }}</h2>
|
||||||
<p>
|
<p>
|
||||||
探索我们的精选产品,满足您的各种需求。无论是创新技术还是经典设计,我们都为您提供优质选择。
|
{{ $t('homepage.recommended-products-desc') }}
|
||||||
</p>
|
</p>
|
||||||
<div v-if="!pending">
|
<div v-if="!pending">
|
||||||
<el-carousel
|
<el-carousel
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="homepage-section">
|
<section class="homepage-section">
|
||||||
<h2>推荐解决方案</h2>
|
<h2>{{ $t('homepage.recommended-solutions') }}</h2>
|
||||||
<p>了解我们的定制解决方案,帮助您优化业务流程,提高效率。</p>
|
<p>{{ $t('homepage.recommended-solutions-desc') }}</p>
|
||||||
<div v-if="!pending">
|
<div v-if="!pending">
|
||||||
<el-carousel
|
<el-carousel
|
||||||
class="recommend-carousel"
|
class="recommend-carousel"
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<NuxtLink class="card-link" :to="to">
|
<NuxtLink class="card-link" :to="to">
|
||||||
<el-button class="card-button" round>
|
<el-button class="card-button" round>
|
||||||
<span>了解更多 > </span>
|
<span>{{ $t('learn-more') }} > </span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|||||||
@ -21,10 +21,10 @@
|
|||||||
|
|
||||||
const activeTab = ref(props.modelValue || '');
|
const activeTab = ref(props.modelValue || '');
|
||||||
const options = [
|
const options = [
|
||||||
{ label: '服务支持', value: '' },
|
{ label: $t('navigation.support'), value: '' },
|
||||||
{ label: '常见问题', value: 'faq' },
|
{ label: $t('navigation.faq'), value: 'faq' },
|
||||||
{ label: '文档资料', value: 'documents' },
|
{ label: $t('navigation.documents'), value: 'documents' },
|
||||||
{ label: '联系售后', value: 'contact-us' },
|
{ label: $t('navigation.contact-info'), value: 'contact-us' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const handleSegmentedChange = (value: string) => {
|
const handleSegmentedChange = (value: string) => {
|
||||||
|
|||||||
@ -10,10 +10,10 @@
|
|||||||
<h3>{{ doc.title }}</h3>
|
<h3>{{ doc.title }}</h3>
|
||||||
<div class="document-content">
|
<div class="document-content">
|
||||||
<span v-if="doc.size" class="document-meta"
|
<span v-if="doc.size" class="document-meta"
|
||||||
>大小: {{ formatFileSize(doc.size) }}
|
>{{ $t('document-meta.size') }}: {{ formatFileSize(doc.size) }}
|
||||||
</span>
|
</span>
|
||||||
<span v-if="doc.filename" class="document-meta"
|
<span v-if="doc.filename" class="document-meta"
|
||||||
>格式:
|
>{{ $t('document-meta.format') }}:
|
||||||
{{ formatFileExtension(getFileExtension(doc.filename)) }}</span
|
{{ formatFileExtension(getFileExtension(doc.filename)) }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
:disabled="!fileMeta"
|
:disabled="!fileMeta"
|
||||||
@click="openInNewTab"
|
@click="openInNewTab"
|
||||||
>
|
>
|
||||||
在新标签打开
|
{{ $t('document-action.open-in-new-tab') }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="px-3 py-1.5 rounded bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50"
|
class="px-3 py-1.5 rounded bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
:disabled="!fileMeta"
|
:disabled="!fileMeta"
|
||||||
@click="download"
|
@click="download"
|
||||||
>
|
>
|
||||||
下载
|
{{ $t('document-action.download') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
@ -37,7 +37,7 @@
|
|||||||
<div class="flex-1 overflow-hidden">
|
<div class="flex-1 overflow-hidden">
|
||||||
<!-- 加载状态 -->
|
<!-- 加载状态 -->
|
||||||
<div v-if="pending" class="h-48 grid place-items-center border rounded">
|
<div v-if="pending" class="h-48 grid place-items-center border rounded">
|
||||||
正在加载...
|
{{ $t('loading') }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="errorText"
|
v-else-if="errorText"
|
||||||
|
|||||||
@ -89,11 +89,11 @@
|
|||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="drawer-header">
|
<div class="drawer-header">
|
||||||
<h1>菜单</h1>
|
<h1>{{ $t('mobile-menu.title') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<h2>站点导航</h2>
|
<h2>{{ $t('mobile-menu.navigation') }}</h2>
|
||||||
<el-menu
|
<el-menu
|
||||||
:default-active="activeName"
|
:default-active="activeName"
|
||||||
class="mobile-menu"
|
class="mobile-menu"
|
||||||
@ -118,7 +118,7 @@
|
|||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
|
|
||||||
<h2>实用工具</h2>
|
<h2>{{ $t('mobile-menu.utilities') }}</h2>
|
||||||
<el-menu
|
<el-menu
|
||||||
:default-active="activeName"
|
:default-active="activeName"
|
||||||
class="mobile-menu"
|
class="mobile-menu"
|
||||||
|
|||||||
@ -2,10 +2,12 @@
|
|||||||
<div class="question-category">
|
<div class="question-category">
|
||||||
<el-row class="hide-on-mobile" :gutter="12">
|
<el-row class="hide-on-mobile" :gutter="12">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<span class="select-label">产品分类</span>
|
<span class="select-label">{{
|
||||||
|
$t('product-filter.product-type')
|
||||||
|
}}</span>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="model.selectedType"
|
v-model="model.selectedType"
|
||||||
placeholder="选择产品类型"
|
:placeholder="$t('product-filter.select-product-type')"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@ -18,10 +20,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<span class="select-label">产品系列</span>
|
<span class="select-label">{{
|
||||||
|
$t('product-filter.product-model')
|
||||||
|
}}</span>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="model.selectedProduct"
|
v-model="model.selectedProduct"
|
||||||
placeholder="选择系列产品"
|
:placeholder="$t('product-filter.select-product-model')"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@ -34,10 +38,10 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<span class="select-label">关键词</span>
|
<span class="select-label">{{ $t('product-filter.keyword') }}</span>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="model.keyword"
|
v-model="model.keyword"
|
||||||
placeholder="输入关键词..."
|
:placeholder="$t('product-filter.enter-keyword')"
|
||||||
clearable
|
clearable
|
||||||
:prefix-icon="Search"
|
:prefix-icon="Search"
|
||||||
/>
|
/>
|
||||||
@ -45,10 +49,12 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="display-on-mobile" :gutter="12">
|
<el-row class="display-on-mobile" :gutter="12">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<span class="select-label">产品分类</span>
|
<span class="select-label">{{
|
||||||
|
$t('product-filter.product-type')
|
||||||
|
}}</span>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="model.selectedType"
|
v-model="model.selectedType"
|
||||||
placeholder="选择产品类型"
|
:placeholder="$t('product-filter.select-product-type')"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@ -61,10 +67,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<span class="select-label">产品系列</span>
|
<span class="select-label">{{
|
||||||
|
$t('product-filter.product-model')
|
||||||
|
}}</span>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="model.selectedProduct"
|
v-model="model.selectedProduct"
|
||||||
placeholder="选择系列产品"
|
:placeholder="$t('product-filter.select-product-model')"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@ -77,10 +85,10 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="display-on-mobile">
|
<el-row class="display-on-mobile">
|
||||||
<span class="select-label">关键词</span>
|
<span class="select-label">{{ $t('product-filter.keyword') }}</span>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="model.keyword"
|
v-model="model.keyword"
|
||||||
placeholder="输入关键词..."
|
:placeholder="$t('product-filter.enter-keyword')"
|
||||||
clearable
|
clearable
|
||||||
:prefix-icon="Search"
|
:prefix-icon="Search"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<markdown-renderer :content="content.content || ''" />
|
<markdown-renderer :content="content.content || ''" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-divider content-position="left">更多信息</el-divider>
|
<el-divider content-position="left">{{ $t('learn-more') }}</el-divider>
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<NuxtLink :to="$localePath('/support/contact-us')">
|
<NuxtLink :to="$localePath('/support/contact-us')">
|
||||||
<el-card class="card-button">
|
<el-card class="card-button">
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<ElIconService />
|
<ElIconService />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<br />
|
<br />
|
||||||
联系信息
|
{{ $t('navigation.contact-info') }}
|
||||||
</el-card>
|
</el-card>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1 class="page-title">文件下载</h1>
|
<h1 class="page-title">{{ $t('navigation.downloads') }}</h1>
|
||||||
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!pending" class="page-content">
|
<div v-if="!pending" class="page-content">
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<section style="margin-bottom: 2rem">
|
<section style="margin-bottom: 2rem">
|
||||||
<p>
|
<p>
|
||||||
金申机械制造有限公司致力于为客户提供优质的产品与服务。针对纸管机、分纸机、纸吸管等产品,我们提供全方位的售后服务,确保客户能够安心地使用我们的产品。
|
{{ $t('support-page-desc') }}
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
<div class="card-group">
|
<div class="card-group">
|
||||||
@ -35,19 +35,19 @@
|
|||||||
const supportItems = [
|
const supportItems = [
|
||||||
{
|
{
|
||||||
title: $t('navigation.faq'),
|
title: $t('navigation.faq'),
|
||||||
description: '我们为用户整理了常见问题的答案,帮助您快速解决疑惑。',
|
description: $t('support-card-desc.faq'),
|
||||||
to: localePath('/support/faq'),
|
to: localePath('/support/faq'),
|
||||||
iconComponent: ElIconQuestionFilled,
|
iconComponent: ElIconQuestionFilled,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: $t('navigation.documents'),
|
title: $t('navigation.documents'),
|
||||||
description: '我们为用户整理了常见问题的答案,帮助您快速解决疑惑。',
|
description: $t('support-card-desc.documents'),
|
||||||
to: localePath('/support/documents'),
|
to: localePath('/support/documents'),
|
||||||
iconComponent: ElIconDocumentChecked,
|
iconComponent: ElIconDocumentChecked,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: $t('navigation.contact-info'),
|
title: $t('navigation.contact-info'),
|
||||||
description: '通过电话、邮箱联系我们,我们将现场为您服务。',
|
description: $t('support-card-desc.contact-info'),
|
||||||
to: localePath('/support/contact-us'),
|
to: localePath('/support/contact-us'),
|
||||||
iconComponent: ElIconService,
|
iconComponent: ElIconService,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -63,5 +63,42 @@
|
|||||||
"loading": "Loading...",
|
"loading": "Loading...",
|
||||||
"our-products": "Our Products",
|
"our-products": "Our Products",
|
||||||
"learn-our-solutions": "Learn Our Solutions",
|
"learn-our-solutions": "Learn Our Solutions",
|
||||||
"all": "All"
|
"all": "All",
|
||||||
|
"support-page-desc": "Zhejiang Jinshen Machinery Manufacturing Co., Ltd is committed to providing high-quality products and services to our customers. For products such as paper tube machines, slitting machines, and paper straw equipment, we offer comprehensive after-sales support to ensure our customers can use our products with confidence.",
|
||||||
|
"support-card-desc": {
|
||||||
|
"faq": "We have compiled answers to frequently asked questions to help you quickly resolve any concerns.",
|
||||||
|
"documents": "We provide product manuals, technical specifications, and other documentation for easy reference.",
|
||||||
|
"contact-info": "Contact us by phone or email, and we will provide on-site support for you."
|
||||||
|
},
|
||||||
|
|
||||||
|
"product-filter": {
|
||||||
|
"product-type": "Product type",
|
||||||
|
"product-model": "Product model",
|
||||||
|
"keyword": "Keyword",
|
||||||
|
"select-product-type": "Select product type",
|
||||||
|
"select-product-model": "Select product model",
|
||||||
|
"enter-keyword": "Enter keyword"
|
||||||
|
},
|
||||||
|
"document-meta": {
|
||||||
|
"size": "Size",
|
||||||
|
"format": "Format",
|
||||||
|
"type": "Type",
|
||||||
|
"upload-at": "Upload at"
|
||||||
|
},
|
||||||
|
"document-action": {
|
||||||
|
"download": "Download",
|
||||||
|
"open-in-new-tab": "Open in New Tab",
|
||||||
|
"preview": "Preview"
|
||||||
|
},
|
||||||
|
"mobile-menu": {
|
||||||
|
"title": "Menu",
|
||||||
|
"navigation": "Navigation",
|
||||||
|
"utilities": "Utilities"
|
||||||
|
},
|
||||||
|
"homepage": {
|
||||||
|
"recommended-products": "Recommended Products",
|
||||||
|
"recommended-products-desc": "Explore our curated selection of products to meet your diverse needs. Whether it's innovative technology or classic designs, we offer quality choices for you.",
|
||||||
|
"recommended-solutions": "Recommended Solutions",
|
||||||
|
"recommended-solutions-desc": "Learn about our tailored solutions designed to help your business thrive in a competitive market."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,5 +63,41 @@
|
|||||||
"loading": "加载中...",
|
"loading": "加载中...",
|
||||||
"our-products": "我们的产品",
|
"our-products": "我们的产品",
|
||||||
"learn-our-solutions": "了解我们的解决方案",
|
"learn-our-solutions": "了解我们的解决方案",
|
||||||
"all": "全部"
|
"all": "全部",
|
||||||
|
"support-page-desc": "金申机械制造有限公司致力于为客户提供优质的产品与服务。针对纸管机、分纸机、纸吸管等产品,我们提供全方位的售后服务,确保客户能够安心地使用我们的产品。公司名可用占位符代替",
|
||||||
|
"support-card-desc": {
|
||||||
|
"faq": "我们为用户整理了常见问题的答案,帮助您快速解决疑惑。",
|
||||||
|
"documents": "提供产品手册、技术规格等文档资料,方便用户查阅。",
|
||||||
|
"contact-info": "通过电话、邮箱联系我们,我们将现场为您服务。"
|
||||||
|
},
|
||||||
|
"product-filter": {
|
||||||
|
"product-type": "产品类型",
|
||||||
|
"product-model": "产品系列",
|
||||||
|
"keyword": "关键词",
|
||||||
|
"select-product-type": "选择产品类型",
|
||||||
|
"select-product-model": "选择产品系列",
|
||||||
|
"enter-keyword": "输入关键词"
|
||||||
|
},
|
||||||
|
"document-meta": {
|
||||||
|
"size": "大小",
|
||||||
|
"format": "格式",
|
||||||
|
"type": "类型",
|
||||||
|
"upload-at": "上传时间"
|
||||||
|
},
|
||||||
|
"document-action": {
|
||||||
|
"download": "下载",
|
||||||
|
"open-in-new-tab": "在新标签页打开",
|
||||||
|
"preview": "预览"
|
||||||
|
},
|
||||||
|
"mobile-menu": {
|
||||||
|
"title": "菜单",
|
||||||
|
"navigation": "站内导航",
|
||||||
|
"utilities": "实用工具"
|
||||||
|
},
|
||||||
|
"homepage": {
|
||||||
|
"recommended-products": "推荐产品",
|
||||||
|
"recommended-products-desc": "探索我们的精选产品,满足您的各种需求。无论是创新技术还是经典设计,我们都为您提供优质选择。",
|
||||||
|
"recommended-solutions": "推荐解决方案",
|
||||||
|
"recommended-solutions-desc": "了解我们的定制解决方案,帮助您优化业务流程,提高效率。"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user