- variables.css: 新增 body[data-frontend]:not(.admin-body) 作用域浅色系变量 包含 --accent-purple/pink/blue 三色花点缀色,圆角上限 8px 硬边设计 - theme-protection.css: 前台页面及表单控件强制 color-scheme: light - default.vue: onMounted 时为 body 注入 data-frontend=true 标记 - dashboard.vue: 根容器添加 admin-body class,阻断前台浅色变量污染
31 lines
599 B
Vue
31 lines
599 B
Vue
<template>
|
|
<div class="app-layout">
|
|
<slot />
|
|
<SiteFooter />
|
|
<SpeedInsights />
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { onMounted } from 'vue'
|
|
import { useSiteConfig } from '~/composables/useSiteConfig'
|
|
import { SpeedInsights } from '@vercel/speed-insights/nuxt'
|
|
|
|
const { initSiteConfig } = useSiteConfig()
|
|
|
|
onMounted(() => {
|
|
if (typeof document !== 'undefined' && document.body) {
|
|
document.body.setAttribute('data-frontend', 'true')
|
|
}
|
|
initSiteConfig()
|
|
})
|
|
</script>
|
|
|
|
<style scoped>
|
|
.app-layout {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
</style>
|