feat(theme+规范): 管理端接入 yh-theme 主题层并按 bsch 应用页规范升级页面骨架

- 主题层: scripts/gen-yh-theme.mjs 生成 assets/styles/yh-theme.css(构建期静态化 color-mix),
  5 主题档×侧栏深浅×渐变×side-plain 挂 html 档位类名; main.ts 于 icons.css 后引入并 initTheme() 消首帧闪色
- utils/theme.ts(+8 用例): localStorage(yh-theme) 持久化 + <html> 档位类名幂等切换
- ThemeSwitcher.vue(+6 用例): 顶栏配色胶囊(5 色网格+3 开关), 定稿 07-seam-pure 同款皮肤
- SchoolLayout: 顶栏 logo 徽标+配色切换器挂载; 站点身份色带退役, 子站橙由 yh-theme .band-sub::before 融合
- useTableHeight 响应化(+5 用例): ResizeObserver(body) 重算修复窗口缩放冻结, 常量 56/56 档不动
- bsch 规范骨架: 操作区 fix mb-12/次按钮 fr, Table 补 link-table table-bottom-box,
  文章关键字 200px 即输即搜(300ms 防抖去 enter-button), 附件分页 customPageCount 记忆+page-box fr,
  轮播展示位移入搜索区, 友链分组改 tabs-wrapper+Tabs card, 五表单校验失败统一"请填写红色星号内容!"
- 142 用例全绿, vite build 通过
This commit is contained in:
chenxing
2026-09-19 16:48:16 +08:00
parent 6f1f666479
commit f29c193ea7
19 changed files with 1299 additions and 72 deletions
+20 -5
View File
@@ -251,7 +251,10 @@ async function submitSection(key: string, patch: { configJson?: string }) {
async function saveBasic() {
const valid = await basicRef.value?.validate();
if (!valid) return;
if (!valid) {
Message.warning("请填写红色星号内容!"); // bsch §4 统一提示
return;
}
await submitSection("basic", {});
}
@@ -263,22 +266,34 @@ async function saveTheme() {
}
async function saveDisplay() {
if (!(await displayFormRef.value?.validate())) return;
if (!(await displayFormRef.value?.validate())) {
Message.warning("请填写红色星号内容!"); // bsch §4
return;
}
await submitSection("display", {});
}
async function saveFooter() {
if (!(await footerFormRef.value?.validate())) return;
if (!(await footerFormRef.value?.validate())) {
Message.warning("请填写红色星号内容!"); // bsch §4
return;
}
await submitSection("footer", {});
}
async function saveSeo() {
if (!(await seoFormRef.value?.validate())) return;
if (!(await seoFormRef.value?.validate())) {
Message.warning("请填写红色星号内容!"); // bsch §4
return;
}
await submitSection("seo", {});
}
async function saveExtras() {
if (!(await extrasFormRef.value?.validate())) return;
if (!(await extrasFormRef.value?.validate())) {
Message.warning("请填写红色星号内容!"); // bsch §4
return;
}
await submitSection("extras", {});
}