master
271556543@qq.com 3 years ago
parent e5d8e3bb85
commit 1e50add584

@ -14,7 +14,7 @@
"test:ci": "npm run lint && npm run test:unit"
},
"dependencies": {
"avue-plugin-map": "^1.0.1",
"@smallwei/avue": "^2.9.13",
"axios": "0.18.1",
"core-js": "3.6.5",
"echarts": "^4.2.1",

@ -44,8 +44,9 @@ Vue.use(VueParticles)
Vue.config.productionTip = false
import AvueMap from 'avue-plugin-map'
Vue.use(AvueMap)
import avue from '@smallwei/avue'
import '@smallwei/avue/lib/index.css';
Vue.use(avue)
import LxHeader from "@/components/LxHeader/index"
Vue.component('lx-header',LxHeader)

@ -38,7 +38,7 @@
地址选择
</div>
<div class="xy-table-item-content">
<avue-map placeholder="请选择地址" :option="option" v-model="map" @mapClick="mapClick"></avue-map>
<avue-input-map style="width: 300px;" :params="option" placeholder="请选择地图" v-model="map" ></avue-input-map>
</div>
</div>
@ -171,9 +171,11 @@ export default {
},
watch:{
map(newVal){
this.form.lat = newVal?.location?.lat
this.form.lng = newVal?.location?.lng
this.form.address = newVal?.formattedAddress
console.log(newVal)
if(!newVal) return
this.form.lat = newVal[1]
this.form.lng = newVal[0]
this.form.address = newVal[2]
}
},
mounted() {

Loading…
Cancel
Save