Browse Source

fix(nc-gui): geo onSuccess and onError type & fix type 'number' is not assignable to type 'string'

pull/5307/head
Wing-Kam Wong 2 years ago
parent
commit
09da14fed4
  1. 8
      packages/nc-gui/components/cell/GeoData.vue

8
packages/nc-gui/components/cell/GeoData.vue

@ -49,14 +49,14 @@ const clear = () => {
const onClickSetCurrentLocation = () => {
isLoading = true
const onSuccess = (position) => {
const onSuccess = (position: GeolocationPosition) => {
const crd = position.coords
formState.latitude = crd.latitude
formState.longitude = crd.longitude
formState.latitude = `${crd.latitude}`
formState.longitude = `${crd.longitude}`
isLoading = false
}
const onError = (err) => {
const onError = (err: GeolocationPositionError) => {
console.error(`ERROR(${err.code}): ${err.message}`)
isLoading = false
}

Loading…
Cancel
Save