Skip to content

useBrowserLocation

类别
导出大小
835 B
最近修改
2 days ago

反应式浏览器位置

🌐 Reactive browser location

注意:如果你使用的是 Vue Router,请使用 Vue Router 提供的 useRoute 代替。

示例

Input and hash will be changed:
trigger: load

用法

🌐 Usage

ts
import { 
useBrowserLocation
} from '@vueuse/core'
const
location
=
useBrowserLocation
()

组件用法

🌐 Component Usage

vue
<UseBrowserLocation v-slot="location">
  Browser Location: {{ location }}
</UseBrowserLocation>