Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-manage-shell
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
dcxy-manage-shell
Commits
b1abc244
Commit
b1abc244
authored
Jul 12, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
顶部菜单栏菜单过长时添加滚动条
parent
b3255900
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
MenuItem.vue
src/containers/layout/IconMenu/components/MenuItem.vue
+20
-2
No files found.
src/containers/layout/IconMenu/components/MenuItem.vue
View file @
b1abc244
...
...
@@ -17,7 +17,7 @@
<div
class=
"IconMenu-name"
>
{{
menuName
}}
</div>
</div>
<div
:class=
"
`SubmenuBox $
{showSubMenus?'show':''}`
"
:class=
"
{SubmenuBox: true, show: showSubMenus, scroll: needScroll}
"
:style="style"
v-if="menuList
&&
menuList.length"
>
...
...
@@ -78,6 +78,7 @@
<
script
>
import
LikeIcon
from
'./LikeIcon'
;
let
timers
=
null
;
export
default
{
name
:
'MenuItem'
,
components
:
{
LikeIcon
},
...
...
@@ -101,6 +102,7 @@ export default {
data
()
{
return
{
showSubMenus
:
false
,
needScroll
:
false
,
style
:
''
,
};
},
...
...
@@ -123,6 +125,19 @@ export default {
methods
:
{
toggleSubmenus
(
visiable
)
{
this
.
showSubMenus
=
visiable
;
if
(
visiable
)
{
// this.$nextTick(() => {
// });
timers
=
setTimeout
(()
=>
{
this
.
needScroll
=
visiable
;
},
280
);
}
else
{
if
(
timers
)
{
clearTimeout
(
timers
);
timers
=
null
;
}
this
.
needScroll
=
visiable
;
}
},
selectHandle
()
{
if
(
typeof
this
.
selectRouteMenu
===
'function'
)
{
...
...
@@ -173,9 +188,12 @@ export default {
transition
:
all
0
.28s
ease-in-out
;
overflow
:
hidden
;
&
.show
{
max-height
:
10
00px
;
max-height
:
6
00px
;
height
:
auto
;
}
&
.scroll
{
overflow-y
:
auto
;
}
.Submenu-title
{
width
:
560px
;
height
:
30px
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment