Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
0595a72d
提交
0595a72d
authored
7月 09, 2021
作者:
无木
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(mix-sider): fix mix-sider hover logic
修复左侧混合菜单的悬停处理逻辑
上级
c7c0a7e4
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
11 行增加
和
8 行删除
+11
-8
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
MixSider.vue
src/layouts/default/sider/MixSider.vue
+10
-8
没有找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
0595a72d
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
-
修复菜单默认折叠的配置不起作用的问题
-
修复菜单默认折叠的配置不起作用的问题
-
修复
`safari`
浏览器报错导致网站打不开
-
修复
`safari`
浏览器报错导致网站打不开
-
修复在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题
-
修复在 window 上,拉取代码后 eslint 因 endOfLine 而保错问题
-
修复左侧混合菜单的悬停触发逻辑
### 🎫 Chores
### 🎫 Chores
...
...
src/layouts/default/sider/MixSider.vue
浏览文件 @
0595a72d
...
@@ -80,10 +80,10 @@
...
@@ -80,10 +80,10 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
type
{
Menu
}
from
'/@/router/types'
;
import
type
{
Menu
}
from
'/@/router/types'
;
import
type
{
CSSProperties
}
from
'vue'
;
import
type
{
CSSProperties
}
from
'vue'
;
import
{
computed
,
defineComponent
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
type
{
RouteLocationNormalized
}
from
'vue-router'
;
import
type
{
RouteLocationNormalized
}
from
'vue-router'
;
import
{
defineComponent
,
onMounted
,
ref
,
computed
,
unref
}
from
'vue'
;
import
{
ScrollContainer
}
from
'/@/components/Container'
;
import
{
ScrollContainer
}
from
'/@/components/Container'
;
import
{
SimpleMenuTag
}
from
'/@/components/SimpleMenu'
;
import
{
SimpleMenu
,
SimpleMenu
Tag
}
from
'/@/components/SimpleMenu'
;
import
{
Icon
}
from
'/@/components/Icon'
;
import
{
Icon
}
from
'/@/components/Icon'
;
import
{
AppLogo
}
from
'/@/components/Application'
;
import
{
AppLogo
}
from
'/@/components/Application'
;
import
Trigger
from
'../trigger/HeaderTrigger.vue'
;
import
Trigger
from
'../trigger/HeaderTrigger.vue'
;
...
@@ -93,11 +93,10 @@
...
@@ -93,11 +93,10 @@
import
{
useDesign
}
from
'/@/hooks/web/useDesign'
;
import
{
useDesign
}
from
'/@/hooks/web/useDesign'
;
import
{
useI18n
}
from
'/@/hooks/web/useI18n'
;
import
{
useI18n
}
from
'/@/hooks/web/useI18n'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
import
{
SIDE_BAR_
SHOW_TIT_MINI_WIDTH
,
SIDE_BAR
_MINI_WIDTH
}
from
'/@/enums/appEnum'
;
import
{
SIDE_BAR_
MINI_WIDTH
,
SIDE_BAR_SHOW_TIT
_MINI_WIDTH
}
from
'/@/enums/appEnum'
;
import
clickOutside
from
'/@/directives/clickOutside'
;
import
clickOutside
from
'/@/directives/clickOutside'
;
import
{
get
ShallowMenus
,
getChildrenMenus
,
getCurrentParentPath
}
from
'/@/router/menus'
;
import
{
get
ChildrenMenus
,
getCurrentParentPath
,
getShallowMenus
}
from
'/@/router/menus'
;
import
{
listenerRouteChange
}
from
'/@/logics/mitt/routeChange'
;
import
{
listenerRouteChange
}
from
'/@/logics/mitt/routeChange'
;
import
{
SimpleMenu
}
from
'/@/components/SimpleMenu'
;
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'LayoutMixSider'
,
name
:
'LayoutMixSider'
,
...
@@ -179,6 +178,7 @@
...
@@ -179,6 +178,7 @@
return
!
unref
(
getMixSideFixed
)
return
!
unref
(
getMixSideFixed
)
?
{
?
{
onMouseleave
:
()
=>
{
onMouseleave
:
()
=>
{
setActive
(
true
);
closeMenu
();
closeMenu
();
},
},
}
}
...
@@ -219,6 +219,10 @@
...
@@ -219,6 +219,10 @@
}
else
{
}
else
{
closeMenu
();
closeMenu
();
}
}
}
else
{
if
(
!
unref
(
openMenu
))
{
openMenu
.
value
=
true
;
}
}
}
if
(
!
unref
(
openMenu
))
{
if
(
!
unref
(
openMenu
))
{
setActive
();
setActive
();
...
@@ -241,8 +245,7 @@
...
@@ -241,8 +245,7 @@
async
function
setActive
(
setChildren
=
false
)
{
async
function
setActive
(
setChildren
=
false
)
{
const
path
=
currentRoute
.
value
?.
path
;
const
path
=
currentRoute
.
value
?.
path
;
if
(
!
path
)
return
;
if
(
!
path
)
return
;
const
parentPath
=
await
getCurrentParentPath
(
path
);
activePath
.
value
=
await
getCurrentParentPath
(
path
);
activePath
.
value
=
parentPath
;
// hanldeModuleClick(parentPath);
// hanldeModuleClick(parentPath);
if
(
unref
(
getIsMixSidebar
))
{
if
(
unref
(
getIsMixSidebar
))
{
const
activeMenu
=
unref
(
menuModules
).
find
((
item
)
=>
item
.
path
===
unref
(
activePath
));
const
activeMenu
=
unref
(
menuModules
).
find
((
item
)
=>
item
.
path
===
unref
(
activePath
));
...
@@ -496,7 +499,6 @@
...
@@ -496,7 +499,6 @@
&
-menu-list
{
&
-menu-list
{
position
:
fixed
;
position
:
fixed
;
top
:
0
;
top
:
0
;
width
:
0
;
width
:
200px
;
width
:
200px
;
height
:
calc
(
100%
);
height
:
calc
(
100%
);
background-color
:
#fff
;
background-color
:
#fff
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论