diff --git a/example/docs/zh-CN/components/menu.md b/example/docs/zh-CN/components/menu.md
index eab6fd8e..a83fe3e0 100644
--- a/example/docs/zh-CN/components/menu.md
+++ b/example/docs/zh-CN/components/menu.md
@@ -12,12 +12,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -52,12 +52,12 @@ export default {
-
-
-
-
-
-
+
+
+
+
+
+
@@ -88,17 +88,17 @@ export default {
::: demo
-
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -134,12 +134,12 @@ export default {
-
-
-
-
-
-
+
+
+
+
+
+
@@ -179,10 +179,10 @@ export default {
目录
- 菜单一
+ 菜单
- 菜单二
+ 菜单
@@ -220,6 +220,7 @@ export default {
| v-model:openKeys | 打开项 | -- |
| theme | 菜单主题 | `dark` `light` |
| inverted | 特殊的激活样式 | `true` `false` |
+| level | 菜单层级 | `true` `false` |
:::
diff --git a/src/component/menu/index.less b/src/component/menu/index.less
index e1ce8600..454b0f96 100644
--- a/src/component/menu/index.less
+++ b/src/component/menu/index.less
@@ -302,4 +302,10 @@
.layui-nav-tree.inverted .layui-this > a{
padding: 5px 24px 5px 24px;
+}
+
+.layui-nav-tree.level {
+ .layui-nav-itemed > .layui-nav-child {
+ background-color: transparent;
+ }
}
\ No newline at end of file
diff --git a/src/component/menu/index.vue b/src/component/menu/index.vue
index 4077f061..a74a2abf 100644
--- a/src/component/menu/index.vue
+++ b/src/component/menu/index.vue
@@ -1,5 +1,5 @@
-
@@ -14,6 +14,7 @@ export interface LayMenuProps {
tree?: boolean;
theme?: string;
inverted?: boolean;
+ level?: boolean;
}
const emit = defineEmits(["update:selectedKey", "update:openKeys"]);
@@ -23,7 +24,8 @@ const props = withDefaults(defineProps(), {
openKeys: () => [],
tree: false,
theme: 'dark',
- inverted: false
+ inverted: false,
+ level: false
});
const isTree = computed(() => props.tree);