Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
admin-fe
Commits
6f1db28e
Commit
6f1db28e
authored
6 years ago
by
Pan
Browse files
Options
Downloads
Patches
Plain Diff
feat[Breadcrumb]: add hide Breadcrumb option #1442
parent
a5614550
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/Breadcrumb/index.vue
+3
-2
3 additions, 2 deletions
src/components/Breadcrumb/index.vue
src/router/index.js
+4
-3
4 additions, 3 deletions
src/router/index.js
with
7 additions
and
5 deletions
src/components/Breadcrumb/index.vue
+
3
−
2
View file @
6f1db28e
<
template
>
<
template
>
<el-breadcrumb
class=
"app-breadcrumb"
separator=
"/"
>
<el-breadcrumb
class=
"app-breadcrumb"
separator=
"/"
>
<transition-group
name=
"breadcrumb"
>
<transition-group
name=
"breadcrumb"
>
<el-breadcrumb-item
v-for=
"(item,index) in levelList"
v-if=
"item.meta.title"
:key=
"item.path"
>
<el-breadcrumb-item
v-for=
"(item,index) in levelList"
v-if=
"item.meta.title&&item.meta.breadcrumb!==false"
:key=
"item.path"
>
<span
v-if=
"item.redirect==='noredirect'||index==levelList.length-1"
class=
"no-redirect"
>
{{
generateTitle
(
item
.
meta
.
title
)
}}
</span>
<span
v-if=
"item.redirect==='noredirect'||index==levelList.length-1"
class=
"no-redirect"
>
{{
generateTitle
(
item
.
meta
.
title
)
}}
</span>
<a
v-else
@
click.prevent=
"handleLink(item)"
>
{{
generateTitle
(
item
.
meta
.
title
)
}}
</a>
<a
v-else
@
click.prevent=
"handleLink(item)"
>
{{
generateTitle
(
item
.
meta
.
title
)
}}
</a>
</el-breadcrumb-item>
</el-breadcrumb-item>
</transition-group>
</transition-group>
...
...
This diff is collapsed.
Click to expand it.
src/router/index.js
+
4
−
3
View file @
6f1db28e
...
@@ -24,10 +24,11 @@ import nestedRouter from './modules/nested'
...
@@ -24,10 +24,11 @@ import nestedRouter from './modules/nested'
* redirect: noredirect if `redirect:noredirect` will no redirect in the breadcrumb
* redirect: noredirect if `redirect:noredirect` will no redirect in the breadcrumb
* name:'router-name' the name is used by <keep-alive> (must set!!!)
* name:'router-name' the name is used by <keep-alive> (must set!!!)
* meta : {
* meta : {
roles: ['admin','editor']
will control the page roles (you can set multiple roles)
roles: ['admin','editor'] will control the page roles (you can set multiple roles)
title: 'title' the name show in submenu and breadcrumb (recommend set)
title: 'title' the name show in submenu and breadcrumb (recommend set)
icon: 'svg-name' the icon show in the sidebar,
icon: 'svg-name' the icon show in the sidebar
noCache: true if true ,the page will no be cached(default is false)
noCache: true if true, the page will no be cached(default is false)
breadcrumb: false if false, the item will hidden in breadcrumb(default is true)
}
}
**/
**/
export
const
constantRouterMap
=
[
export
const
constantRouterMap
=
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment