Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
一臭打代码的 aka 潘先生です
vue-vben-admin
提交
cad021c3
V
vue-vben-admin
项目概览
一臭打代码的 aka 潘先生です
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cad021c3
编写于
7月 09, 2021
作者:
无
无木
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(menu): fix mix-menu incorrect jumping in `hover` mode
修复悬停触发模式下左侧混合菜单会在没有子菜单且被激活时直接跳转路由
上级
5ceeefd1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
16 deletion
+21
-16
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+4
-2
src/layouts/default/sider/MixSider.vue
src/layouts/default/sider/MixSider.vue
+17
-14
未找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
cad021c3
...
...
@@ -8,12 +8,14 @@
-
**TableAction**
仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件
-
**BasicUpload**
修复处理非
`array`
值时报错的问题
-
**Form**
修复
`FormItem`
的
`suffix`
插槽样式问题
-
**Menu**
-
修复左侧混合菜单的悬停触发逻辑
-
修复顶栏菜单在显示包含需要隐藏的菜单项目时出错的问题
-
修复悬停触发模式下左侧混合菜单会在没有子菜单且被激活时直接跳转路由
-
**其它**
-
修复菜单默认折叠的配置不起作用的问题
-
修复
`safari`
浏览器报错导致网站打不开
-
修复在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题
-
修复左侧混合菜单的悬停触发逻辑
-
修复顶栏菜单在显示包含需要隐藏的菜单项目时出错的问题
### 🎫 Chores
...
...
src/layouts/default/sider/MixSider.vue
浏览文件 @
cad021c3
...
...
@@ -63,7 +63,7 @@
</div>
<ScrollContainer
:class=
"`$
{prefixCls}-menu-list__content`">
<SimpleMenu
:items=
"chilrenMenus"
:items=
"chil
d
renMenus"
:theme=
"getMenuTheme"
mixSider
@
menuClick=
"handleMenuClick"
...
...
@@ -114,7 +114,7 @@
setup
()
{
let
menuModules
=
ref
<
Menu
[]
>
([]);
const
activePath
=
ref
(
''
);
const
chilrenMenus
=
ref
<
Menu
[]
>
([]);
const
chil
d
renMenus
=
ref
<
Menu
[]
>
([]);
const
openMenu
=
ref
(
false
);
const
dragBarRef
=
ref
<
ElRef
>
(
null
);
const
sideRef
=
ref
<
ElRef
>
(
null
);
...
...
@@ -150,7 +150,7 @@
const
getIsFixed
=
computed
(()
=>
{
/* eslint-disable-next-line */
mixSideHasChildren
.
value
=
unref
(
chilrenMenus
).
length
>
0
;
mixSideHasChildren
.
value
=
unref
(
chil
d
renMenus
).
length
>
0
;
const
isFixed
=
unref
(
getMixSideFixed
)
&&
unref
(
mixSideHasChildren
);
if
(
isFixed
)
{
/* eslint-disable-next-line */
...
...
@@ -209,9 +209,8 @@
}
// Process module menu click
async
function
han
ld
eModuleClick
(
path
:
string
,
hover
=
false
)
{
async
function
han
dl
eModuleClick
(
path
:
string
,
hover
=
false
)
{
const
children
=
await
getChildrenMenus
(
path
);
if
(
unref
(
activePath
)
===
path
)
{
if
(
!
hover
)
{
if
(
!
unref
(
openMenu
))
{
...
...
@@ -233,12 +232,12 @@
}
if
(
!
children
||
children
.
length
===
0
)
{
go
(
path
);
chilrenMenus
.
value
=
[];
if
(
!
hover
)
go
(
path
);
chil
d
renMenus
.
value
=
[];
closeMenu
();
return
;
}
chilrenMenus
.
value
=
children
;
chil
d
renMenus
.
value
=
children
;
}
// Set the currently active menu and submenu
...
...
@@ -253,14 +252,14 @@
if
(
p
)
{
const
children
=
await
getChildrenMenus
(
p
);
if
(
setChildren
)
{
chilrenMenus
.
value
=
children
;
chil
d
renMenus
.
value
=
children
;
if
(
unref
(
getMixSideFixed
))
{
openMenu
.
value
=
children
.
length
>
0
;
}
}
if
(
children
.
length
===
0
)
{
chilrenMenus
.
value
=
[];
chil
d
renMenus
.
value
=
[];
}
}
}
...
...
@@ -278,11 +277,15 @@
function
getItemEvents
(
item
:
Menu
)
{
if
(
unref
(
getMixSideTrigger
)
===
'
hover
'
)
{
return
{
onMouseenter
:
()
=>
hanldeModuleClick
(
item
.
path
,
true
),
onMouseenter
:
()
=>
handleModuleClick
(
item
.
path
,
true
),
onClick
:
async
()
=>
{
const
children
=
await
getChildrenMenus
(
item
.
path
);
if
(
item
.
path
&&
(
!
children
||
children
.
length
===
0
))
go
(
item
.
path
);
},
};
}
return
{
onClick
:
()
=>
han
ld
eModuleClick
(
item
.
path
),
onClick
:
()
=>
han
dl
eModuleClick
(
item
.
path
),
};
}
...
...
@@ -303,9 +306,9 @@
t
,
prefixCls
,
menuModules
,
han
ld
eModuleClick
,
han
dleModuleClick
:
handl
eModuleClick
,
activePath
,
chilrenMenus
,
chil
drenMenus
:
child
renMenus
,
getShowDragBar
,
handleMenuClick
,
getMenuStyle
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录