面包屑改造

master
toesbieya 6 years ago
parent 517873a869
commit 3d23e0a365
  1. 5
      vue/src/layout/component/Main/index.vue
  2. 2
      vue/src/router/index.js
  3. 4
      vue/src/router/module/defaultRoot/child/app.js
  4. 4
      vue/src/router/module/defaultRoot/child/purchase.js
  5. 4
      vue/src/router/module/defaultRoot/child/sell.js

@ -37,7 +37,10 @@ export default {
components: {BackToTop, Breadcrumb, PageView, PageFooter}, components: {BackToTop, Breadcrumb, PageView, PageFooter},
computed: { computed: {
showBreadcrumb: () => settingGetters.showBreadcrumb, showBreadcrumb() {
if (!settingGetters.showBreadcrumb) return false
return this.$route.meta.breadcrumb !== false
},
showBackToTop: () => settingGetters.showBackToTop, showBackToTop: () => settingGetters.showBackToTop,
cachedViews: () => tagsViewGetters.cachedViews, cachedViews: () => tagsViewGetters.cachedViews,

@ -5,7 +5,7 @@
* 左侧菜单显示name && !meta.hidden && meta.title * 左侧菜单显示name && !meta.hidden && meta.title
* 左侧菜单排序能在左侧菜单中显示 && meta.sort升序排列 * 左侧菜单排序能在左侧菜单中显示 && meta.sort升序排列
* 左侧菜单不折叠只有一个children的路由meta.alwaysShow * 左侧菜单不折叠只有一个children的路由meta.alwaysShow
* 面包屑显示meta.title || meta.dynamicTitle * 面包屑显示meta.breadcrumb !== false && (meta.title || meta.dynamicTitle)
* tab栏显示meta.title || meta.dynamicTitle * tab栏显示meta.title || meta.dynamicTitle
* tab栏固定显示meta.title && meta.affix * tab栏固定显示meta.title && meta.affix
* 页面不缓存!name && !meta.usePathKey && !meta.useFullPathKey || meta.noCache * 页面不缓存!name && !meta.usePathKey && !meta.useFullPathKey || meta.noCache

@ -5,13 +5,13 @@ const router = [
path: 'index', path: 'index',
component: 'index/', component: 'index/',
name: 'index', name: 'index',
meta: {title: '首页', affix: true, icon: 'svg-home', noAuth: true, sort: 0} meta: {title: '首页', affix: true, icon: 'svg-home', noAuth: true, breadcrumb: false, sort: 0}
}, },
{ {
path: 'user', path: 'user',
name: 'userCenter', name: 'userCenter',
component: 'userCenter/', component: 'userCenter/',
meta: {title: '个人中心', noCache: true, icon: 'svg-user', noAuth: true, hidden: true}, meta: {title: '个人中心', noCache: true, icon: 'svg-user', noAuth: true, breadcrumb: false, hidden: true},
} }
] ]

@ -12,11 +12,11 @@ const router = {
}, },
{ {
path: 'order/detail/:type(see|add|edit)/:id?', path: 'order/detail/:type(see|add|edit)/:id?',
props: true,
component: 'purchase/order/detail', component: 'purchase/order/detail',
meta: { meta: {
title: '采购订单详情页', title: '采购订单详情页',
hidden: true, hidden: true,
breadcrumb: false,
dynamicTitle(to) { dynamicTitle(to) {
const {type, id} = to.params const {type, id} = to.params
switch (type) { switch (type) {
@ -41,11 +41,11 @@ const router = {
}, },
{ {
path: 'inbound/detail/:type(see|add|edit)/:id?', path: 'inbound/detail/:type(see|add|edit)/:id?',
props: true,
component: 'purchase/inbound/detail', component: 'purchase/inbound/detail',
meta: { meta: {
title: '采购入库详情页', title: '采购入库详情页',
hidden: true, hidden: true,
breadcrumb: false,
dynamicTitle(to) { dynamicTitle(to) {
const {type, id} = to.params const {type, id} = to.params
switch (type) { switch (type) {

@ -12,11 +12,11 @@ const router = {
}, },
{ {
path: 'order/detail/:type(see|add|edit)/:id?', path: 'order/detail/:type(see|add|edit)/:id?',
props: true,
component: 'sell/order/detail', component: 'sell/order/detail',
meta: { meta: {
title: '销售订单详情页', title: '销售订单详情页',
hidden: true, hidden: true,
breadcrumb: false,
dynamicTitle(to) { dynamicTitle(to) {
const {type, id} = to.params const {type, id} = to.params
switch (type) { switch (type) {
@ -41,11 +41,11 @@ const router = {
}, },
{ {
path: 'outbound/detail/:type(see|add|edit)/:id?', path: 'outbound/detail/:type(see|add|edit)/:id?',
props: true,
component: 'sell/outbound/detail', component: 'sell/outbound/detail',
meta: { meta: {
title: '销售出库详情页', title: '销售出库详情页',
hidden: true, hidden: true,
breadcrumb: false,
dynamicTitle(to) { dynamicTitle(to) {
const {type, id} = to.params const {type, id} = to.params
switch (type) { switch (type) {

Loading…
Cancel
Save