Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 165fb062
authored
Nov 14, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
调整左侧菜单栏UI
1 parent
e9c53eaf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
33 deletions
src/assets/style/animate.css
src/config/index.js
src/layout/components/LeftSide/LeftSideMenuLv1.vue
src/layout/components/LeftSide/LeftSideMenuLv2.vue
src/layout/components/LeftSide/LeftSideMenuLv2Item.vue
src/layout/components/LeftSide/LeftSideMenuLv3.vue
src/assets/style/animate.css
View file @
165fb06
...
...
@@ -273,6 +273,24 @@
animation-name
:
fadeInRight
;
}
@keyframes
fadeInRightShort
{
from
{
opacity
:
0
;
-webkit-transform
:
translate3d
(
20%
,
0
,
0
);
transform
:
translate3d
(
20%
,
0
,
0
);
}
to
{
opacity
:
1
;
-webkit-transform
:
translate3d
(
0
,
0
,
0
);
transform
:
translate3d
(
0
,
0
,
0
);
}
}
.animate__fadeInRightShort
{
-webkit-animation-name
:
fadeInRightShort
;
animation-name
:
fadeInRightShort
;
}
@keyframes
pulse
{
from
{
-webkit-transform
:
scale3d
(
1
,
1
,
1
);
...
...
src/config/index.js
View file @
165fb06
...
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2023-11-10 13:4
2:02
* @LastEditTime: 2023-11-10 13:4
3:30
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
let
cfg
=
require
(
'./conf.js'
)
...
...
@@ -25,7 +25,7 @@ export const fetchConfig = (isEnv = sw) => {
if
((
_config
&&
!
_constRoutes
.
includes
(
_pathname
))
||
_pathname
===
_login_path
||
(
_pathname
===
'/'
&&
_login_path
===
'/login'
))
{
return
Promise
.
resolve
(
_config
)
}
return
new
Http
({
headers
:
{
refererurl
:
_pathname
},
request
:
{
timeout
:
30000
}
}).
get
(
'https://
oss-config.test.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base/config
'
)
return
new
Http
({
headers
:
{
refererurl
:
_pathname
},
request
:
{
timeout
:
30000
}
}).
get
(
'https://
config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=base
'
)
}
export
const
config
=
{
install
(
vue
,
cfg
)
{
...
...
src/layout/components/LeftSide/LeftSideMenuLv1.vue
View file @
165fb06
...
...
@@ -78,13 +78,16 @@ $width: 160px;
.el-popover.el-submenu-popper-base-left-side-menu
{
padding
:
0
!important
;
margin
:
0
!important
;
left
:
calc
(
#{$
menu_width_collapse
}
)
!
important
;
left
:
$
menu_width_collapse
!important
;
border-radius
:
8px
;
box-shadow
:
0
6px
20px
0
#7a7a7a33
;
border
:
none
!important
;
>
.com-left-side-menu-lv2
{
border-radius
:
8px
;
box-shadow
:
0
6px
20px
0
#7a7a7a33
;
}
animation
:
pulse
0
.06s
steps
(
10
)
forwards
;
overflow
:
hidden
;
//
>
.com-left-side-menu-lv2
{
//
border-radius
:
8px
;
//
box-shadow
:
0
6px
20px
0
#7a7a7a33
;
//
}
animation
:
fadeInRightShort
0
.1s
ease-in-out
forwards
;
}
//
}
</
style
>
...
...
src/layout/components/LeftSide/LeftSideMenuLv2.vue
View file @
165fb06
<
template
>
<div
class=
"com-left-side-menu-lv2"
>
<GLScroll
class=
"com-left-side-menu-lv2-scroll-y"
>
<el-menu
class=
"flex-1 none-border"
background-color=
"#fff"
active-text-color=
"#409EFF"
text-color=
"#999"
:default-openeds=
"cur.openeds"
:default-active=
"cur.active"
:collapse-transition=
"false"
ref=
"menus"
@
close=
"handleClose"
>
<el-menu
class=
"flex-1 none-border"
background-color=
"#fff"
active-text-color=
"#409EFF"
text-color=
"#999"
:default-openeds=
"cur.openeds"
:default-active=
"cur.active"
:collapse-transition=
"false"
ref=
"menus"
>
<LeftSideMenuLv2Item></LeftSideMenuLv2Item>
</el-menu>
</GLScroll>
...
...
@@ -55,9 +55,6 @@ export default {
})
if
(
this
.
cur
.
openeds
.
toString
()
==
_ids
.
toString
())
return
this
.
cur
.
openeds
=
_ids
},
handleClose
(
key
,
keyPath
)
{
this
.
$refs
.
menus
.
open
(
keyPath
)
}
}
}
...
...
src/layout/components/LeftSide/LeftSideMenuLv2Item.vue
View file @
165fb06
...
...
@@ -9,7 +9,7 @@
</div>
<!-- 有三级菜单的二级菜单 -->
<el-submenu
v-else
:index=
"item.id"
>
<span
slot=
"title"
class=
"weaken"
>
{{
item
.
title
}}
</span>
<span
slot=
"title"
>
{{
item
.
title
}}
</span>
<!-- 渲染三级菜单 -->
<LeftSideMenuLv3
:menuItems=
"item.children"
></LeftSideMenuLv3>
</el-submenu>
...
...
@@ -71,13 +71,11 @@ export default {
},
handleMenuChanged
({
menus
=
[],
isReload
=
false
})
{
// 如果是菜单收起状态 并且不是 popover 或者待更新的数据与当前数据想同 则不更新视图
// if ((this.menu.isCollapse && !this.isPop) || this.menus[0]?.id == menus[0]?.id) return
if
(
this
.
menus
[
0
]?.
id
==
menus
[
0
]?.
id
)
return
if
(
isReload
)
{
this
.
reload
()
return
}
// console.log('待修改:' + menus[0]?.title, '当前,' + this.menus[0]?.title)
this
.
menus
=
menus
this
.
bus
.
$emit
(
'menuOpenedsChanged'
,
{
menus
})
},
...
...
@@ -86,7 +84,6 @@ export default {
const
{
lv1
}
=
this
.
current
const
[
pid
]
=
this
.
menus
[
0
]?.
id
.
split
(
'-'
)
||
[]
if
(
lv1
==
pid
)
return
console
.
log
(
'reload'
)
const
menus
=
this
.
app
.
menuList
.
find
(({
id
})
=>
id
==
lv1
).
children
.
noHidden
()
this
.
handleMenuChanged
({
menus
})
}
...
...
@@ -97,7 +94,7 @@ export default {
<
style
lang=
"scss"
scoped
>
@import
'~@/assets/style/collapse.scss'
;
@import
'~@/assets/style/mixins.scss'
;
$
active-background-color
:
rgba
(
88
,
80
,
255
,
0
.2
)
!
important
;
//
$
active-background-color
:
rgba
(
88
,
80
,
255
,
0
.2
)
!
important
;
.com-left-side-menu-lv2-item
{
height
:
100%
;
padding
:
8px
;
...
...
@@ -107,31 +104,43 @@ $active-background-color: rgba(88, 80, 255, 0.2) !important;
.el-menu
{
width
:
144px
!important
;
}
&
.is-opened
{
.el-icon-arrow-down
{
transform
:
rotate
(
90deg
);
}
}
//
padding
:
0
8px
;
&
__title
{
height
:
36px
;
line-height
:
36px
;
background-color
:
transparent
!important
;
padding
:
0
8
px
!important
;
padding
:
0
0
0
24
px
!important
;
margin-bottom
:
1px
;
span
{
-webkit-text-stroke
:
0.2px
#333
;
//
text-shadow
:
0
0
1px
#666
;
//
filter
:
drop-shadow
(
0
0
0.2px
#ccc
);
@include
menu-title-span-haspage;
}
.el-submenu__icon-arrow
{
//
right
:
0
;
visibility
:
hidden
;
}
&
:not
(
.hasNoChild
)
{
//
has
children
title
cursor
:
default
!important
;
border-bottom
:
1px
solid
#eee
;
span
{
font-size
:
13px
!important
;
color
:
#999
!important
;
font-weight
:
400
!important
;
cursor
:
default
!important
;
.el-icon-arrow-down
{
left
:
0
;
right
:
unset
;
margin-top
:
-6px
;
&::before
{
content
:
'\e791'
;
}
}
//
&
:not
(
.hasNoChild
)
{
//
//
has
children
title
//
cursor
:
default
!important
;
//
border-bottom
:
1px
solid
#eee
;
//
span
{
//
font-size
:
13px
!important
;
//
color
:
#999
!important
;
//
font-weight
:
400
!important
;
//
cursor
:
default
!important
;
//
}
//
}
&
.hasNoChild
:hover
{
@include
menu-title-hover;
}
...
...
src/layout/components/LeftSide/LeftSideMenuLv3.vue
View file @
165fb06
...
...
@@ -53,9 +53,10 @@ $menu-item-width: 144px !important;
align-self
:
center
;
border-radius
:
4px
;
//
padding-left
:
0
!important
;
padding
:
0
8
px
!important
;
padding
:
0
0
0
32
px
!important
;
span
{
@include
menu-title-span-haspage;
font-size
:
14px
;
}
&
.is-active
{
@include
menu-highlight;
...
...
@@ -63,7 +64,7 @@ $menu-item-width: 144px !important;
color
:
$
main-color
!important
;
}
}
&
:
hover:not
(
.is-active
)
{
&
:
not
(
.is-active
)
:hover
{
@include
menu-title-hover;
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment