fix: 各页面keepAlive功能
This commit is contained in:
parent
7ecd609185
commit
c8c1c021ea
|
@ -1,10 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<global-layout>
|
<global-layout>
|
||||||
<transition name="page-transition">
|
<transition name="page-transition">
|
||||||
<keep-alive v-if="keepAlive">
|
<keep-alive>
|
||||||
<router-view />
|
<router-view />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
<router-view v-else />
|
|
||||||
</transition>
|
</transition>
|
||||||
</global-layout>
|
</global-layout>
|
||||||
</template>
|
</template>
|
||||||
|
@ -22,14 +21,6 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
keepAlive () {
|
|
||||||
return this.$route.meta.keepAlive
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<keep-alive :include="includedComponents">
|
<keep-alive>
|
||||||
<router-view v-if="keepAlive" />
|
<router-view />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
<router-view v-if="!keepAlive" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { TabLayout, RouteView, BlankLayout, PageView } from '@/components/layouts'
|
import { TabLayout, RouteView, BlankLayout, PageView, BasicLayout } from '@/components/layouts'
|
||||||
import Login from '@/views/user/Login'
|
import Login from '@/views/user/Login'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,7 +10,7 @@ export const asyncRouterMap = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
name: 'dashboard',
|
name: 'dashboard',
|
||||||
component: TabLayout,
|
component: BasicLayout,
|
||||||
meta: { title: '首页' },
|
meta: { title: '首页' },
|
||||||
redirect: '/station-operation',
|
redirect: '/station-operation',
|
||||||
children: [
|
children: [
|
||||||
|
|
|
@ -88,7 +88,7 @@ export function generateIndexRouter(data) {
|
||||||
path: '/',
|
path: '/',
|
||||||
name: 'dashboard',
|
name: 'dashboard',
|
||||||
//component: () => import('@/components/layouts/BasicLayout'),
|
//component: () => import('@/components/layouts/BasicLayout'),
|
||||||
component: resolve => require(['@/components/layouts/TabLayout'], resolve),
|
component: resolve => require(['@/components/layouts/BasicLayout'], resolve),
|
||||||
meta: { title: '首页' },
|
meta: { title: '首页' },
|
||||||
redirect: '/station-operation',
|
redirect: '/station-operation',
|
||||||
children: [
|
children: [
|
||||||
|
|
|
@ -99,6 +99,7 @@ const columns = [
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
name: 'LogManage',
|
||||||
mixins: [JeecgListMixin],
|
mixins: [JeecgListMixin],
|
||||||
components: {
|
components: {
|
||||||
TreeWithLine
|
TreeWithLine
|
||||||
|
|
|
@ -259,6 +259,7 @@ const ANALYZE_TYPE = {
|
||||||
BETA_GAMMA: 'betaGammaAnalysis',
|
BETA_GAMMA: 'betaGammaAnalysis',
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
name: 'SpectrumAnalysis',
|
||||||
components: {
|
components: {
|
||||||
BetaGammaAnalysis,
|
BetaGammaAnalysis,
|
||||||
GammaAnalysis,
|
GammaAnalysis,
|
||||||
|
|
|
@ -166,6 +166,7 @@ import { getAction } from '../../api/manage'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
name: 'StationOperation',
|
||||||
components: {
|
components: {
|
||||||
Map,
|
Map,
|
||||||
MapMarker,
|
MapMarker,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user