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 = () => { const onClickSetCurrentLocation = () => {
isLoading = true isLoading = true
const onSuccess = (position) => { const onSuccess = (position: GeolocationPosition) => {
const crd = position.coords const crd = position.coords
formState.latitude = crd.latitude formState.latitude = `${crd.latitude}`
formState.longitude = crd.longitude formState.longitude = `${crd.longitude}`
isLoading = false isLoading = false
} }
const onError = (err) => { const onError = (err: GeolocationPositionError) => {
console.error(`ERROR(${err.code}): ${err.message}`) console.error(`ERROR(${err.code}): ${err.message}`)
isLoading = false isLoading = false
} }

Loading…
Cancel
Save