Skip to content

witRouterView Router View Component

witRouterView is an enhanced router view component that integrates page switching animation, page cache management, progress bar display and other features, supports dynamic page meta information updates, suitable for single-page applications that need to optimize user experience.

Usage Example

vue
<template>
  <div>
    <!-- Router view component -->
    <witRouterView />
  </div>
</template>

<script lang="ts" setup>
// No additional configuration needed, component automatically handles route rendering
</script>

API

Component

Component NameDescription
witRouterViewEnhanced router view component, supports page caching and switching animation

Properties

Property NameTypeDefault ValueDescription
---This component requires no property configuration

Methods

Method NameDescriptionParameter Type
---

Events

Event NameDescriptionParameters
---

Features

Router View Rendering

  • Based on Vue Router's router-view component
  • Supports dynamic component rendering
  • Automatically handles route parameter changes

Page Switching Animation

  • Supports configuring page switching transition effects
  • Uses transition component to implement animation
  • Transition mode is out-in (out first, then in)
  • Animation name obtained from theme configuration

Page Cache Management

  • Integrates keep-alive to implement page caching

湘ICP备2024070110号