多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## useGeolocation 设置定位 ``` import { useGeolocation } from '@vueuse/core' const { coords, locatedAt, error, resume, pause } = useGeolocation() ``` | State | Type | Description | | --- | --- | --- | | coords | [`Coordinates`](https://developer.mozilla.org/en-US/docs/Web/API/Coordinates) | information about the position retrieved like the latitude and longitude | | locatedAt | `Date` | The time of the last geolocation call | | error | `string` | An error message in case geolocation API fails. | | resume | `function` | Control function to resume updating geolocation | | pause | `function` | Control function to pause updating geolocation |