Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8d7d2cd9
authored
Dec 11, 2025
by
Lin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 项目打包路径配置修改
1 parent
3430d919
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
20 deletions
apps/frontend/venus-agentic/venus-agentic-assisant/package.json
apps/frontend/venus-agentic/venus-agentic-assisant/src/main.ts
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageAgentic/components/QualityDialog.vue
apps/frontend/venus-agentic/venus-agentic-base/src/layouts/components/Breadcrumb.vue
apps/frontend/venus-agentic/venus-agentic-base/src/layouts/components/SidebarMenuItem.vue
package.json
scripts/copy-dist-to-root.mjs
apps/frontend/venus-agentic/venus-agentic-assisant/package.json
View file @
8d7d2cd
{
"name"
:
"@venus/venus-agentic-assisant"
,
"version"
:
"1.0.0"
,
"description"
:
"汽车智能体"
,
"private"
:
true
,
"type"
:
"module"
,
"scripts"
:
{
"dev"
:
"vite --port 8081 --host"
,
"build"
:
"vue-tsc && vite build"
,
"postbuild"
:
"node ../../../../scripts/copy-dist-to-root.mjs"
,
"preview"
:
"vite preview --port 8081"
,
"type-check"
:
"vue-tsc --noEmit"
},
...
...
@@ -38,7 +38,6 @@
"@vitejs/plugin-vue-jsx"
:
"catalog:"
,
"typescript"
:
"catalog:"
,
"unplugin-auto-import"
:
"catalog:"
,
"unplugin-element-plus"
:
"catalog:"
,
"unplugin-vue-components"
:
"catalog:"
,
"vite"
:
"catalog:"
,
"vite-plugin-qiankun"
:
"catalog:"
,
...
...
apps/frontend/venus-agentic/venus-agentic-assisant/src/main.ts
View file @
8d7d2cd
import
type
{
QiankunProps
}
from
'vite-plugin-qiankun/dist/helper'
;
import
zhCn
from
"element-plus/es/locale/lang/zh-cn"
;
import
type
{
App
as
VueApp
}
from
'vue'
;
import
'./styles/element/index.scss'
;
import
{
createApp
}
from
'vue'
;
import
ElementPlus
from
'element-plus'
;
import
'./styles/element/index.scss'
;
import
{
createPinia
}
from
'pinia'
;
import
{
qiankunWindow
,
...
...
apps/frontend/venus-agentic/venus-agentic-assisant/src/views/ManageAgentic/components/QualityDialog.vue
View file @
8d7d2cd
...
...
@@ -201,7 +201,7 @@ const updateInspectionTemplate = async () => {
}
const
getCategoryWithMaterialList
=
async
()
=>
{
const
res
=
await
findCategoryWithMaterialList
({})
const
data
=
res
||
[]
const
data
=
res
||
[]
// 将 data 格式化为 treeData 结构
treeData
.
value
=
data
.
map
((
item
:
any
)
=>
({
id
:
item
.
id
,
...
...
apps/frontend/venus-agentic/venus-agentic-base/src/layouts/components/Breadcrumb.vue
View file @
8d7d2cd
...
...
@@ -14,10 +14,12 @@ const handleBreadcrumbClick = (
index
:
number
,
breadcrumbs
:
BreadcrumbItem
[],
)
=>
{
console
.
log
(
"handleBreadcrumbClick"
,
crumb
,
index
,
breadcrumbs
);
console
.
log
(
"router"
,
router
);
// 只有非最后一项且有路径的面包屑项可以点击
if
(
crumb
.
path
&&
index
<
breadcrumbs
.
length
-
1
)
{
router
.
push
(
crumb
.
path
);
}
//
if (crumb.path && index < breadcrumbs.length - 1) {
//
router.push(crumb.path);
//
}
};
</
script
>
...
...
@@ -56,13 +58,13 @@ const handleBreadcrumbClick = (
.breadcrumb-item.clickable
{
color
:
#969aa3
;
cursor
:
pointer
;
cursor
:
default
;
transition
:
color
0.3s
;
}
.breadcrumb-item.clickable
:hover
{
/*
.breadcrumb-item.clickable:hover {
color: #2f3133;
}
}
*/
.breadcrumb-separator
{
margin
:
0
8px
;
...
...
apps/frontend/venus-agentic/venus-agentic-base/src/layouts/components/SidebarMenuItem.vue
View file @
8d7d2cd
...
...
@@ -111,6 +111,24 @@ const checkChildActive = (child: MenuItem): boolean => {
return
false
;
};
// 递归检查菜单是否有可见的子菜单(考虑 hidden 属性)
const
hasVisibleChildren
=
(
menu
:
MenuItem
):
boolean
=>
{
if
(
!
menu
.
children
||
menu
.
children
.
length
===
0
)
{
return
false
;
}
// 检查是否有任何非隐藏的子菜单
const
visibleChildren
=
menu
.
children
.
filter
((
child
)
=>
!
child
.
hidden
);
if
(
visibleChildren
.
length
===
0
)
{
return
false
;
}
// 递归检查:至少有一个可见的子菜单有可见的子菜单
// 如果所有可见子菜单都没有可见的子菜单(递归),则返回 false
return
visibleChildren
.
some
((
child
)
=>
{
// 如果子菜单有可见的子菜单(递归检查),则返回 true
return
hasVisibleChildren
(
child
);
});
};
// 点击子菜单项
const
handleChildClick
=
(
child
:
MenuItem
)
=>
{
emit
(
'click'
,
child
);
...
...
@@ -222,7 +240,7 @@ const handleChildClick = (child: MenuItem) => {
@
click=
"handleChildClick(child)"
>
<span
class=
"popover-menu-title"
>
{{ child.title }}
</span>
<el-icon
v-if=
"
child.children && child.children.length > 0
"
>
<el-icon
v-if=
"
hasVisibleChildren(child)
"
>
<ArrowRight
/>
</el-icon>
</div>
...
...
package.json
View file @
8d7d2cd
...
...
@@ -25,23 +25,14 @@
"build:filter"
:
"node scripts/build/buildToRoot.mjs"
,
"build:docs"
:
"pnpm run build --filter=@venus/docs"
,
"changeset"
:
"pnpm exec changeset"
,
"check"
:
"pnpm run check:circular && pnpm run check:dep && pnpm run check:type && pnpm check:cspell"
,
"check:circular"
:
"vsh check-circular"
,
"check:cspell"
:
"cspell lint **/*.ts **/README.md .changeset/*.md --no-progress"
,
"check:dep"
:
"vsh check-dep"
,
"check:type"
:
"turbo run typecheck"
,
"clean"
:
"node ./scripts/clean.mjs"
,
"commit"
:
"powershell -ExecutionPolicy Bypass -File ./scripts/commit.ps1"
,
"format"
:
"vsh lint --format"
,
"lint"
:
"vsh lint"
,
"postinstall"
:
"pnpm -r run stub --if-present"
,
"prepare"
:
"husky"
,
"preinstall"
:
"npx only-allow pnpm"
,
"preview"
:
"turbo-run preview"
,
"publint"
:
"vsh publint"
,
"reinstall"
:
"pnpm clean --del-lock && pnpm install"
,
"test:unit"
:
"vitest run --dom"
,
"test:e2e"
:
"turbo run test:e2e"
,
"update:deps"
:
"npx taze -r -w"
,
"version"
:
"pnpm exec changeset version && pnpm install --no-frozen-lockfile"
,
"catalog"
:
"pnpx codemod pnpm/catalog"
,
...
...
scripts/copy-dist-to-root.mjs
0 → 100644
View file @
8d7d2cd
/**
* 将当前项目的 dist 文件夹复制到 venus-pro 根目录的 dist 文件夹
* 用于 postbuild 钩子
*/
import { existsSync, rmSync, cpSync } from 'node:fs';
import { join, dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// 获取 venus-pro 项目根目录(scripts 的父目录)
const venusProRoot = resolve(__dirname, '..');
const rootDistDir = join(venusProRoot, 'dist');
// 获取当前包的工作目录
// pnpm 在执行 postbuild 时,工作目录就是包的目录
const packageDir = process.cwd();
const sourceDistDir = join(packageDir, 'dist');
if (!existsSync(sourceDistDir)) {
console.error(`❌ 构建产物不存在: ${sourceDistDir}`);
process.exit(1);
}
// 清理 venus-pro 根目录的 dist(如果存在)
if (existsSync(rootDistDir)) {
rmSync(rootDistDir, { recursive: true, force: true });
}
// 复制 dist 到 venus-pro 根目录的 dist 文件夹
cpSync(sourceDistDir, rootDistDir, { recursive: true });
console.log(`✅ 已将构建产物复制到 venus-pro 根目录: ${rootDistDir}`);
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment