|
|
|
|
|
|
|
|
<!-- 右侧产品信息 --> |
|
|
<!-- 右侧产品信息 --> |
|
|
<div class="flex flex-col gap-8"> |
|
|
<div class="flex flex-col gap-8"> |
|
|
<!-- 产品名称 --> |
|
|
<!-- 产品名称 --> |
|
|
<div class="bg-zinc-900 rounded-lg p-6"> |
|
|
|
|
|
|
|
|
<div class="bg-zinc-900 rounded-lg p-2 md:p-6"> |
|
|
<h1 class="text-white text-3xl font-medium mb-4"> |
|
|
<h1 class="text-white text-3xl font-medium mb-4"> |
|
|
{{ product.title || product.name }} |
|
|
{{ product.title || product.name }} |
|
|
</h1> |
|
|
</h1> |
|
|
<div class="text-[#71717A] text-lg leading-relaxed"> |
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
class="text-[#71717A] text-sm md:text-base leading-relaxed" |
|
|
|
|
|
> |
|
|
{{ product.summary }} |
|
|
{{ product.summary }} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 产品参数 --> |
|
|
<!-- 产品参数 --> |
|
|
<div class="bg-zinc-900 rounded-lg p-6"> |
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
class="bg-zinc-900 rounded-lg p-2 md:p-6 text-sm md:text-base" |
|
|
|
|
|
> |
|
|
<div class="grid grid-cols-1 gap-4"> |
|
|
<div class="grid grid-cols-1 gap-4"> |
|
|
<div |
|
|
<div |
|
|
class="flex justify-between items-center py-2 border-b border-zinc-800" |
|
|
|
|
|
|
|
|
class="flex justify-between items-center gap-2 py-2 border-b border-zinc-800" |
|
|
> |
|
|
> |
|
|
<span class="text-[#71717A]">{{ |
|
|
|
|
|
|
|
|
<span class="text-[#71717A] whitespace-nowrap">{{ |
|
|
|
|
|
t("products.modelTitle") |
|
|
|
|
|
}}</span> |
|
|
|
|
|
<span class="text-white font-medium">{{ |
|
|
|
|
|
product.model |
|
|
|
|
|
}}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
class="flex justify-between items-center gap-2 py-2 border-b border-zinc-800" |
|
|
|
|
|
> |
|
|
|
|
|
<span class="text-[#71717A] whitespace-nowrap">{{ |
|
|
t("products.categoryTitle") |
|
|
t("products.categoryTitle") |
|
|
}}</span> |
|
|
}}</span> |
|
|
<span class="text-white font-medium" |
|
|
<span class="text-white font-medium" |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<div |
|
|
<div |
|
|
v-if="product.tag" |
|
|
v-if="product.tag" |
|
|
class="flex justify-between items-center py-2 border-b border-zinc-800" |
|
|
|
|
|
|
|
|
class="flex justify-between items-center gap-2 py-2 border-b border-zinc-800" |
|
|
> |
|
|
> |
|
|
<span class="text-[#71717A]">{{ |
|
|
|
|
|
|
|
|
<span class="text-[#71717A] whitespace-nowrap">{{ |
|
|
t("products.seriesTitle") |
|
|
t("products.seriesTitle") |
|
|
}}</span> |
|
|
}}</span> |
|
|
<span class="text-white font-medium">{{ |
|
|
<span class="text-white font-medium">{{ |
|
|
|
|
|
|
|
|
}}</span> |
|
|
}}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div |
|
|
<div |
|
|
class="flex justify-between items-center py-2 border-b border-zinc-800" |
|
|
|
|
|
|
|
|
class="flex justify-between items-center gap-2 py-2 border-b border-zinc-800" |
|
|
> |
|
|
> |
|
|
<span class="text-[#71717A]">{{ |
|
|
|
|
|
|
|
|
<span class="text-[#71717A] whitespace-nowrap">{{ |
|
|
t("products.usageTitle") |
|
|
t("products.usageTitle") |
|
|
}}</span> |
|
|
}}</span> |
|
|
<span class="text-white font-medium">{{ |
|
|
<span class="text-white font-medium">{{ |
|
|
|
|
|
|
|
|
<!-- 产品描述 --> |
|
|
<!-- 产品描述 --> |
|
|
<div |
|
|
<div |
|
|
v-if="product.description" |
|
|
v-if="product.description" |
|
|
class="bg-zinc-900 rounded-lg p-6" |
|
|
|
|
|
|
|
|
class="bg-zinc-900 rounded-lg p-2 md:p-6" |
|
|
> |
|
|
> |
|
|
<h2 class="text-white text-xl font-medium mb-6"> |
|
|
|
|
|
|
|
|
<h2 class="text-white text-xl font-medium mb-2 md:mb-6"> |
|
|
{{ t("products.productDescription") }} |
|
|
{{ t("products.productDescription") }} |
|
|
</h2> |
|
|
</h2> |
|
|
<div |
|
|
<div |
|
|
class="text-[#71717A] leading-relaxed space-y-4 prose prose-invert max-w-none" |
|
|
|
|
|
|
|
|
class="text-[#71717A] leading-relaxed space-y-4 prose prose-invert max-w-none text-sm md:text-base" |
|
|
> |
|
|
> |
|
|
{{ product.description }} |
|
|
{{ product.description }} |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 个人用户产品描述 --> |
|
|
<!-- 个人用户产品描述 --> |
|
|
<div |
|
|
<div |
|
|
v-if="product.meta?.audiences === 0" |
|
|
v-if="product.meta?.audiences === 0" |
|
|
class="bg-zinc-900 rounded-lg p-6" |
|
|
|
|
|
|
|
|
class="bg-zinc-900 rounded-lg p-2 md:p-6" |
|
|
> |
|
|
> |
|
|
<div |
|
|
<div |
|
|
class="text-[#71717A] leading-relaxed space-y-4 prose prose-invert max-w-none" |
|
|
|
|
|
|
|
|
class="text-[#71717A] leading-relaxed space-y-4 prose prose-invert max-w-none text-sm md:text-base" |
|
|
> |
|
|
> |
|
|
<ContentRenderer :value="product.content" /> |
|
|
<ContentRenderer :value="product.content" /> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 相关产品 --> |
|
|
<!-- 相关产品 --> |
|
|
<div |
|
|
<div |
|
|
v-if="relatedProducts.length > 0" |
|
|
v-if="relatedProducts.length > 0" |
|
|
class="bg-zinc-900 rounded-lg p-6" |
|
|
|
|
|
|
|
|
class="bg-zinc-900 rounded-lg p-2 md:p-6" |
|
|
> |
|
|
> |
|
|
<h2 class="text-white text-xl font-medium mb-6"> |
|
|
|
|
|
|
|
|
<h2 class="text-white text-xl font-medium mb-2 md:mb-6"> |
|
|
{{ t("products.relatedProducts") }} |
|
|
{{ t("products.relatedProducts") }} |
|
|
</h2> |
|
|
</h2> |
|
|
<div |
|
|
|
|
|
class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
<div class="grid grid-cols-2 md:grid-cols-3 gap-4"> |
|
|
<nuxt-link |
|
|
<nuxt-link |
|
|
v-for="relatedProduct in relatedProducts" |
|
|
v-for="relatedProduct in relatedProducts" |
|
|
:key="relatedProduct.id" |
|
|
:key="relatedProduct.id" |
|
|
|
|
|
|
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<h3 |
|
|
<h3 |
|
|
class="text-white text-lg font-medium mb-2 line-clamp-2" |
|
|
|
|
|
|
|
|
class="text-white text-base md:text-lg font-medium mb-2 line-clamp-2" |
|
|
> |
|
|
> |
|
|
{{ relatedProduct.title || relatedProduct.name }} |
|
|
{{ relatedProduct.title || relatedProduct.name }} |
|
|
</h3> |
|
|
</h3> |
|
|
|
|
|
|
|
|
<!-- 企业用户产品描述 --> |
|
|
<!-- 企业用户产品描述 --> |
|
|
<div |
|
|
<div |
|
|
v-if="product.meta?.audiences === 1" |
|
|
v-if="product.meta?.audiences === 1" |
|
|
class="bg-zinc-900 rounded-lg p-6 mt-6" |
|
|
|
|
|
|
|
|
class="bg-zinc-900 rounded-lg p-2 md:p-6 mt-6 full-table-screen" |
|
|
> |
|
|
> |
|
|
<div |
|
|
<div |
|
|
class="text-[#71717A] leading-relaxed space-y-4 prose prose-invert max-w-none" |
|
|
|
|
|
|
|
|
class="text-[#71717A] leading-relaxed space-y-4 prose prose-invert max-w-none text-sm md:text-base" |
|
|
> |
|
|
> |
|
|
<ContentRenderer :value="product.content" /> |
|
|
|
|
|
|
|
|
<ContentRenderer |
|
|
|
|
|
:value="product.content" |
|
|
|
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
* 展示产品主图、参数和描述 |
|
|
* 展示产品主图、参数和描述 |
|
|
*/ |
|
|
*/ |
|
|
import { useErrorHandler } from "~/composables/useErrorHandler"; |
|
|
import { useErrorHandler } from "~/composables/useErrorHandler"; |
|
|
|
|
|
import { useTableHighlight } from "~/composables/useTableHighlight"; |
|
|
import { useRoute, useI18n, useAsyncData } from "#imports"; |
|
|
import { useRoute, useI18n, useAsyncData } from "#imports"; |
|
|
import { queryCollection } from "#imports"; |
|
|
import { queryCollection } from "#imports"; |
|
|
import { ContentRenderer } from "#components"; |
|
|
import { ContentRenderer } from "#components"; |
|
|
|
|
|
|
|
|
import "swiper/css/effect-fade"; |
|
|
import "swiper/css/effect-fade"; |
|
|
|
|
|
|
|
|
const { error, isLoading } = useErrorHandler(); |
|
|
const { error, isLoading } = useErrorHandler(); |
|
|
|
|
|
const { initTableHighlight } = useTableHighlight(); |
|
|
const route = useRoute(); |
|
|
const route = useRoute(); |
|
|
const { locale, t } = useI18n(); |
|
|
const { locale, t } = useI18n(); |
|
|
const id = route.params.id as string; |
|
|
const id = route.params.id as string; |
|
|
|
|
|
|
|
|
interface Product { |
|
|
interface Product { |
|
|
id: string; |
|
|
id: string; |
|
|
name: string; |
|
|
name: string; |
|
|
|
|
|
model: string; |
|
|
usage: string[]; |
|
|
usage: string[]; |
|
|
capacities: string[]; |
|
|
capacities: string[]; |
|
|
category: string; |
|
|
category: string; |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
id: id, |
|
|
id: id, |
|
|
name: String(meta.name || productContent.value.title || ""), |
|
|
name: String(meta.name || productContent.value.title || ""), |
|
|
|
|
|
model: String(meta.model || ""), |
|
|
title: String(productContent.value.title || meta.name || ""), |
|
|
title: String(productContent.value.title || meta.name || ""), |
|
|
usage: Array.isArray(meta.usage) ? meta.usage : [], |
|
|
usage: Array.isArray(meta.usage) ? meta.usage : [], |
|
|
capacities: Array.isArray(meta.capacities) ? meta.capacities : [], |
|
|
capacities: Array.isArray(meta.capacities) ? meta.capacities : [], |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 初始化表格高亮功能 |
|
|
|
|
|
initTableHighlight(computed(() => product.value?.model || "")); |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取相关产品 |
|
|
* 获取相关产品 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
aspect-ratio: 1 / 1; |
|
|
aspect-ratio: 1 / 1; |
|
|
position: relative; |
|
|
position: relative; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 表格样式和高亮效果 */ |
|
|
|
|
|
:deep(.full-table-screen .prose table) { |
|
|
|
|
|
@apply border-collapse border border-zinc-700 rounded-lg overflow-hidden; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose thead) { |
|
|
|
|
|
@apply bg-zinc-800; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th) { |
|
|
|
|
|
@apply px-6 py-3 text-left text-base font-medium text-zinc-300 uppercase tracking-wider border-b border-zinc-700; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose tbody) { |
|
|
|
|
|
@apply bg-zinc-900 divide-y divide-zinc-700; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
@apply px-6 py-4 text-sm text-zinc-300 border-b border-zinc-700/50; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose tr) { |
|
|
|
|
|
@apply transition-colors duration-200; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose tr:hover:not(.highlighted-model-row)) { |
|
|
|
|
|
@apply bg-zinc-800/50; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 高亮当前型号对应的行 */ |
|
|
|
|
|
:deep(.full-table-screen .prose tr.highlighted-model-row) { |
|
|
|
|
|
@apply bg-cyan-500/20 border border-cyan-400/50; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose tr.highlighted-model-row td) { |
|
|
|
|
|
@apply text-cyan-400 font-medium; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 表格响应式处理 */ |
|
|
|
|
|
@media (max-width: 640px) { |
|
|
|
|
|
:deep(.prose table) { |
|
|
|
|
|
font-size: 0.875rem; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
@apply px-3 py-2; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 表格响应式容器 */ |
|
|
|
|
|
:deep(.full-table-screen .prose) { |
|
|
|
|
|
/* 为包含表格的容器添加水平滚动 */ |
|
|
|
|
|
& > *:has(table) { |
|
|
|
|
|
overflow-x: auto; |
|
|
|
|
|
-webkit-overflow-scrolling: touch; |
|
|
|
|
|
scrollbar-width: thin; |
|
|
|
|
|
scrollbar-color: theme("colors.cyan.400") theme("colors.zinc.800"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 自定义滚动条样式 */ |
|
|
|
|
|
& > *:has(table)::-webkit-scrollbar { |
|
|
|
|
|
height: 8px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
& > *:has(table)::-webkit-scrollbar-track { |
|
|
|
|
|
background: theme("colors.zinc.800"); |
|
|
|
|
|
border-radius: 4px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
& > *:has(table)::-webkit-scrollbar-thumb { |
|
|
|
|
|
background: theme("colors.cyan.400"); |
|
|
|
|
|
border-radius: 4px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
& > *:has(table)::-webkit-scrollbar-thumb:hover { |
|
|
|
|
|
background: theme("colors.cyan.300"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 小屏幕表格优化 */ |
|
|
|
|
|
@media (max-width: 768px) { |
|
|
|
|
|
:deep(.full-table-screen .prose table) { |
|
|
|
|
|
min-width: 100%; |
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
@apply px-2 py-2 text-xs; |
|
|
|
|
|
min-width: 100px; /* 确保最小宽度 */ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 高亮列在小屏幕上更明显 */ |
|
|
|
|
|
:deep(.full-table-screen .prose td.highlighted-model-column), |
|
|
|
|
|
:deep(.full-table-screen .prose th.highlighted-model-column) { |
|
|
|
|
|
@apply bg-cyan-500/30; |
|
|
|
|
|
position: sticky; |
|
|
|
|
|
z-index: 10; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose td.highlighted-model-column)::before, |
|
|
|
|
|
:deep(.full-table-screen .prose th.highlighted-model-column)::before { |
|
|
|
|
|
width: 4px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 超小屏幕处理 */ |
|
|
|
|
|
@media (max-width: 480px) { |
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
@apply px-1 py-1 text-xs; |
|
|
|
|
|
min-width: 80px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 为高亮列添加固定位置,确保始终可见 */ |
|
|
|
|
|
:deep(.full-table-screen .prose td.highlighted-model-column), |
|
|
|
|
|
:deep(.full-table-screen .prose th.highlighted-model-column) { |
|
|
|
|
|
position: sticky; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
z-index: 20; |
|
|
|
|
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 列高亮基础样式 */ |
|
|
|
|
|
:deep(.full-table-screen .prose td.highlighted-model-column), |
|
|
|
|
|
:deep(.full-table-screen .prose th.highlighted-model-column) { |
|
|
|
|
|
@apply bg-cyan-500/20 text-cyan-400 font-medium; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose td.highlighted-model-column)::before, |
|
|
|
|
|
:deep(.full-table-screen .prose th.highlighted-model-column)::before { |
|
|
|
|
|
content: ""; |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
bottom: 0; |
|
|
|
|
|
width: 3px; |
|
|
|
|
|
background-color: theme("colors.cyan.400"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 表格行悬停效果 */ |
|
|
|
|
|
:deep(.full-table-screen .prose tr:hover td:not(.highlighted-model-column)) { |
|
|
|
|
|
@apply bg-zinc-800/30; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 表格响应式包装器样式 */ |
|
|
|
|
|
:deep(.table-responsive-wrapper) { |
|
|
|
|
|
border-radius: 8px; |
|
|
|
|
|
background: theme("colors.zinc.900"); |
|
|
|
|
|
margin: 1rem 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.scroll-indicator) { |
|
|
|
|
|
animation: fadeInOut 3s ease-in-out infinite; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@keyframes fadeInOut { |
|
|
|
|
|
0%, |
|
|
|
|
|
100% { |
|
|
|
|
|
opacity: 0.6; |
|
|
|
|
|
} |
|
|
|
|
|
50% { |
|
|
|
|
|
opacity: 1; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 优化表格在响应式包装器中的显示 */ |
|
|
|
|
|
:deep(.table-responsive-wrapper table) { |
|
|
|
|
|
margin: 0; |
|
|
|
|
|
border-radius: 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 滚动条增强 */ |
|
|
|
|
|
:deep(.table-responsive-wrapper::-webkit-scrollbar) { |
|
|
|
|
|
height: 12px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.table-responsive-wrapper::-webkit-scrollbar-track) { |
|
|
|
|
|
background: theme("colors.zinc.800"); |
|
|
|
|
|
border-radius: 6px; |
|
|
|
|
|
margin: 0 8px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.table-responsive-wrapper::-webkit-scrollbar-thumb) { |
|
|
|
|
|
background: linear-gradient( |
|
|
|
|
|
45deg, |
|
|
|
|
|
theme("colors.cyan.500"), |
|
|
|
|
|
theme("colors.cyan.400") |
|
|
|
|
|
); |
|
|
|
|
|
border-radius: 6px; |
|
|
|
|
|
border: 2px solid theme("colors.zinc.800"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.table-responsive-wrapper::-webkit-scrollbar-thumb:hover) { |
|
|
|
|
|
background: linear-gradient( |
|
|
|
|
|
45deg, |
|
|
|
|
|
theme("colors.cyan.400"), |
|
|
|
|
|
theme("colors.cyan.300") |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 简化的表格响应式处理 - 覆盖之前的复杂样式 */ |
|
|
|
|
|
:deep(.full-table-screen .prose table) { |
|
|
|
|
|
min-width: 700px !important; |
|
|
|
|
|
width: 100% !important; |
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
white-space: nowrap !important; |
|
|
|
|
|
min-width: 100px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 移动设备优化 */ |
|
|
|
|
|
@media (max-width: 768px) { |
|
|
|
|
|
:deep(.full-table-screen .prose table) { |
|
|
|
|
|
min-width: 800px !important; |
|
|
|
|
|
font-size: 0.875rem; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
min-width: 80px; |
|
|
|
|
|
padding: 0.5rem 0.25rem !important; |
|
|
|
|
|
font-size: 0.75rem; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 480px) { |
|
|
|
|
|
:deep(.full-table-screen .prose table) { |
|
|
|
|
|
min-width: 600px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
min-width: 90px !important; |
|
|
|
|
|
padding: 0.25rem 0.375rem !important; |
|
|
|
|
|
font-size: 0.75rem !important; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 优化单元格宽度 - 更合适的显示空间 */ |
|
|
|
|
|
:deep(.full-table-screen .prose table) { |
|
|
|
|
|
min-width: 1000px !important; /* 增加整体表格宽度 */ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
min-width: 150px !important; /* 增加单元格最小宽度 */ |
|
|
|
|
|
max-width: 300px; /* 设置最大宽度避免过宽 */ |
|
|
|
|
|
padding: 0.75rem 1rem !important; /* 增加内边距 */ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 第一列(通常是标题列)给更多宽度 */ |
|
|
|
|
|
:deep(.full-table-screen .prose th:first-child), |
|
|
|
|
|
:deep(.full-table-screen .prose td:first-child) { |
|
|
|
|
|
min-width: 200px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 针对不同屏幕尺寸的优化 */ |
|
|
|
|
|
@media (max-width: 1024px) { |
|
|
|
|
|
:deep(.full-table-screen .prose table) { |
|
|
|
|
|
min-width: 900px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
min-width: 130px !important; |
|
|
|
|
|
padding: 0.5rem 0.75rem !important; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 768px) { |
|
|
|
|
|
:deep(.full-table-screen .prose table) { |
|
|
|
|
|
min-width: 800px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
min-width: 120px !important; |
|
|
|
|
|
padding: 0.5rem 0.5rem !important; |
|
|
|
|
|
font-size: 0.875rem !important; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 640px) { |
|
|
|
|
|
:deep(.full-table-screen .prose table) { |
|
|
|
|
|
min-width: 700px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
min-width: 100px !important; |
|
|
|
|
|
padding: 0.375rem 0.5rem !important; |
|
|
|
|
|
font-size: 0.8rem !important; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 480px) { |
|
|
|
|
|
:deep(.full-table-screen .prose table) { |
|
|
|
|
|
min-width: 600px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
min-width: 90px !important; |
|
|
|
|
|
padding: 0.25rem 0.375rem !important; |
|
|
|
|
|
font-size: 0.75rem !important; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 单元格内容截断和悬停显示 */ |
|
|
|
|
|
:deep(.full-table-screen .prose th), |
|
|
|
|
|
:deep(.full-table-screen .prose td) { |
|
|
|
|
|
position: relative; |
|
|
|
|
|
overflow: hidden !important; |
|
|
|
|
|
text-overflow: ellipsis !important; |
|
|
|
|
|
white-space: nowrap !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 悬停时显示完整内容 */ |
|
|
|
|
|
:deep(.full-table-screen .prose th:hover), |
|
|
|
|
|
:deep(.full-table-screen .prose td:hover) { |
|
|
|
|
|
overflow: visible !important; |
|
|
|
|
|
white-space: normal !important; |
|
|
|
|
|
z-index: 100; |
|
|
|
|
|
background-color: theme("colors.zinc.800") !important; |
|
|
|
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), |
|
|
|
|
|
0 2px 4px -1px rgba(0, 0, 0, 0.06); |
|
|
|
|
|
border-radius: 4px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 高亮列的悬停效果 */ |
|
|
|
|
|
:deep(.full-table-screen .prose th.highlighted-model-column:hover), |
|
|
|
|
|
:deep(.full-table-screen .prose td.highlighted-model-column:hover) { |
|
|
|
|
|
background-color: theme("colors.cyan.600") !important; |
|
|
|
|
|
color: white !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 确保悬停时的文本不会被遮挡 */ |
|
|
|
|
|
:deep(.full-table-screen .prose table) { |
|
|
|
|
|
position: relative; |
|
|
|
|
|
z-index: 1; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.full-table-screen .prose th:hover), |
|
|
|
|
|
:deep(.full-table-screen .prose td:hover) { |
|
|
|
|
|
position: relative; |
|
|
|
|
|
z-index: 101; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |