From 730d3a5a36893fe132bf975b0355e332f5f6af81 Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Mon, 20 Dec 2021 11:27:29 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-1418=20fix:=20Data=20center=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=9D=90?= =?UTF-8?q?=E6=A0=87=E6=97=B6=E6=97=A0=E6=B3=95=E9=80=89=E6=8B=A9=EF=BC=8C?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/latlngPicker.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/common/latlngPicker.vue b/nezha-fronted/src/components/common/latlngPicker.vue index 224599a5e..da4572a9c 100644 --- a/nezha-fronted/src/components/common/latlngPicker.vue +++ b/nezha-fronted/src/components/common/latlngPicker.vue @@ -116,8 +116,13 @@ export default { }, setLatlng () { const lnglat = this.lnglat.split(',') - this.mapParam.longitude = lnglat[0] - this.mapParam.latitude = lnglat[1] + if (lnglat[0] && lnglat[1]) { + this.mapParam.longitude = lnglat[0] + this.mapParam.latitude = lnglat[1] + } else { + this.mapParam.longitude = '-33.9257813' + this.mapParam.latitude = '55.5761251' + } this.$emit('lnglatChange', this.lnglat, this.zoom) }, getAttribute () {