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 @@
...
@@ -273,6 +273,24 @@
animation-name
:
fadeInRight
;
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
{
@keyframes
pulse
{
from
{
from
{
-webkit-transform
:
scale3d
(
1
,
1
,
1
);
-webkit-transform
:
scale3d
(
1
,
1
,
1
);
...
...
src/config/index.js
View file @
165fb06
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditors: limin
* @LastEditTime: 2023-11-10 13:4
2:02
* @LastEditTime: 2023-11-10 13:4
3:30
*/
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// 根据环境引入不同配置 process.env.VUE_APP_ENV
let
cfg
=
require
(
'./conf.js'
)
let
cfg
=
require
(
'./conf.js'
)
...
@@ -25,7 +25,7 @@ export const fetchConfig = (isEnv = sw) => {
...
@@ -25,7 +25,7 @@ export const fetchConfig = (isEnv = sw) => {
if
((
_config
&&
!
_constRoutes
.
includes
(
_pathname
))
||
_pathname
===
_login_path
||
(
_pathname
===
'/'
&&
_login_path
===
'/login'
))
{
if
((
_config
&&
!
_constRoutes
.
includes
(
_pathname
))
||
_pathname
===
_login_path
||
(
_pathname
===
'/'
&&
_login_path
===
'/login'
))
{
return
Promise
.
resolve
(
_config
)
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
=
{
export
const
config
=
{
install
(
vue
,
cfg
)
{
install
(
vue
,
cfg
)
{
...
...
src/layout/components/LeftSide/LeftSideMenuLv1.vue
View file @
165fb06
...
@@ -78,13 +78,16 @@ $width: 160px;
...
@@ -78,13 +78,16 @@ $width: 160px;
.el-popover.el-submenu-popper-base-left-side-menu
{
.el-popover.el-submenu-popper-base-left-side-menu
{
padding
:
0
!important
;
padding
:
0
!important
;
margin
:
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
;
border
:
none
!important
;
>
.com-left-side-menu-lv2
{
overflow
:
hidden
;
border-radius
:
8px
;
//
>
.com-left-side-menu-lv2
{
box-shadow
:
0
6px
20px
0
#7a7a7a33
;
//
border-radius
:
8px
;
}
//
box-shadow
:
0
6px
20px
0
#7a7a7a33
;
animation
:
pulse
0
.06s
steps
(
10
)
forwards
;
//
}
animation
:
fadeInRightShort
0
.1s
ease-in-out
forwards
;
}
}
//
}
//
}
</
style
>
</
style
>
...
...
src/layout/components/LeftSide/LeftSideMenuLv2.vue
View file @
165fb06
<
template
>
<
template
>
<div
class=
"com-left-side-menu-lv2"
>
<div
class=
"com-left-side-menu-lv2"
>
<GLScroll
class=
"com-left-side-menu-lv2-scroll-y"
>
<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>
<LeftSideMenuLv2Item></LeftSideMenuLv2Item>
</el-menu>
</el-menu>
</GLScroll>
</GLScroll>
...
@@ -55,9 +55,6 @@ export default {
...
@@ -55,9 +55,6 @@ export default {
})
})
if
(
this
.
cur
.
openeds
.
toString
()
==
_ids
.
toString
())
return
if
(
this
.
cur
.
openeds
.
toString
()
==
_ids
.
toString
())
return
this
.
cur
.
openeds
=
_ids
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 @@
...
@@ -9,7 +9,7 @@
</div>
</div>
<!-- 有三级菜单的二级菜单 -->
<!-- 有三级菜单的二级菜单 -->
<el-submenu
v-else
:index=
"item.id"
>
<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>
<LeftSideMenuLv3
:menuItems=
"item.children"
></LeftSideMenuLv3>
</el-submenu>
</el-submenu>
...
@@ -71,13 +71,11 @@ export default {
...
@@ -71,13 +71,11 @@ export default {
},
},
handleMenuChanged
({
menus
=
[],
isReload
=
false
})
{
handleMenuChanged
({
menus
=
[],
isReload
=
false
})
{
// 如果是菜单收起状态 并且不是 popover 或者待更新的数据与当前数据想同 则不更新视图
// 如果是菜单收起状态 并且不是 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
(
this
.
menus
[
0
]?.
id
==
menus
[
0
]?.
id
)
return
if
(
isReload
)
{
if
(
isReload
)
{
this
.
reload
()
this
.
reload
()
return
return
}
}
// console.log('待修改:' + menus[0]?.title, '当前,' + this.menus[0]?.title)
this
.
menus
=
menus
this
.
menus
=
menus
this
.
bus
.
$emit
(
'menuOpenedsChanged'
,
{
menus
})
this
.
bus
.
$emit
(
'menuOpenedsChanged'
,
{
menus
})
},
},
...
@@ -86,7 +84,6 @@ export default {
...
@@ -86,7 +84,6 @@ export default {
const
{
lv1
}
=
this
.
current
const
{
lv1
}
=
this
.
current
const
[
pid
]
=
this
.
menus
[
0
]?.
id
.
split
(
'-'
)
||
[]
const
[
pid
]
=
this
.
menus
[
0
]?.
id
.
split
(
'-'
)
||
[]
if
(
lv1
==
pid
)
return
if
(
lv1
==
pid
)
return
console
.
log
(
'reload'
)
const
menus
=
this
.
app
.
menuList
.
find
(({
id
})
=>
id
==
lv1
).
children
.
noHidden
()
const
menus
=
this
.
app
.
menuList
.
find
(({
id
})
=>
id
==
lv1
).
children
.
noHidden
()
this
.
handleMenuChanged
({
menus
})
this
.
handleMenuChanged
({
menus
})
}
}
...
@@ -97,7 +94,7 @@ export default {
...
@@ -97,7 +94,7 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
'~@/assets/style/collapse.scss'
;
@import
'~@/assets/style/collapse.scss'
;
@import
'~@/assets/style/mixins.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
{
.com-left-side-menu-lv2-item
{
height
:
100%
;
height
:
100%
;
padding
:
8px
;
padding
:
8px
;
...
@@ -107,31 +104,43 @@ $active-background-color: rgba(88, 80, 255, 0.2) !important;
...
@@ -107,31 +104,43 @@ $active-background-color: rgba(88, 80, 255, 0.2) !important;
.el-menu
{
.el-menu
{
width
:
144px
!important
;
width
:
144px
!important
;
}
}
&
.is-opened
{
.el-icon-arrow-down
{
transform
:
rotate
(
90deg
);
}
}
//
padding
:
0
8px
;
//
padding
:
0
8px
;
&
__title
{
&
__title
{
height
:
36px
;
height
:
36px
;
line-height
:
36px
;
line-height
:
36px
;
background-color
:
transparent
!important
;
background-color
:
transparent
!important
;
padding
:
0
8
px
!important
;
padding
:
0
0
0
24
px
!important
;
margin-bottom
:
1px
;
margin-bottom
:
1px
;
span
{
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;
@include
menu-title-span-haspage;
}
}
.el-submenu__icon-arrow
{
.el-icon-arrow-down
{
//
right
:
0
;
left
:
0
;
visibility
:
hidden
;
right
:
unset
;
}
margin-top
:
-6px
;
&
:not
(
.hasNoChild
)
{
&::before
{
//
has
children
title
content
:
'\e791'
;
cursor
:
default
!important
;
border-bottom
:
1px
solid
#eee
;
span
{
font-size
:
13px
!important
;
color
:
#999
!important
;
font-weight
:
400
!important
;
cursor
:
default
!important
;
}
}
}
}
//
&
: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
{
&
.hasNoChild
:hover
{
@include
menu-title-hover;
@include
menu-title-hover;
}
}
...
...
src/layout/components/LeftSide/LeftSideMenuLv3.vue
View file @
165fb06
...
@@ -53,9 +53,10 @@ $menu-item-width: 144px !important;
...
@@ -53,9 +53,10 @@ $menu-item-width: 144px !important;
align-self
:
center
;
align-self
:
center
;
border-radius
:
4px
;
border-radius
:
4px
;
//
padding-left
:
0
!important
;
//
padding-left
:
0
!important
;
padding
:
0
8
px
!important
;
padding
:
0
0
0
32
px
!important
;
span
{
span
{
@include
menu-title-span-haspage;
@include
menu-title-span-haspage;
font-size
:
14px
;
}
}
&
.is-active
{
&
.is-active
{
@include
menu-highlight;
@include
menu-highlight;
...
@@ -63,7 +64,7 @@ $menu-item-width: 144px !important;
...
@@ -63,7 +64,7 @@ $menu-item-width: 144px !important;
color
:
$
main-color
!important
;
color
:
$
main-color
!important
;
}
}
}
}
&
:
hover:not
(
.is-active
)
{
&
:
not
(
.is-active
)
:hover
{
@include
menu-title-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