Your Name 4 年前
父节点
当前提交
f610d942e6
共有 2 个文件被更改,包括 15 次插入2 次删除
  1. 14
    1
      src/layouts/UserLayout/index.vue
  2. 1
    1
      src/views/Dashboard/index.vue

+ 14
- 1
src/layouts/UserLayout/index.vue 查看文件

@@ -14,7 +14,9 @@
14 14
         <el-main>
15 15
           <PageHeader />
16 16
           <div class="container-wrapper">
17
-            <router-view></router-view>
17
+            <transition name="squish">
18
+              <router-view></router-view>
19
+            </transition>
18 20
           </div>
19 21
         </el-main>
20 22
         <el-footer><Footer /></el-footer>
@@ -107,4 +109,15 @@ export default {
107 109
   margin: 1em;
108 110
   position: relative;
109 111
 }
112
+
113
+.squish {
114
+  &-enter-active,&-leave-active {
115
+    transition: transform 0.25s  ease-in, opacity 0.25s  ease-in;
116
+  }
117
+
118
+  &-enter-from, &-leave-to {
119
+    transform: scale(0.95);
120
+    opacity: 0;
121
+  }
122
+}
110 123
 </style>

+ 1
- 1
src/views/Dashboard/index.vue 查看文件

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <div>123</div>
2
+  <div style="background: #fff">123</div>
3 3
 </template>
4 4
 
5 5
 <script>