chore: optimize the code of system layout; 🌟
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page-layout">
|
||||
<page-header :breadcrumb="breadcrumb" :title="pageTitle" :logo="logo" :avatar="avatar">
|
||||
<page-header :style="`margin-top: ${multiPage ? 0 : -24}px`" :breadcrumb="breadcrumb" :title="pageTitle" :logo="logo" :avatar="avatar">
|
||||
<slot name="action" slot="action"></slot>
|
||||
<slot slot="content" name="headerContent"></slot>
|
||||
<div slot="content" v-if="!this.$slots.headerContent && desc">
|
||||
@@ -40,7 +40,7 @@ export default {
|
||||
this.page = this.$route.meta.page
|
||||
},
|
||||
computed: {
|
||||
...mapState('setting', ['layout']),
|
||||
...mapState('setting', ['layout', 'multiPage']),
|
||||
pageTitle() {
|
||||
let pageTitle = this.page && this.page.title
|
||||
return this.title || this.$t(pageTitle) || this.routeName
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
|
||||
<style lang="less">
|
||||
.page-header{
|
||||
margin: -24px -24px 0;
|
||||
margin: 0 -24px 0;
|
||||
}
|
||||
.link{
|
||||
/*margin-top: 16px;*/
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<span slot="tab" :pagekey="page.fullPath">{{pageName(page.path)}}</span>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<div class="tabs-view-content">
|
||||
<div class="tabs-view-content" :style="`margin-top: ${multiPage ? -24 : 0}px`">
|
||||
<page-toggle-transition :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction">
|
||||
<keep-alive :exclude="dustbins" v-if="multiPage">
|
||||
<router-view />
|
||||
|
||||
Reference in New Issue
Block a user