vue2-client 1.6.30 → 1.6.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
import { post } from '@vue2-client/services/api'
|
|
39
39
|
import { GetGDMap } from '@vue2-client/utils/map-utils'
|
|
40
40
|
import { debounce } from 'ant-design-vue/lib/vc-table/src/utils'
|
|
41
|
+
import { mapState } from 'vuex'
|
|
41
42
|
|
|
42
43
|
export default {
|
|
43
44
|
name: 'AddressSearchCombobox',
|
|
@@ -84,7 +85,10 @@ export default {
|
|
|
84
85
|
},
|
|
85
86
|
mounted () {
|
|
86
87
|
GetGDMap(this.gaode_secret_key, this.gaode_key).then(aMap => {
|
|
87
|
-
this.mapAutocomplete = new (aMap).
|
|
88
|
+
this.mapAutocomplete = new (aMap).AutoComplete({
|
|
89
|
+
// city 限定城市,默认全国
|
|
90
|
+
city: '全国'
|
|
91
|
+
})
|
|
88
92
|
})
|
|
89
93
|
},
|
|
90
94
|
methods: {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
<script>
|
|
13
13
|
import { GetGDMap } from '@vue2-client/utils/map-utils'
|
|
14
|
+
import { mapState } from 'vuex'
|
|
14
15
|
export default {
|
|
15
16
|
name: 'AmapPointRendering',
|
|
16
17
|
props: {
|
|
@@ -28,7 +29,9 @@
|
|
|
28
29
|
// 渲染点位的图片
|
|
29
30
|
imgurl: {
|
|
30
31
|
type: String,
|
|
31
|
-
default:
|
|
32
|
+
default: () => {
|
|
33
|
+
return require('../../../../assets/img/success1.png')
|
|
34
|
+
}
|
|
32
35
|
},
|
|
33
36
|
mapStyle: {
|
|
34
37
|
type: Object,
|
|
@@ -101,9 +104,11 @@
|
|
|
101
104
|
}),
|
|
102
105
|
extData: this.markers
|
|
103
106
|
})
|
|
104
|
-
marker.on('click',
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
marker.on('click', (e) => {
|
|
108
|
+
if(e.target.getExtData() && e.target.getExtData().lng){
|
|
109
|
+
this.infoWindow.setContent(document.getElementById('amap_point_rendering_template'))
|
|
110
|
+
this.infoWindow.open(this.map, [e.target.getExtData().lng, e.target.getExtData().lat])
|
|
111
|
+
}
|
|
107
112
|
})
|
|
108
113
|
// 将创建的点标记添加到已有的地图实例:
|
|
109
114
|
this.map.add(marker)
|