fix: 相关命名修正

- production -> product
This commit is contained in:
2025-10-24 16:41:48 +08:00
parent e780997a69
commit 963690bf53
13 changed files with 108 additions and 131 deletions

View File

@ -20,8 +20,8 @@
<NuxtLinkLocale to="/">{{ $t('navigation.home') }}</NuxtLinkLocale>
</li>
<li>
<NuxtLink :to="$localePath('/productions')">{{
$t('navigation.productions')
<NuxtLink :to="$localePath('/products')">{{
$t('navigation.products')
}}</NuxtLink>
</li>
<li>

View File

@ -21,8 +21,8 @@
:persistent="false"
router
>
<el-menu-item index="productions" :route="$localePath('/productions')">
<span class="title">{{ $t('navigation.productions') }}</span>
<el-menu-item index="products" :route="$localePath('/products')">
<span class="title">{{ $t('navigation.products') }}</span>
</el-menu-item>
<el-menu-item index="solutions" :route="$localePath('/solutions')">
<span class="title">{{ $t('navigation.solutions') }}</span>
@ -81,8 +81,8 @@
const refreshMenu = () => {
const path = router.currentRoute.value.path;
if (path.startsWith('/productions')) {
activeName.value = 'productions';
if (path.startsWith('/products')) {
activeName.value = 'products';
} else if (path.startsWith('/solutions')) {
activeName.value = 'solutions';
} else if (path.startsWith('/support')) {

View File

@ -1,14 +1,14 @@
<template>
<el-card class="production-card" @click="handleClick">
<el-card class="product-card" @click="handleClick">
<template #header>
<!-- Image -->
<el-image class="production-image" :src="imageUrl" fit="contain" />
<el-image class="product-image" :src="imageUrl" fit="contain" />
</template>
<div class="card-body">
<!-- Name -->
<div class="text-center">
<span class="production-name">{{ name }}</span>
<span class="product-name">{{ name }}</span>
</div>
<!-- Description -->
<div class="card-description text-left opacity-25">{{ description }}</div>
@ -32,25 +32,25 @@
// 使 slug使 id
const routeParam = props.slug || props.id;
if (routeParam) {
navigateTo(localePath(`/productions/${routeParam}`));
navigateTo(localePath(`/products/${routeParam}`));
}
};
</script>
<style scoped>
.production-card {
.product-card {
width: 30%;
cursor: pointer;
transition: all 0.3s ease;
text-align: center;
}
.production-card:hover {
.product-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.production-name {
.product-name {
font-size: 1rem;
font-weight: 600;
}
@ -60,7 +60,7 @@
margin-top: 5px;
}
.production-card .el-image {
.product-card .el-image {
height: 150px;
border-radius: 4px;
}
@ -73,13 +73,13 @@
/* 响应式设计 */
@media (max-width: 1200px) {
.production-card {
.product-card {
width: 45%;
}
}
@media (max-width: 768px) {
.production-card {
.product-card {
width: 90%;
}
}

View File

@ -84,7 +84,7 @@
});
const indexLabels = computed<Record<string, string>>(() => ({
production: t('search.sections.production'),
product: t('search.sections.product'),
solution: t('search.sections.solution'),
support: t('search.sections.support'),
default: t('search.sections.default'),
@ -116,7 +116,7 @@
const slug = String(slugCandidate);
if (item.type === 'product') {
return localePath({ path: `/productions/${slug}` });
return localePath({ path: `/products/${slug}` });
}
if (item.type === 'solution') {