vue-router-plugin
The vue-router plugin for vue3
Fork from vue-page-stack
quick start
npm install vue-router-plugin
main.js
import VueRouterPlugin from 'vue-router-plugin'
import router from './router'
createApp(App).use(VueRouterPlugin, { router }).mount('#app')
App.vue
<template>
<router-view>
<template v-slot="{ Component, route }">
<stack-router-view
:component="Component"
:route="route"
/>
</template>
</router-view>
</template>
Api
api | desc |
---|---|
useAction | Get router action |
useStack | Get current stacks |
Example
See Playground Project.
Contributing
See Contributing Guide.