Files
nl-blogs/client/src/templates/registry.ts
2026-08-24 13:06:04 +08:00

18 lines
791 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { Component } from 'vue'
// 模板布局注册表slug → 懒加载 Layout
export const TEMPLATE_LAYOUTS: Record<string, () => Promise<Component>> = {
classic: () => import('../layouts/ClassicLayout.vue'),
'ubuntu-terminal': () => import('../layouts/TerminalLayout.vue'),
pixel: () => import('./pixel/PixelLayout.vue'),
magazine: () => import('./magazine/MagazineLayout.vue'),
newspaper: () => import('./newspaper/NewspaperLayout.vue'),
bento: () => import('./bento/BentoLayout.vue'),
glass: () => import('./glass/GlassLayout.vue'),
retro: () => import('./retro/RetroLayout.vue'),
guofeng: () => import('./guofeng/GuofengLayout.vue'),
}
// 内置模板 slug与后端保留字一致
export const BUILTIN_TEMPLATE_SLUGS = Object.keys(TEMPLATE_LAYOUTS)