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 41cf52c1
authored
Sep 22, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
面包屑调整
1 parent
250cae90
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
116 additions
and
6 deletions
src/layout/components/Breadcrumb3.vue
src/layout/components/LeftSide/LeftSideIndex.vue
src/layout/components/LeftSide/LeftSideMenuLv2.vue
src/layout/components/LeftSide/LeftSideMenuLv2Item.vue
src/layout/components/NavMenu.vue
src/layout/index.vue
src/store/modules/menu.js
src/layout/components/Breadcrumb3.vue
0 → 100644
View file @
41cf52c
<
template
>
<div
class=
"com-bc3"
>
<div
class=
"back-wrap"
v-show=
"page.isShowBack"
@
click=
"$router.back()"
>
<i
class=
"i i-back"
></i>
<span
class=
"back-text"
>
返回
</span>
<span
class=
"sprator"
>
|
</span>
</div>
<div
class=
"page-title"
>
<el-breadcrumb
separator=
"/"
v-if=
"auth.session"
>
<el-breadcrumb-item
:to=
"
{ path: ['', item.path][+isLink(item)] }" v-for="item in breadcrumbs" :key="item.id" :class="isLink(item) ? 'isLink' : 'noLink'">
{{
item
.
title
}}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
</div>
</
template
>
<
script
>
import
{
Breadcrumb
,
BreadcrumbItem
}
from
'element-ui'
import
{
mapGetters
}
from
'vuex'
import
{
utils
}
from
'glsx-common'
export
default
{
name
:
'GLBreadcrumb3'
,
components
:
{
[
Breadcrumb
.
name
]:
Breadcrumb
,
[
BreadcrumbItem
.
name
]:
BreadcrumbItem
},
computed
:
{
page
()
{
const
{
id
,
hidden
,
title
:
pageTitle
=
''
}
=
this
.
app
.
currentPage
||
{}
const
isShowBack
=
id
?.
split
(
'-'
).
length
>
2
&&
hidden
const
title
=
decodeURI
(
pageTitle
)
return
{
isShowBack
,
title
}
},
breadcrumbs
()
{
const
{
currentPage
,
menuList
:
menus
}
=
this
.
app
if
(
!
currentPage
||
!
menus
||
!
menus
.
length
)
return
[]
const
{
id
:
curId
,
title
,
navIds
=
curId
.
split
(
'-'
),
curTitle
=
decodeURI
(
title
)
}
=
currentPage
return
navIds
.
reduce
((
navs
,
next
)
=>
{
const
{
length
,
nextId
=
length
?
`
${
navs
[
length
-
1
].
id
}
-
${
next
}
`
:
next
}
=
navs
const
[
menu
]
=
utils
.
array
.
valInDeep
(
this
.
app
.
menuList
,
nextId
,
'id'
,
'children'
)
||
[]
const
{
id
,
title
,
path
,
titleLogic
=
nextId
===
curId
?
curTitle
:
title
}
=
menu
navs
.
push
({
id
,
title
:
titleLogic
,
path
})
return
navs
},
[])
},
isNotHome
()
{
const
{
currentPage
}
=
this
.
app
return
currentPage
&&
currentPage
.
path
!==
this
.
auth
.
session
.
defaultPath
},
...
mapGetters
([
'app'
,
'auth'
])
},
methods
:
{
isLink
({
path
})
{
return
path
.
startsWith
(
'/'
)
&&
!
path
.
includes
(
'@'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
$
bread-item-color
:
#333
!
important
;
.com-bc3
{
display
:
flex
;
align-items
:
center
;
font-weight
:
600
;
.back-wrap
{
font-size
:
12px
;
color
:
$
bread-item-color
;
cursor
:
pointer
;
i
{
margin-right
:
4px
;
}
.sprator
{
margin
:
0
8px
;
color
:
#c3c3c3
;
}
}
.page-title
{
font-size
:
14px
;
color
:
$
bread-item-color
;
}
/
deep
/
.el-breadcrumb
{
&__item
{
.el-breadcrumb__inner
{
color
:
$
bread-item-color
;
font-weight
:
500
;
cursor
:
default
!important
;
}
.el-breadcrumb__separator
{
color
:
$
bread-item-color
;
font-weight
:
500
!important
;
}
&
:last-child
{
.el-breadcrumb__inner
{
text-decoration
:
none
!important
;
font-weight
:
700
!important
;
color
:
$
main-color
!important
;
cursor
:
default
!important
;
}
}
&
.isLink
{
.el-breadcrumb__inner
{
&:hover
{
text-decoration
:
underline
;
cursor
:
pointer
!important
;
}
}
}
}
}
}
</
style
>
src/layout/components/LeftSide/LeftSideIndex.vue
View file @
41cf52c
...
...
@@ -33,7 +33,7 @@ export default {
},
methods
:
{
mouseleave
:
function
()
{
!
this
.
menu
.
isCollapse
&&
this
.
bus
.
$emit
(
'menuChanged'
,
{
isReload
:
true
})
//
!this.menu.isCollapse && this.bus.$emit('menuChanged', { isReload: true })
}
}
}
...
...
src/layout/components/LeftSide/LeftSideMenuLv2.vue
View file @
41cf52c
...
...
@@ -10,7 +10,7 @@
<
script
>
import
{
currentId
}
from
'./mixins/index'
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
export
default
{
name
:
'LeftSideMenuLv2'
,
mixins
:
[
currentId
],
...
...
src/layout/components/LeftSide/LeftSideMenuLv2Item.vue
View file @
41cf52c
...
...
@@ -115,7 +115,7 @@ $active-background-color: rgba(88, 80, 255, 0.2) !important;
}
}
span
{
font-size
:
1
6
px
;
font-size
:
1
5
px
;
color
:
#444
;
font-weight
:
600
;
}
...
...
src/layout/components/NavMenu.vue
View file @
41cf52c
<
template
>
<div
class=
"scrm-base-nav flex-row"
>
<div
class=
"flex-1 none-border nav-left"
>
<GLBreadcrumb
2></GLBreadcrumb2
>
<GLBreadcrumb
3></GLBreadcrumb3
>
</div>
<div
class=
"flex-row flex-items-center nav-right"
>
<template
v-if=
"$config.productCode !== 'PC0008'"
>
...
...
src/layout/index.vue
View file @
41cf52c
...
...
@@ -63,7 +63,7 @@ export default {
z-index
:
1
;
flex
:
0
0
$
menu-width
;
text-align
:
left
;
transition
:
flex
0.
1
s
;
transition
:
flex
0.
08
s
;
//
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
}
&
-right
{
...
...
src/store/modules/menu.js
View file @
41cf52c
...
...
@@ -3,7 +3,7 @@ const menu = {
state
:
()
=>
({
hoverId
:
''
,
openId
:
''
,
isCollapse
:
fals
e
isCollapse
:
tru
e
}),
mutations
:
{
SET_HOVER_ID
(
state
,
id
)
{
...
...
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