This commit is contained in:
oneao committed 2026-10-13 22:32:50 +08:00
1 parent f3936cec61
commit 15e0ae5b67
115 files changed
+11399 -2741

No files matched your search

+33 -1
View File
@@ -87,6 +87,8 @@ export default defineConfig({
},
themeConfig: {
// 顶栏板块导航不在这里配:它由 theme/HeaderSections.vue 渲染
// (带 icon 的三个板块入口)。两边都配会出现重复入口。
nav: [],
// 按路径前缀分段,替代原 Docus 的 .navigation.yml 与 navigation.sub:
@@ -181,13 +183,43 @@ export default defineConfig({
] satisfies G3SidebarItem[],
'/api/': [
{
text: '接口文档',
text: '开始',
icon: 'cable',
collapsed: false,
items: [
{ text: '快速开始', link: '/api/getting-started' },
{ text: '登录与鉴权', link: '/api/auth' },
],
},
{
text: '数据',
icon: 'table-properties',
collapsed: false,
items: [
{ text: '数据查询', link: '/api/data' },
{ text: '数据写入', link: '/api/save' },
{ text: '导出', link: '/api/export' },
{ text: '附件', link: '/api/file' },
],
},
{
text: '工作流',
icon: 'git-branch',
collapsed: false,
items: [
{ text: '流程配置', link: '/api/workflow' },
{ text: '流程运行', link: '/api/workflow-runtime' },
],
},
] satisfies G3SidebarItem[],
'/backend/': [
{
text: '后端',
icon: 'database',
collapsed: false,
items: [
{ text: '后端架构', link: '/backend/architecture' },
{ text: '数据表结构', link: '/backend/schema' },
],
},
] satisfies G3SidebarItem[],
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { Cable, Component } from '@lucide/vue'
import { Cable, Component, Database } from '@lucide/vue'
import { useRoute, withBase } from 'vitepress'
import type { Component as VueComponent } from 'vue'
@@ -23,6 +23,12 @@ const sections: Array<{
label: '接口文档',
icon: Cable,
},
{
to: '/backend/architecture',
prefix: '/backend',
label: '后端设计',
icon: Database,
},
]
function isSectionActive(prefix: string) {
@@ -771,3 +771,17 @@
.vp-doc .vitepress-demo-plugin-preview .g3-table__inner.stk-table td:has(> .g3-table__cell-editor-root) {
padding: 3px;
}
/* 行底色:`.vp-doc tr:nth-child(2n) { background-color: var(--vp-c-bg-soft) }` 是
VitePress 给 markdown 表格画的**隔行灰**(#f6f6f7),权重 (0,2,1) 压过库自己的
`.stk-table tbody tr { background-color: var(--td-bgc) }` (0,1,2) ——
于是 demo 的行被染成隔行灰,而组件默认**没有**斑马纹(要条纹用 `stripe` 开关)。
症状最扎眼的是**固定列**:它的单元格底色必须不透明(否则横滚时被压住的列会透字),
行上的灰正是被它盖住的,看上去就是「只有序号列没有斑马纹」。
这里把 demo 预览区的行底色交回库的变量(写 `var(--td-bgc)` 而不是 transparent:
透明的行露出的是容器底色,暗色主题下就不是库的行色了)。 */
.vp-doc .vitepress-demo-plugin-preview table tr:nth-child(2n) {
background-color: var(--td-bgc, transparent);
}