vue-plugin-use-router
v1.1.4
Published
function api with vue router
Downloads
2
Readme
vue-plugin-use-router
use vue-router like vue 3.0 api
require
vue-router
install
import { plugin } from 'vue-plugin-use-router'
Vue.use('vue-router').use(plugin)
usage
import { useRouter } from 'vue-plugin-use-router'
const { router, route } = useRouter()
router.push('/a/b')
console.log(route.params.id)
console.log(route.query.channel)