--- import { galleryConfig } from '../data/gallery-config.js'; // 导入所有组件 import HeroSection from '../components/sections/HeroSection.astro'; import FullBleedSection from '../components/sections/FullBleedSection.astro'; import DualSection from '../components/sections/DualSection.astro'; import GridSection from '../components/sections/GridSection.astro'; import QuadGridSection from '../components/sections/QuadGridSection.astro'; import ScenerySection from '../components/sections/ScenerySection.astro'; // 组件映射表 const componentMap = { 'hero': HeroSection, 'full-bleed': FullBleedSection, 'dual': DualSection, 'grid': GridSection, 'quad-grid': QuadGridSection, 'scenery': ScenerySection }; --- Gallery | 时光印记
{galleryConfig.sections.map((section, index) => { // 如果 section 有 enabled 属性且为 false,则跳过 if (section.enabled === false) return null; const Component = componentMap[section.type]; return Component ? ( ) : null; })}

时光不老,我们不散

感谢每一个美好的瞬间