mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-17 23:59:02 +00:00
perf: layout page
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<TabPage v-if="!loading" :active-menu.sync="iActiveMenu" :submenu="iSubmenu" @tab-click="handleTabClick">
|
||||
<TabPage
|
||||
v-if="!loading"
|
||||
:active-menu.sync="iActiveMenu"
|
||||
:submenu="iSubmenu"
|
||||
:title="iTitle"
|
||||
@tab-click="handleTabClick"
|
||||
>
|
||||
<template #headingRightSide>
|
||||
<span v-if="hasRightSide">
|
||||
<ActionsGroup slot="headingRightSide" :actions="pageActions" />
|
||||
@@ -85,7 +91,6 @@ export default {
|
||||
return title
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
data() {
|
||||
const vm = this
|
||||
@@ -241,9 +246,6 @@ export default {
|
||||
this.$emit('tab-click', tab, this.iActiveMenu)
|
||||
this.$emit('update:activeMenu', tab.name)
|
||||
this.$log.debug('Current tab is: ', this.activeMenu)
|
||||
},
|
||||
handleGoBack() {
|
||||
return this.goBack.bind(this)(this.object)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -264,14 +266,4 @@ export default {
|
||||
.page-submenu >>> .el-tabs__nav-wrap {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.go-back {
|
||||
border: none;
|
||||
padding: 2px 2px;
|
||||
}
|
||||
|
||||
.go-back >>> i {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<PageHeading v-if="iTitle || helpMessage" class="disabled-when-print">
|
||||
<el-button :disabled="gobackDisabled" class="go-back" icon="el-icon-back" @click="handleGoBack" />
|
||||
<slot name="title">
|
||||
<el-button :disabled="gobackDisabled" class="go-back" icon="el-icon-back" @click="handleGoBack" />
|
||||
<span style="padding-left: 10px">{{ iTitle }}</span>
|
||||
</slot>
|
||||
<template #rightSide>
|
||||
@@ -49,6 +49,9 @@ export default {
|
||||
return this.title || this.$route.meta.title
|
||||
},
|
||||
gobackDisabled() {
|
||||
if (this.$route.path.endsWith('dashboard')) {
|
||||
return true
|
||||
}
|
||||
return window.history.length <= 2
|
||||
}
|
||||
},
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Page>
|
||||
<Page v-bind="$attrs">
|
||||
<template #headingRightSide>
|
||||
<slot name="headingRightSide" />
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user