增加功能报价

This commit is contained in:
hero920103 committed 2026-09-16 00:22:17 +08:00
1 parent 71a14c46f9
commit 60b2658d4b
32 files changed
+3578 -77

No files matched your search

+27
View File
@@ -41,10 +41,12 @@
<el-menu-item
v-if="!item.children || item.children.length === 0"
:index="item.path || item.id.toString()"
:class="{ 'is-locked': item.locked }"
>
<i v-if="item.icon" :class="item.icon" class="menu-icon"></i>
<template #title>
<span>{{ item.title }}</span>
<i v-if="item.locked" class="fa-solid fa-lock lock-badge"></i>
</template>
</el-menu-item>
@@ -53,10 +55,12 @@
v-else
:index="item.path || item.id.toString()"
:unique-opened="true"
:class="{ 'is-locked': item.locked }"
>
<template #title>
<i v-if="item.icon" :class="item.icon" class="menu-icon"></i>
<span>{{ item.title }}</span>
<i v-if="item.locked" class="fa-solid fa-lock lock-badge"></i>
</template>
<!-- 递归渲染子菜单 -->
@@ -64,10 +68,12 @@
<el-menu-item
v-if="!child.children || child.children.length === 0"
:index="child.path || child.id.toString()"
:class="{ 'is-locked': child.locked }"
>
<i v-if="child.icon" :class="child.icon" class="menu-icon"></i>
<template #title>
<span>{{ child.title }}</span>
<i v-if="child.locked" class="fa-solid fa-lock lock-badge"></i>
</template>
</el-menu-item>
@@ -75,10 +81,12 @@
v-else
:index="child.path || child.id.toString()"
:unique-opened="true"
:class="{ 'is-locked': child.locked }"
>
<template #title>
<i v-if="child.icon" :class="child.icon" class="menu-icon"></i>
<span>{{ child.title }}</span>
<i v-if="child.locked" class="fa-solid fa-lock lock-badge"></i>
</template>
<!-- 继续递归渲染子菜单 -->
@@ -91,6 +99,7 @@
!grandchild.children || grandchild.children.length === 0
"
:index="grandchild.path || grandchild.id.toString()"
:class="{ 'is-locked': grandchild.locked }"
>
<i
v-if="grandchild.icon"
@@ -99,6 +108,7 @@
></i>
<template #title>
<span>{{ grandchild.title }}</span>
<i v-if="grandchild.locked" class="fa-solid fa-lock lock-badge"></i>
</template>
</el-menu-item>
@@ -106,6 +116,7 @@
v-else
:index="grandchild.path || grandchild.id.toString()"
:unique-opened="true"
:class="{ 'is-locked': grandchild.locked }"
>
<template #title>
<i
@@ -114,6 +125,7 @@
class="menu-icon"
></i>
<span>{{ grandchild.title }}</span>
<i v-if="grandchild.locked" class="fa-solid fa-lock lock-badge"></i>
</template>
<!-- 继续递归渲染... -->
@@ -125,6 +137,7 @@
:index="
greatGrandchild.path || greatGrandchild.id.toString()
"
:class="{ 'is-locked': greatGrandchild.locked }"
>
<i
v-if="greatGrandchild.icon"
@@ -133,6 +146,7 @@
></i>
<template #title>
<span>{{ greatGrandchild.title }}</span>
<i v-if="greatGrandchild.locked" class="fa-solid fa-lock lock-badge"></i>
</template>
</el-menu-item>
</template>
@@ -283,6 +297,7 @@ const processMenus = (menus) => {
title: menu.title,
route: menu.path,
component_path: menu.component_path,
locked: !!menu.locked,
parentId: menu.pid || 0,
order: menu.sort || 0,
children: menu.children ? processMenus(menu.children) : [],
@@ -608,6 +623,18 @@ h3 {
padding-left: 48px !important;
}
// 套餐未开通模块:锁定态置灰 + 锁图标
.el-menu-item.is-locked,
.el-sub-menu.is-locked > .el-sub-menu__title {
opacity: 0.65;
.lock-badge {
margin-left: 6px;
font-size: 12px;
color: rgba(255, 255, 255, 0.75);
}
}
// 暗色主题适配
html.dark & {
.el-menu-item.is-active {