fix: 恢复指南菜单以及构建open模式,不带业务组件 (#4283)

This commit is contained in:
申君健 2026-07-31 17:13:57 +08:00 committed by GitHub
parent 5e0ae7cc04
commit b9004f00c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 16 deletions

View File

@ -1,6 +1,5 @@
import { docMenus, cmpMenus } from '@menu/menus.js'
import { appData, $split } from './tools'
import { isSaas } from './const'
/**
* 聚合doc / cmp 两个页面的所有菜单.
@ -27,20 +26,17 @@ function genMenus() {
}
]
// 使用指南只在DEV下生效
const isShowDoc = import.meta.env.DEV || isSaas
const docOptions = isShowDoc
? docMenus.map((menu) => ({
...menu,
label: `${appData.lang === 'zhCN' ? menu.label : menu.labelEn}${getChildrenStr(menu)}`,
children: menu.children.map((page) => ({
...page,
id: page.key,
label: appData.lang === 'zhCN' ? page.title : page.titleEn,
type: 'docs'
}))
}))
: []
// 使用指南永远显示 (原来屏蔽了,将指南和组件文档分隔开了)
const docOptions = docMenus.map((menu) => ({
...menu,
label: `${appData.lang === 'zhCN' ? menu.label : menu.labelEn}${getChildrenStr(menu)}`,
children: menu.children.map((page) => ({
...page,
id: page.key,
label: appData.lang === 'zhCN' ? page.title : page.titleEn,
type: 'docs'
}))
}))
const cmpOptions = cmpMenus.map((menu) => ({
...menu,

View File

@ -64,7 +64,7 @@
"build:hooks": "pnpm -C packages/vue-hooks build",
"build:internals": "pnpm \"--filter=./internals/*\" build",
"build:virtual-template": "pnpm --filter @opentiny-internal/unplugin-virtual-template build",
"build:site": "pnpm build:theme && pnpm -C examples/sites build",
"build:site": "pnpm build:theme && pnpm -C examples/sites build:open",
"release:aurora": "pnpm -C internals/cli release:aurora",
"release:alpha": "pnpm -C internals/cli release:alpha",
"release:e2eConfig": "pnpm -C internals/cli release:e2eConfig",