mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2026-02-06 16:45:34 +00:00
解决左侧子菜单标题不显示问题
This commit is contained in:
parent
607c27d6e7
commit
b010d35153
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*.js text eol=lf
|
||||
*.json text eol=lf
|
||||
*.ts text eol=lf
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "front-next",
|
||||
"version": "0.5.1",
|
||||
"version": "0.5.2",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc --noEmit --skipLibCheck && vite build",
|
||||
@ -11,7 +11,7 @@
|
||||
"dependencies": {
|
||||
"array.prototype.flat": "^1.2.4",
|
||||
"axios": "^0.21.1",
|
||||
"cl-admin-crud-vue3": "^0.3.0",
|
||||
"cl-admin-crud-vue3": "^0.3.12",
|
||||
"clipboard": "^2.0.8",
|
||||
"clone-deep": "^4.0.1",
|
||||
"codemirror": "^5.60.0",
|
||||
|
||||
@ -50,6 +50,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__popup {
|
||||
.icon-svg {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cl-slider-menu__submenu {
|
||||
|
||||
@ -51,7 +51,7 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
render(ctx: any) {
|
||||
function deepMenu(list: any) {
|
||||
function deepMenu(list: any, index: number) {
|
||||
return list
|
||||
.filter((e: any) => e.isShow)
|
||||
.map((e: any) => {
|
||||
@ -62,21 +62,22 @@ export default defineComponent({
|
||||
<el-submenu></el-submenu>,
|
||||
{
|
||||
index: String(e.id),
|
||||
key: e.id
|
||||
key: e.id,
|
||||
"popper-class": "cl-slider-menu__popup"
|
||||
},
|
||||
{
|
||||
title: () => {
|
||||
return !ctx.menuCollapse ? (
|
||||
return ctx.menuCollapse && index == 1 ? (
|
||||
<icon-svg name={e.icon}></icon-svg>
|
||||
) : (
|
||||
<span>
|
||||
<icon-svg name={e.icon}></icon-svg>
|
||||
<span>{e.name}</span>
|
||||
</span>
|
||||
) : (
|
||||
<icon-svg name={e.icon}></icon-svg>
|
||||
);
|
||||
},
|
||||
default() {
|
||||
return deepMenu(e.children);
|
||||
return deepMenu(e.children, index + 1);
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -102,7 +103,7 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
|
||||
const children = deepMenu(ctx.menuList);
|
||||
const children = deepMenu(ctx.menuList, 1);
|
||||
|
||||
return (
|
||||
ctx.visible && (
|
||||
|
||||
@ -930,10 +930,10 @@ change-case@^4.1.2:
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.1"
|
||||
|
||||
cl-admin-crud-vue3@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.nlark.com/cl-admin-crud-vue3/download/cl-admin-crud-vue3-0.3.0.tgz?cache=0&sync_timestamp=1624438098113&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcl-admin-crud-vue3%2Fdownload%2Fcl-admin-crud-vue3-0.3.0.tgz#393c314bb7c20f84f2d4d460fe62b3c538f3e1b3"
|
||||
integrity sha1-OTwxS7fCD4Ty1NRg/mKzxTjz4bM=
|
||||
cl-admin-crud-vue3@^0.3.12:
|
||||
version "0.3.12"
|
||||
resolved "https://registry.nlark.com/cl-admin-crud-vue3/download/cl-admin-crud-vue3-0.3.12.tgz#afbbb52711f8f6e032dcacbd22977c9fa58d8662"
|
||||
integrity sha1-r7u1JxH49uAy3Ky9Ipd8n6WNhmI=
|
||||
dependencies:
|
||||
array.prototype.flat "^1.2.4"
|
||||
core-js "^3.6.5"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user