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 7874b383
authored
Sep 14, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
菜单框架改版
1 parent
18f1945f
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
653 additions
and
12 deletions
src/assets/style/mixins.scss
src/assets/style/reset.css
src/assets/style/variables.scss.js
src/layout/components/LeftSide/LeftSideIndex.vue
src/layout/components/LeftSide/LeftSideMenuLv1.vue
src/layout/components/LeftSide/LeftSideMenuLv1Item.vue
src/layout/components/LeftSide/LeftSideMenuLv2.vue
src/layout/components/LeftSide/LeftSideMenuLv2Item.vue
src/layout/components/LeftSide/LeftSideMenuLv3.vue
src/layout/components/LeftSide/LeftSideMenuLv3Item.vue
src/layout/components/LeftSide/LeftSideRight.vue
src/layout/components/LeftSide/mixins/index.js
src/layout/components/Logo.vue
src/layout/components/SubMenuItem.vue
src/layout/index.vue
vue.config.js
src/assets/style/mixins.scss
View file @
7874b38
...
@@ -8,3 +8,10 @@
...
@@ -8,3 +8,10 @@
@mixin
leftpadding
{
@mixin
leftpadding
{
padding
:
0
$left
;
padding
:
0
$left
;
}
}
@mixin
menu-highlight
{
outline
:
0
!
important
;
color
:
$main-color
!
important
;
background-color
:
rgba
(
88
,
80
,
255
,
0
.2
)
!
important
;
border-bottom
:
none
;
}
src/assets/style/reset.css
View file @
7874b38
...
@@ -75,6 +75,9 @@ video {
...
@@ -75,6 +75,9 @@ video {
vertical-align
:
baseline
;
vertical-align
:
baseline
;
background
:
transparent
;
background
:
transparent
;
}
}
li
{
list-style-type
:
none
;
}
body
{
body
{
line-height
:
1
;
line-height
:
1
;
...
...
src/assets/style/variables.scss.js
View file @
7874b38
...
@@ -22,7 +22,7 @@ module.exports = {
...
@@ -22,7 +22,7 @@ module.exports = {
header_background
:
'#a3b6c6'
,
header_background
:
'#a3b6c6'
,
header_color
:
'#fff'
,
header_color
:
'#fff'
,
header_padding
:
'15px'
,
header_padding
:
'15px'
,
logo_height
:
'
124
px'
,
logo_height
:
'
70
px'
,
// 左侧菜单样式变量
// 左侧菜单样式变量
menu_background
:
'#2a3f54'
,
menu_background
:
'#2a3f54'
,
menu_color
:
'#fff'
,
menu_color
:
'#fff'
,
...
@@ -32,7 +32,7 @@ module.exports = {
...
@@ -32,7 +32,7 @@ module.exports = {
main_background_color
:
'#f0f1f7'
,
main_background_color
:
'#f0f1f7'
,
main_color
:
'#5f5efb'
,
main_color
:
'#5f5efb'
,
menu_width
:
'208px'
,
menu_width
:
'208px'
,
menu_width_collapse
:
'
80
px'
,
menu_width_collapse
:
'
48
px'
,
base_border
:
'#5f5efb'
,
base_border
:
'#5f5efb'
,
font_family
:
`'PingFangSC-Regular', 'Microsoft YaHei', '微软雅黑', 'MicrosoftJhengHei', 'STHeiti', 'MingLiu'`
,
font_family
:
`'PingFangSC-Regular', 'Microsoft YaHei', '微软雅黑', 'MicrosoftJhengHei', 'STHeiti', 'MingLiu'`
,
min_width
:
'1280px'
,
min_width
:
'1280px'
,
...
...
src/layout/components/LeftSide/LeftSideIndex.vue
0 → 100644
View file @
7874b38
<
template
>
<div
class=
"side-bar"
>
<div
class=
"logo"
>
<Logo></Logo>
</div>
<div
class=
"side-bar-menu"
>
<LeftSideMenuLv1
:menuList=
"menuList"
></LeftSideMenuLv1>
<LeftSideMenuLv2></LeftSideMenuLv2>
</div>
</div>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
Vue
from
'vue'
const
bus
=
new
Vue
()
export
default
{
name
:
'LeftSideMenu'
,
computed
:
{
...
mapGetters
([
'app'
])
},
watch
:
{
'app.currentPage.id'
:
{
handler
(
n
)
{
const
[
lv1
,
lv2
,
lv3
,
lv4
]
=
n
.
split
(
'-'
)
bus
.
$emit
(
'current'
,
{
lv1
,
lv2
,
lv3
,
lv4
})
}
}
},
data
()
{
return
{
menuList
:
[]
}
},
created
()
{
this
.
menuList
=
this
.
app
.
menuList
.
noHidden
()
},
provide
()
{
return
{
bus
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'~@/assets/style/collapse.scss'
;
.side-bar
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
overflow
:
hidden
;
background-color
:
#fff
;
>
.logo
{
flex
:
0
0
$
logo-height
;
height
:
$
logo-height
;
}
.side-bar-menu
{
flex
:
1
;
user-select
:
none
;
overflow-y
:
auto
;
background-color
:
#fff
;
padding-top
:
36px
;
display
:
flex
;
&-left
{
height
:
100%
;
width
:
$
menu-width
;
.el-menu
{
height
:
100%
;
}
}
&
-scroll-y
{
/deep/.el-scrollbar__wrap
{
margin-bottom
:
0
!important
;
}
height
:
calc
(
100vh
-
#
{
$logo-height
}
);
}
}
&
::before
{
position
:
absolute
;
content
:
''
;
width
:
1px
;
border-right
:
1px
solid
#f5f7fa
;
height
:
100%
;
left
:
48px
;
}
}
</
style
>
src/layout/components/LeftSide/LeftSideMenuLv1.vue
0 → 100644
View file @
7874b38
<
template
>
<div
class=
"com-left-side-menu-lv1"
>
<GLScroll
class=
"side-bar-menu-scroll-y"
>
<LeftSideMenuLv1Item
v-for=
"item in menuList"
:key=
"item.id"
:menuData=
"item"
></LeftSideMenuLv1Item>
</GLScroll>
<el-popover
v-if=
"showPop && menu.isCollapse"
ref=
"pop"
:reference=
"reference"
placement=
"right-start"
:visible-arrow=
"false"
width=
"160"
trigger=
"hover"
popper-class=
"el-submenu-popper-base"
>
<LeftSideMenuLv2></LeftSideMenuLv2>
</el-popover>
</div>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'LeftSideMenuLv1'
,
inject
:
[
'bus'
],
props
:
{
menuList
:
{
type
:
Array
,
default
:
()
=>
[]
},
bus
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
computed
:
{
...
mapGetters
([
'menu'
])
},
data
()
{
return
{
reference
:
{},
// 控制渲染条件
showPop
:
false
,
// 保存当前激活的refrence id
activeId
:
''
}
},
mounted
()
{
this
.
bus
.
$on
(
'mouseenter'
,
this
.
mouseenter
)
},
beforeDestroy
()
{
this
.
bus
.
$off
(
'mouseenter'
,
this
.
mouseenter
)
},
methods
:
{
mouseenter
(
item
,
reference
,
onReady
)
{
// 这个操作是为了避免与源码中的 doToggle方法冲突
// if (this.activeId === item.id && this.showPop) return
this
.
showPop
=
false
this
.
activeId
=
item
.
id
// 因为reference是需要获取dom的引用 所以需要是$el
this
.
reference
=
reference
this
.
$nextTick
(()
=>
{
// 等待显示的popover销毁后再 重新渲染新的popover
this
.
showPop
=
true
this
.
$nextTick
(()
=>
{
// 此时才能获取refs引用
this
.
$refs
.
pop
.
doShow
()
onReady
()
setTimeout
(()
=>
this
.
$refs
.
pop
.
updatePopper
(),
100
)
})
})
}
}
}
</
script
>
<
style
lang=
"scss"
>
$
width
:
160px
;
@mixin
popup_width
{
width
:
$
width
!important
;
min-width
:
$
width
!important
;
}
//
.el-menu--vertical
{
.el-popover.el-submenu-popper-base
{
padding
:
0px
!important
;
margin-left
:
0px
;
box-shadow
:
0
6px
20px
0
#7a7a7a33
;
border-radius
:
4px
;
}
//
}
</
style
>
<
style
lang=
"scss"
scoped
>
.com-left-side-menu-lv1
{
width
:
48px
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
gap
:
16px
;
box-sizing
:
border-box
;
//
border-right
:
1px
solid
#f5f7fa
;
}
</
style
>
src/layout/components/LeftSide/LeftSideMenuLv1Item.vue
0 → 100644
View file @
7874b38
<
template
>
<div
:ref=
"`bt` + menuData.id"
:class=
"['com-left-side-menu-lv1-item', isHighlight ? 'highlight' : '']"
@
mouseenter
.
stop=
"mouseenter"
@
mouseleave
.
stop=
"mouseleave"
@
click
.
stop=
"handleClick()"
>
<i
:class=
"['i', icon]"
></i>
<span
class=
"title"
>
{{
menuData
.
title
}}
</span>
</div>
</
template
>
<
script
>
import
{
mapActions
,
mapGetters
}
from
'vuex'
export
default
{
name
:
'LeftSideMenuLv1Item'
,
inject
:
[
'bus'
],
props
:
{
menuData
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
computed
:
{
...
mapGetters
([
'app'
,
'menu'
]),
icon
()
{
return
`i-
${
this
.
menuData
.
icon
}${[
''
,
'-active'
][
+
this
.
isHighlight
]}
`
},
isHighlight
()
{
return
this
.
app
?.
currentPage
?.
id
?.
split
(
'-'
)[
0
]
==
this
.
menuData
.
id
||
this
.
menu
.
hoverId
==
this
.
menuData
.
id
}
},
methods
:
{
mouseenter
:
function
()
{
if
(
this
.
menu
.
hoverId
===
this
.
menu
.
id
)
return
this
.
setHoverId
(
this
.
menuData
.
id
)
this
.
menu
.
isCollapse
&&
this
.
bus
.
$emit
(
'mouseenter'
,
this
.
menuData
,
this
.
$refs
[
'bt'
+
this
.
menuData
.
id
],
()
=>
this
.
bus
.
$emit
(
'menuChanged'
,
this
.
menuData
.
children
.
noHidden
()))
},
mouseleave
:
function
()
{
this
.
menu
.
hoverId
&&
this
.
setHoverId
(
''
)
},
handleClick
()
{
this
.
bus
.
$emit
(
'menuChanged'
,
this
.
menuData
.
children
.
noHidden
())
},
...
mapActions
(
'menu'
,
[
'setHoverId'
])
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'~@/assets/style/collapse.scss'
;
.com-left-side-menu-lv1-item
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
width
:
48px
;
height
:
48px
;
gap
:
4px
;
cursor
:
pointer
;
&.highlight
{
background-color
:
#edecff
;
.title
{
color
:
$
main-color
;
}
}
.title
{
font-size
:
10px
;
color
:
#666
;
//
transform
:
scale
(
0.9
);
overflow
:
hidden
;
//
text-overflow
:
ellipsis
;
//
white-space
:
nowrap
;
//
max-width
:
5em
;
//
user-select
:
none
;
}
}
</
style
>
src/layout/components/LeftSide/LeftSideMenuLv2.vue
0 → 100644
View file @
7874b38
<
template
>
<div
class=
"com-left-side-menu-lv2"
>
<GLScroll
class=
"com-left-side-menu-lv2-scroll-y"
>
<!--
<div
class=
"menu-wrap"
>
-->
<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"
>
<LeftSideMenuLv2Item></LeftSideMenuLv2Item>
</el-menu>
<!--
</div>
-->
</GLScroll>
</div>
</
template
>
<
script
>
import
{
mapActions
,
mapGetters
}
from
'vuex'
import
{
currentId
}
from
'./mixins/index'
export
default
{
name
:
'LeftSideMenuLv2'
,
mixins
:
[
currentId
],
inject
:
[
'bus'
],
created
()
{
this
.
bus
.
$on
(
'current'
,
this
.
handleCurrentChange
)
this
.
bus
.
$on
(
'menuChanged'
,
this
.
handleMenuChanged
)
},
computed
:
{
...
mapGetters
([
'app'
,
'menu'
])
},
mounted
()
{
this
.
handleCurrentChange
(
this
.
current
)
},
beforeDestroy
()
{
this
.
bus
.
$off
(
'current'
,
this
.
handleCurrentChange
)
this
.
bus
.
$off
(
'menuChanged'
,
this
.
handleMenuChanged
)
},
data
()
{
return
{
cur
:
{
openeds
:
[],
active
:
''
}
}
},
methods
:
{
...
mapActions
(
'menu'
,
[
'setOpenId'
,
'setHoverId'
]),
open
(
index
)
{
this
.
setOpenId
(
index
)
},
close
()
{
this
.
setOpenId
(
''
)
// this.setHoverId('')
},
handleCurrentChange
({
lv1
,
lv2
,
lv3
})
{
this
.
cur
.
active
=
`
${
lv1
}
-
${
lv2
}
-
${
lv3
}
`
},
handleMenuChanged
(
menus
)
{
this
.
cur
.
openeds
=
menus
.
map
(({
id
})
=>
id
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'~@/assets/style/collapse.scss'
;
.com-left-side-menu-lv2
{
width
:
100%
;
height
:
100%
;
user-select
:
none
;
overflow-y
:
auto
;
.menu-wrap
{
height
:
100%
;
/deep/.el-menu
{
height
:
100%
;
}
}
&
-scroll-y
{
/deep/.el-scrollbar__wrap
{
margin-bottom
:
0
!important
;
}
height
:
100
%;
}
}
</
style
>
src/layout/components/LeftSide/LeftSideMenuLv2Item.vue
0 → 100644
View file @
7874b38
<
template
>
<div
class=
"com-left-side-menu-lv2-item"
>
<div
v-for=
"item in menus"
:key=
"item.id"
>
<!-- 没有二级菜单的一级菜单 -->
<div
class=
"el-submenu"
:class=
"
{ active: `${current.lv1}-${current.lv2}` == item.id }" v-if="isMenuNoChildren(item)" @click.stop="handleModuleClick(item)">
<div
class=
"el-submenu__title"
>
<span>
{{
item
.
title
}}
</span>
</div>
</div>
<!-- 有二级菜单的一级菜单 -->
<el-submenu
v-else
:index=
"item.id"
popper-class=
"el-submenu-popper-base"
:hide-timeout=
"hideTimeout"
:show-timeout=
"showTimeout"
>
<span
slot=
"title"
>
{{
item
.
title
}}
</span>
<!-- 渲染二级菜单 -->
<LeftSideMenuLv3
:menuItems=
"item.children"
:parentTitle=
"item.title"
></LeftSideMenuLv3>
</el-submenu>
</div>
</div>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
{
currentId
}
from
'./mixins/index'
export
default
{
name
:
'LeftSideMenuLv2Item'
,
mixins
:
[
currentId
],
inject
:
[
'bus'
],
data
()
{
return
{
menus
:
[],
showTimeout
:
0
,
hideTimeout
:
0
}
},
computed
:
{
...
mapGetters
([
'app'
,
'menu'
])
},
watch
:
{
'menu.isCollapse'
:
{
handler
(
n
)
{
!
n
&&
this
.
reload
()
}
}
},
mounted
()
{
this
.
bus
.
$on
(
'menuChanged'
,
this
.
handleMenuChanged
)
this
.
reload
()
},
beforeDestroy
()
{
this
.
bus
.
$off
(
'menuChanged'
,
this
.
handleMenuChanged
)
},
methods
:
{
handleModuleClick
(
menu
)
{
this
.
$router
.
push
(
menu
.
path
)
},
isMenuNoChildren
({
children
=
[]
})
{
return
children
.
noHidden
().
length
==
0
},
handleMenuChanged
(
menus
)
{
this
.
menus
=
menus
},
reload
()
{
const
{
lv1
}
=
this
.
current
this
.
menus
=
this
.
app
.
menuList
.
find
(({
id
})
=>
id
==
lv1
).
children
.
noHidden
()
this
.
bus
.
$emit
(
'menuChanged'
,
this
.
menus
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'~@/assets/style/collapse.scss'
;
@import
'~@/assets/style/mixins.scss'
;
$
active-background-color
:
rgba
(
88
,
80
,
255
,
0
.2
)
!
important
;
.com-left-side-menu-lv2-item
{
height
:
100%
;
padding
:
8px
;
/deep/.el-submenu
{
height
:
100%
;
border-radius
:
4px
;
&__title
{
height
:
36px
;
line-height
:
36px
;
background-color
:
transparent
!important
;
padding
:
0
8px
!important
;
&:hover
{
//
background-color
:
#fff
!important
;
span,
i
{
color
:
$
main-color
!important
;
}
}
span
{
font-size
:
16px
;
color
:
#444
;
font-weight
:
600
;
}
.el-submenu__icon-arrow
{
right
:
0
;
}
}
//
&
.is-opened
{
//
.el-submenu__title
{
//
background-color
:
transparent
!important
;
//
span,
//
i
{
//
color
:
$
main-color
!important
;
//
}
//
}
//
}
&
.is-active
{
.el-submenu__title
{
background-color
:
transparent
!important
;
span,
i
{
color
:
$
main-color
!important
;
}
}
}
&
.active
{
@include
menu-highlight;
span
{
color
:
$
main-color
!important
;
}
}
}
}
</
style
>
src/layout/components/LeftSide/LeftSideMenuLv3.vue
0 → 100644
View file @
7874b38
<
template
>
<el-menu-item-group
:title=
"parentTitle"
class=
"com-left-side-menu-lv3"
v-if=
"menuItems"
>
<el-menu-item
v-for=
"item in menuItems.noHidden()"
:key=
"item.id"
:index=
"item.id"
@
click
.
native
.
stop=
"handleSelect(item)"
>
<span>
{{
item
.
title
}}
</span>
</el-menu-item>
</el-menu-item-group>
</
template
>
<
script
>
export
default
{
name
:
'LeftSideMenuLv3'
,
props
:
{
parentTitle
:
{
type
:
String
,
required
:
false
,
default
:
''
},
menuItems
:
{
type
:
Array
,
required
:
true
}
},
methods
:
{
handleSelect
({
path
})
{
if
(
path
)
{
this
.
$router
.
push
(
path
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'~@/assets/style/collapse.scss'
;
@import
'~@/assets/style/mixins.scss'
;
$
menu-item-width
:
144px
!
important
;
.com-left-side-menu-lv3
{
/deep/.el-menu-item-group__title
{
display
:
none
;
}
/
deep
/
ul
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.el-menu-item
{
width
:
$
menu-item-width
;
min-width
:
$
menu-item-width
;
height
:
32px
;
line-height
:
32px
;
align-self
:
center
;
border-radius
:
4px
;
padding-left
:
8px
!important
;
span
{
color
:
#777
;
font-size
:
14px
;
}
&
:hover
,
&
.is-active
{
@include
menu-highlight;
span
{
color
:
$
main-color
!important
;
}
}
&
:hover:not
(
.is-active
)
{
background-color
:
transparent
!important
;
}
}
}
}
</
style
>
<
style
lang=
"scss"
>
$
width
:
150px
;
@mixin
popup_width
{
width
:
$
width
!important
;
min-width
:
$
width
!important
;
}
.el-menu--vertical
{
&.el-submenu-popper-base
{
.el-menu--popup
{
@include
popup_width;
margin-left
:
-8px
;
box-shadow
:
0px
6px
20px
0px
rgba
(
122
,
122
,
122
,
0.2
);
border-radius
:
4px
;
.scrm-base-submenu-item
{
.el-menu-item
{
@include
popup_width;
padding-left
:
20px
!important
;
border-radius
:
0
;
}
.el-menu-item-group__title
{
display
:
block
;
}
}
}
}
}
</
style
>
src/layout/components/LeftSide/LeftSideMenuLv3Item.vue
0 → 100644
View file @
7874b38
<
template
>
<li
class=
"com-left-side-menu-lv3-item"
>
{{
menu3
}}
</li>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'LeftSideMenuLv3Item'
,
props
:
{
menu3
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
computed
:
{
...
mapGetters
([
'app'
,
'menu'
])
},
methods
:
{}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'~@/assets/style/collapse.scss'
;
.com-left-side-menu-lv3-item
{
width
:
100%
;
min-height
:
36px
;
background-color
:
blue
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
16px
;
color
:
#333
;
}
</
style
>
src/layout/components/LeftSide/LeftSideRight.vue
0 → 100644
View file @
7874b38
<
template
>
<div
class=
"com-left-side-right"
>
<LeftSideMenuNav></LeftSideMenuNav>
</div>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'LeftSideRight'
,
computed
:
{
...
mapGetters
([
'app'
,
'menu'
])
},
methods
:
{}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'~@/assets/style/collapse.scss'
;
.com-left-side-right
{
flex
:
1
;
}
</
style
>
src/layout/components/LeftSide/mixins/index.js
0 → 100644
View file @
7874b38
import
{
mapGetters
}
from
'vuex'
export
const
currentId
=
{
computed
:
{
...
mapGetters
([
'app'
]),
current
()
{
let
_current
=
{}
if
(
this
.
app
.
currentPage
)
{
const
[
lv1
,
lv2
,
lv3
,
lv4
]
=
this
.
app
.
currentPage
.
id
.
split
(
'-'
)
Object
.
assign
(
_current
,
{
lv1
,
lv2
,
lv3
,
lv4
})
}
return
_current
}
}
}
src/layout/components/Logo.vue
View file @
7874b38
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: lizhijie429
* @Author: lizhijie429
* @Date: 2021-08-19 11:16:08
* @Date: 2021-08-19 11:16:08
* @LastEditors: limin
* @LastEditors: limin
* @LastEditTime: 2023-0
4-12 09:38:06
* @LastEditTime: 2023-0
9-12 13:54:49
* @Description:
* @Description:
-->
-->
<
template
>
<
template
>
...
@@ -25,8 +25,8 @@ export default {
...
@@ -25,8 +25,8 @@ export default {
config
()
{
config
()
{
const
{
cdn
,
customized
,
assets
=
customized
.
assets
}
=
this
.
$config
const
{
cdn
,
customized
,
assets
=
customized
.
assets
}
=
this
.
$config
const
src
=
`
${
cdn
}
/assets/
${
assets
}
`
const
src
=
`
${
cdn
}
/assets/
${
assets
}
`
const
src_logo_menu
=
`
${
src
}
/logo_menu.png`
const
src_logo_menu
=
`
${
src
}
/logo_menu
_new
.png`
const
src_logo_collapse
=
`
${
src
}
/logo_collapse.png`
const
src_logo_collapse
=
`
${
src
}
/logo_collapse
_new
.png`
return
{
src_logo_menu
,
src_logo_collapse
,
isCollapse
:
this
.
menu
.
isCollapse
}
return
{
src_logo_menu
,
src_logo_collapse
,
isCollapse
:
this
.
menu
.
isCollapse
}
}
}
},
},
...
@@ -46,14 +46,14 @@ export default {
...
@@ -46,14 +46,14 @@ export default {
height
:
100%
;
height
:
100%
;
background
:
#fff
;
background
:
#fff
;
position
:
relative
;
position
:
relative
;
padding-left
:
12px
;
//
padding-left
:
12px
;
/deep/.el-image
{
/
/
/
deep/.el-image
{
margin
:
24
px
auto
;
//
margin
:
8
px
auto
;
}
//
}
.folder
{
.folder
{
position
:
absolute
;
position
:
absolute
;
right
:
0
;
right
:
0
;
bottom
:
18
px
;
bottom
:
-24
px
;
width
:
30px
;
width
:
30px
;
height
:
24px
;
height
:
24px
;
background-color
:
#f1f1f5
;
background-color
:
#f1f1f5
;
...
...
src/layout/components/SubMenuItem.vue
View file @
7874b38
...
@@ -26,6 +26,9 @@ export default {
...
@@ -26,6 +26,9 @@ export default {
this
.
$router
.
push
(
path
)
this
.
$router
.
push
(
path
)
}
}
}
}
},
mounted
(){
console
.
log
(
this
.
menuItems
);
}
}
}
}
</
script
>
</
script
>
...
...
src/layout/index.vue
View file @
7874b38
<
template
>
<
template
>
<el-container
class=
"base-container"
:class=
"
{ 'menu-collapse': menu.isCollapse }">
<el-container
class=
"base-container"
:class=
"
{ 'menu-collapse': menu.isCollapse }">
<el-aside
class=
"base-container-aside"
>
<el-aside
class=
"base-container-aside"
>
<
SideMenu></
SideMenu>
<
LeftSideMenu></Left
SideMenu>
</el-aside>
</el-aside>
<el-container
class=
"base-container-right"
>
<el-container
class=
"base-container-right"
>
<el-header>
<el-header>
...
...
vue.config.js
View file @
7874b38
...
@@ -92,7 +92,7 @@ module.exports = {
...
@@ -92,7 +92,7 @@ module.exports = {
}
}
}
}
])
])
process
.
env
.
NODE_ENV
===
'development'
&&
config
.
plugin
(
'webpack-bundle-analyzer'
).
use
(
require
(
'webpack-bundle-analyzer'
).
BundleAnalyzerPlugin
)
//
process.env.NODE_ENV === 'development' && config.plugin('webpack-bundle-analyzer').use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
}
}
}
}
...
...
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