
使用animate动画需要加前缀 animate__animated
```js
<div class="area">
<router-view v-slot="{ Component, route }">
<transition :enter-active-class="`animate__animated ${route.meta.transition}`">
<component :is="Component" :key="route.path" />
</transition>
</router-view>
</div>

import { createRouter, createWebHashHistory } from 'vue-router'
import 'animate.css'
export default createRouter({
history: createWebHashHistory(),
routes: [
{
path: '/home',
name: 'home',
meta: {
title:'首页',
transition: 'animate__fadeIn',
},
component: () => import('@/pages/home/index.vue'),
},
{
path: '/article',
name: 'article',
meta: {
title:'文章',
transition: 'animate__backInLeft' },
component: () => import('@/pages/article/index.vue'),
},
{
path: '/',
redirect: '/home',
},
],
scrollBehavior() {
return {
left: 0,
top: 0,
}
},
})