feat: 完善内容管理通用富文本编辑器

This commit is contained in:
2026-08-27 17:01:48 +08:00
parent ed81f24892
commit d93486cd9a
21 changed files with 1245 additions and 30 deletions

View File

@@ -6,16 +6,17 @@ const toggle = ref<HTMLButtonElement>()
const navigation = ref<HTMLElement>()
const props = withDefaults(defineProps<{ logo?: string; brandName?: string; englishName?: string }>(), {
brandName: '慧遇书院',
englishName: 'HUIYU ACADEMY',
})
const route = useRoute()
const links = computed(() => [
{ label: '首页', href: '/#home' },
{ label: `关于${props.brandName}`, href: '/#about' },
{ label: '卢慧老师', href: '/luhui' },
{ label: '课程与产品', href: '/products' },
{ label: '官方信息', href: '/#official' },
{ label: '品牌动态', href: '/news' },
{ label: '联系我们', href: '/#contact' },
{ label: '首页', englishLabel: 'HOME', href: '/#home' },
{ label: `关于${props.brandName}`, englishLabel: `ABOUT ${props.englishName}`, href: '/#about' },
{ label: '卢慧老师', englishLabel: 'LU HUI', href: '/luhui' },
{ label: '课程与产品', englishLabel: 'COURSES & PRODUCTS', href: '/products' },
{ label: '官方信息', englishLabel: 'OFFICIAL INFO', href: '/#official' },
{ label: '品牌动态', englishLabel: 'BRAND NEWS', href: '/news' },
{ label: '联系我们', englishLabel: 'CONTACT US', href: '/#contact' },
])
function closeMenu(returnFocus = false) {
@@ -47,7 +48,10 @@ onBeforeUnmount(() => {
<List v-else :size="24" />
</button>
<nav id="site-navigation" ref="navigation" :class="['main-nav', { open }]" aria-label="主导航" @keydown.esc="closeMenu(true)">
<a v-for="link in links" :key="link.href" :href="link.href" :aria-current="isActive(link.href) ? 'page' : undefined" @click="closeMenu()">{{ link.label }}</a>
<a v-for="link in links" :key="link.href" :href="link.href" :aria-current="isActive(link.href) ? 'page' : undefined" @click="closeMenu()">
<span class="nav-label">{{ link.label }}</span>
<span class="nav-english" lang="en">{{ link.englishLabel }}</span>
</a>
</nav>
<a class="header-cta" href="/#official">
官方渠道