vue.js multiple transitions for a router-view

Asked By: Anonymous

If I have a vue-router ‘router-view’ element defined like this:

<router-view transition="slide">

Is there a way to change the transition to a ‘fade’ when a specific route is called?


Solution

Answered By: Anonymous

Use a dynamic binding fopr transition:

<router-view :transition="$route.transition">

And set the data of transition from your route data

router.map({
  '/specialroute': {
    component: { ... },
    transition: 'fade'
  }
})
techinplanet staff

techinplanet staff


Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno