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 24233e76
authored
Sep 22, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
youhua
1 parent
41cf52c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
20 deletions
src/layout/components/Breadcrumb3.vue
src/layout/components/Breadcrumb3.vue
View file @
24233e7
<
template
>
<
template
>
<div
class=
"com-bc3"
>
<div
class=
"com-bc3"
>
<div
class=
"back-wrap"
v-show=
"
page
.isShowBack"
@
click=
"$router.back()"
>
<div
class=
"back-wrap"
v-show=
"
breadcrumbs
.isShowBack"
@
click=
"$router.back()"
>
<i
class=
"i i-back"
></i>
<i
class=
"i i-back"
></i>
<span
class=
"back-text"
>
返回
</span>
<span
class=
"back-text"
>
返回
</span>
<span
class=
"sprator"
>
|
</span>
<span
class=
"sprator"
>
|
</span>
</div>
</div>
<div
class=
"page-title"
>
<div
class=
"page-title"
>
<el-breadcrumb
separator=
"/"
v-if=
"auth.session"
>
<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-item
:to=
"
{ path: ['', item.path][+isLink(item)] }" v-for="item in breadcrumbs
.breads
" :key="item.id" :class="isLink(item) ? 'isLink' : 'noLink'">
{{
item
.
title
}}
</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb>
</div>
</div>
</div>
</div>
...
@@ -24,27 +24,19 @@ export default {
...
@@ -24,27 +24,19 @@ export default {
[
BreadcrumbItem
.
name
]:
BreadcrumbItem
[
BreadcrumbItem
.
name
]:
BreadcrumbItem
},
},
computed
:
{
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
()
{
breadcrumbs
()
{
const
{
currentPage
,
menuList
:
menus
}
=
this
.
app
const
{
currentPage
,
menuList
:
menus
}
=
this
.
app
if
(
!
currentPage
||
!
menus
||
!
menus
.
length
)
return
[]
if
(
!
currentPage
||
!
menus
?
.
length
)
return
[]
const
{
id
:
curId
,
title
,
navIds
=
curId
.
split
(
'-'
),
curTitle
=
decodeURI
(
title
)
}
=
currentPage
const
{
id
:
curId
,
title
,
navIds
=
curId
.
split
(
'-'
),
curTitle
=
decodeURI
(
title
)
,
hidden
}
=
currentPage
return
navIds
.
reduce
((
navs
,
next
)
=>
{
const
breads
=
navIds
.
reduce
((
navs
,
next
)
=>
{
const
{
length
,
nextId
=
length
?
`
${
navs
[
length
-
1
].
id
}
-
${
next
}
`
:
next
}
=
navs
const
{
length
,
nextId
=
length
?
`
${
navs
[
length
-
1
].
id
}
-
${
next
}
`
:
next
}
=
navs
const
[
menu
]
=
utils
.
array
.
valInDeep
(
this
.
app
.
menuList
,
nextId
,
'id'
,
'children'
)
||
[]
const
[
menu
]
=
utils
.
array
.
valInDeep
(
menus
,
nextId
,
'id'
,
'children'
)
const
{
id
,
title
,
path
,
titleLogic
=
nextId
===
curId
?
curTitle
:
title
}
=
menu
const
{
id
,
title
,
path
,
titleLogic
=
nextId
===
curId
?
curTitle
:
title
}
=
menu
navs
.
push
({
id
,
title
:
titleLogic
,
path
})
navs
.
push
({
id
,
title
:
titleLogic
,
path
})
return
navs
return
navs
},
[])
},
[])
},
const
isShowBack
=
curId
?.
split
(
'-'
).
length
>
2
&&
hidden
isNotHome
()
{
return
{
breads
,
isShowBack
}
const
{
currentPage
}
=
this
.
app
return
currentPage
&&
currentPage
.
path
!==
this
.
auth
.
session
.
defaultPath
},
},
...
mapGetters
([
'app'
,
'auth'
])
...
mapGetters
([
'app'
,
'auth'
])
},
},
...
@@ -73,10 +65,6 @@ $bread-item-color: #333 !important;
...
@@ -73,10 +65,6 @@ $bread-item-color: #333 !important;
color
:
#c3c3c3
;
color
:
#c3c3c3
;
}
}
}
}
.page-title
{
font-size
:
14px
;
color
:
$
bread-item-color
;
}
/
deep
/
.el-breadcrumb
{
/
deep
/
.el-breadcrumb
{
&__item
{
&__item
{
.el-breadcrumb__inner
{
.el-breadcrumb__inner
{
...
...
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