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