Skip to content

useRouteHash

反应式 route.hash 的简写。

¥Shorthand for a reactive route.hash. Available in the @vueuse/router add-on.

用法

¥Usage

ts
import { 
useRouteHash
} from '@vueuse/router'
const
search
=
useRouteHash
()
console
.
log
(
search
.
value
) // route.hash
search
.
value
= 'foobar' // router.replace({ hash: 'foobar' })