fix: menu 组件 level 属性不生效
This commit is contained in:
parent
8169e54846
commit
7411fdca76
@ -106,7 +106,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-menu level="true" v-model:selectedKey="selectedKey" inverted="true" v-model:openKeys="openKeys3" :tree="true">
|
<lay-menu :level="isLevel" v-model:selectedKey="selectedKey" inverted="true" v-model:openKeys="openKeys3" :tree="true">
|
||||||
<lay-menu-item id="1">首页</lay-menu-item>
|
<lay-menu-item id="1">首页</lay-menu-item>
|
||||||
<lay-menu-item id="2">首页</lay-menu-item>
|
<lay-menu-item id="2">首页</lay-menu-item>
|
||||||
<lay-menu-item id="3">首页</lay-menu-item>
|
<lay-menu-item id="3">首页</lay-menu-item>
|
||||||
@ -134,10 +134,12 @@ import { ref } from 'vue'
|
|||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
const openKeys3 = ref(["7"])
|
const isLevel = ref(false);
|
||||||
const selectedKey = ref("5")
|
const openKeys3 = ref(["7"]);
|
||||||
|
const selectedKey = ref("5");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
isLevel,
|
||||||
openKeys3,
|
openKeys3,
|
||||||
selectedKey
|
selectedKey
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<lay-timeline>
|
<lay-timeline>
|
||||||
<lay-timeline-item title="0.4.0">
|
<lay-timeline-item title="0.4.0">
|
||||||
|
<ul>
|
||||||
|
<a name="0-4-3"> </a>
|
||||||
|
<li>
|
||||||
|
<h3>0.4.3 <span class="layui-badge-rim">2022-03-27</span></h3>
|
||||||
|
<ul>
|
||||||
|
<li>[修复] menu 组件 level 属性不生效。</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
<a name="0-4-2"> </a>
|
<a name="0-4-2"> </a>
|
||||||
<li>
|
<li>
|
||||||
|
@ -327,8 +327,8 @@
|
|||||||
padding: 5px 17px 5px 17px;
|
padding: 5px 17px 5px 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-nav-tree.level {
|
.layui-nav-tree.not-level {
|
||||||
.layui-nav-itemed > .layui-nav-child {
|
.layui-nav-child {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ const props = withDefaults(defineProps<LayMenuProps>(), {
|
|||||||
tree: false,
|
tree: false,
|
||||||
theme: "dark",
|
theme: "dark",
|
||||||
inverted: false,
|
inverted: false,
|
||||||
level: false,
|
level: true,
|
||||||
collapse: false,
|
collapse: false,
|
||||||
collapseTransition: true,
|
collapseTransition: true,
|
||||||
});
|
});
|
||||||
@ -82,7 +82,7 @@ provide("isCollapseTransition", isCollapseTransition);
|
|||||||
<ul
|
<ul
|
||||||
class="layui-nav"
|
class="layui-nav"
|
||||||
:class="[
|
:class="[
|
||||||
level ? 'level' : '',
|
level ? '' : 'not-level',
|
||||||
inverted ? 'inverted' : '',
|
inverted ? 'inverted' : '',
|
||||||
tree ? 'layui-nav-tree' : '',
|
tree ? 'layui-nav-tree' : '',
|
||||||
theme === 'dark' ? 'layui-nav-dark' : 'layui-nav-light',
|
theme === 'dark' ? 'layui-nav-dark' : 'layui-nav-light',
|
||||||
|
Loading…
Reference in New Issue
Block a user