Blame view

ant-design-vue-jeecg/src/components/layouts/BasicLayout.vue 1020 Bytes
肖超群 authored
1
2
3
4
<template>
  <global-layout>
    <transition name="page-transition">
      <keep-alive v-if="keepAlive">
肖超群 authored
5
        <router-view/>
肖超群 authored
6
      </keep-alive>
肖超群 authored
7
      <router-view v-else/>
肖超群 authored
8
9
10
11
12
    </transition>
  </global-layout>
</template>

<script>
肖超群 authored
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import GlobalLayout from '@/components/page/GlobalLayout'

export default {
  name: "BasicLayout",
  components: {
    GlobalLayout
  },
  data() {
    return {}
  },
  computed: {
    keepAlive() {
      return this.$route.meta.keepAlive
    }
  },
  methods: {},
}
肖超群 authored
30
31
32
33
</script>

<style lang="less">
肖超群 authored
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* The following styles are auto-applied to elements with
* transition="page-transition" when their visibility is toggled
* by Vue.js.
*
* You can easily play with the page transition by editing
* these styles.
*/

.page-transition-enter {
  opacity: 0;
}

.page-transition-leave-active {
  opacity: 0;
}

.page-transition-enter .page-transition-container,
.page-transition-leave-active .page-transition-container {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}
肖超群 authored
56
</style>