mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-19 17:54:37 +00:00
perf: 修改 tab 选择
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Page class="tab-page" v-bind="$attrs">
|
||||
<Page v-if="!loading" class="tab-page" v-bind="$attrs">
|
||||
<template #headingRightSide>
|
||||
<slot name="headingRightSide" />
|
||||
</template>
|
||||
@@ -46,7 +46,7 @@
|
||||
<el-alert v-if="helpMessage" type="success">
|
||||
<span class="announcement-main" v-html="helpMessage" />
|
||||
</el-alert>
|
||||
<transition v-if="loading" appear mode="out-in" name="fade-transform">
|
||||
<transition v-if="!loading" appear mode="out-in" name="fade-transform">
|
||||
<slot>
|
||||
<keep-alive>
|
||||
<component :is="computeActiveComponent" />
|
||||
@@ -122,19 +122,16 @@ export default {
|
||||
const activeTab = to.query?.tab
|
||||
if (activeTab && this.iActiveMenu !== activeTab) {
|
||||
this.iActiveMenu = activeTab
|
||||
this.loading = false
|
||||
setTimeout(() => {
|
||||
this.loading = true
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
activated() {
|
||||
this.iActiveMenu = this.getPropActiveTab()
|
||||
this.loading = false
|
||||
},
|
||||
mounted() {
|
||||
console.log('Mounted ')
|
||||
created() {
|
||||
this.iActiveMenu = this.getPropActiveTab()
|
||||
this.loading = false
|
||||
},
|
||||
methods: {
|
||||
handleTabClick(tab) {
|
||||
|
@@ -69,6 +69,7 @@ export default {
|
||||
title: i18n.t('FileExplorer'),
|
||||
activeMenu: '/assets',
|
||||
icon: 'file-manager',
|
||||
external: true,
|
||||
permissions: ['rbac.view_filemanager']
|
||||
}
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ $single-menu-height: 38px;
|
||||
padding: 19px 20px !important;
|
||||
line-height: 36px;
|
||||
min-width: 200px;
|
||||
font-size: 12px;
|
||||
font-size: 13px;
|
||||
letter-spacing: .03em;
|
||||
|
||||
&:hover,
|
||||
@@ -110,7 +110,7 @@ $single-menu-height: 38px;
|
||||
height: $single-menu-height;
|
||||
line-height: $single-menu-height;
|
||||
min-width: 200px;
|
||||
font-size: 12px;
|
||||
font-size: 13px;
|
||||
|
||||
&:hover,
|
||||
&.is-active {
|
||||
|
Reference in New Issue
Block a user