Better show breadcrumb

master
Myron Lau 6 years ago
parent 2e82bdd162
commit 80f891f896
  1. 6
      src/components/page/PageHeader.vue
  2. 2
      src/router/index.js

@ -2,8 +2,10 @@
<div class="page-header"> <div class="page-header">
<div class="breadcrumb"> <div class="breadcrumb">
<a-breadcrumb> <a-breadcrumb>
<a-breadcrumb-item><a href="#/dashboard">首页</a></a-breadcrumb-item> <a-breadcrumb-item :key="item.path" v-for="(item, index) in breadcrumb">
<a-breadcrumb-item :key="item.path" v-for="item in breadcrumb">{{item.name}}</a-breadcrumb-item> <span v-if="index === 0"><a href="#/dashboard/workplace">{{item.name}}</a></span>
<span v-else>{{item.name}}</span>
</a-breadcrumb-item>
</a-breadcrumb> </a-breadcrumb>
</div> </div>
<div class="detail"> <div class="detail">

@ -37,7 +37,7 @@ export default new Router({
}, },
{ {
path: '/', path: '/',
name: 'home', name: '首页',
component: MenuView, component: MenuView,
redirect: '/login', redirect: '/login',
icon: 'none', icon: 'none',

Loading…
Cancel
Save