AppMain.vue 420 Bytes
Newer Older
Pan's avatar
Pan committed
1
<template>
Pan's avatar
Pan committed
2
    <section class="app-main">
Pan's avatar
Pan committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
        <transition name="fade" mode="out-in">
            <router-view :key="key"></router-view>
        </transition>
    </section>
</template>

<script>
    export default {
      name: 'AppMain',
      computed: {
        key() {
          return this.$route.name !== undefined ? this.$route.name + +new Date() : this.$route + +new Date()
        }
      }
    }
</script>