Previous view still diplays after route changes in Vue-Router

Solution 1:

The reason for this issue is that Vue by default uses in-out mode for transitions. If you change the mode the out-in it should be fixed.

<transition name="el-fade-in-linear" mode="out-in">
  <component :is="Component" />
</transition>

As described in the documentation:

  • in-out: New element transitions in first, then when complete, the current element transitions out.
  • out-in: Current element transitions out first, then when complete, the new element transitions in.