@styzy/vue-amap 1.0.0
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/README.md +67 -0
- package/lib/demo.html +8 -0
- package/lib/vue-amap.common.js +1525 -0
- package/lib/vue-amap.common.js.map +1 -0
- package/lib/vue-amap.umd.js +1535 -0
- package/lib/vue-amap.umd.js.map +1 -0
- package/lib/vue-amap.umd.min.js +2 -0
- package/lib/vue-amap.umd.min.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,1525 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
+
/******/ // The module cache
|
|
4
|
+
/******/ var installedModules = {};
|
|
5
|
+
/******/
|
|
6
|
+
/******/ // The require function
|
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
|
8
|
+
/******/
|
|
9
|
+
/******/ // Check if module is in cache
|
|
10
|
+
/******/ if(installedModules[moduleId]) {
|
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
|
12
|
+
/******/ }
|
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
|
15
|
+
/******/ i: moduleId,
|
|
16
|
+
/******/ l: false,
|
|
17
|
+
/******/ exports: {}
|
|
18
|
+
/******/ };
|
|
19
|
+
/******/
|
|
20
|
+
/******/ // Execute the module function
|
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
+
/******/
|
|
23
|
+
/******/ // Flag the module as loaded
|
|
24
|
+
/******/ module.l = true;
|
|
25
|
+
/******/
|
|
26
|
+
/******/ // Return the exports of the module
|
|
27
|
+
/******/ return module.exports;
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
+
/******/ __webpack_require__.m = modules;
|
|
33
|
+
/******/
|
|
34
|
+
/******/ // expose the module cache
|
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
|
36
|
+
/******/
|
|
37
|
+
/******/ // define getter function for harmony exports
|
|
38
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // define __esModule on exports
|
|
45
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
/******/ }
|
|
49
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // create a fake namespace object
|
|
53
|
+
/******/ // mode & 1: value is a module id, require it
|
|
54
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
+
/******/ // mode & 4: return value when already ns object
|
|
56
|
+
/******/ // mode & 8|1: behave like require
|
|
57
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
+
/******/ if(mode & 8) return value;
|
|
60
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
+
/******/ var ns = Object.create(null);
|
|
62
|
+
/******/ __webpack_require__.r(ns);
|
|
63
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
+
/******/ return ns;
|
|
66
|
+
/******/ };
|
|
67
|
+
/******/
|
|
68
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
+
/******/ __webpack_require__.n = function(module) {
|
|
70
|
+
/******/ var getter = module && module.__esModule ?
|
|
71
|
+
/******/ function getDefault() { return module['default']; } :
|
|
72
|
+
/******/ function getModuleExports() { return module; };
|
|
73
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
+
/******/ return getter;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
+
/******/
|
|
80
|
+
/******/ // __webpack_public_path__
|
|
81
|
+
/******/ __webpack_require__.p = "";
|
|
82
|
+
/******/
|
|
83
|
+
/******/
|
|
84
|
+
/******/ // Load entry module and return exports
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ "18f4":
|
|
91
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
92
|
+
|
|
93
|
+
// Imports
|
|
94
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
95
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
96
|
+
// Module
|
|
97
|
+
exports.push([module.i, ".amap-sug-result{display:none}", ""]);
|
|
98
|
+
// Exports
|
|
99
|
+
module.exports = exports;
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/***/ }),
|
|
103
|
+
|
|
104
|
+
/***/ "24fb":
|
|
105
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
106
|
+
|
|
107
|
+
"use strict";
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
/*
|
|
111
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
112
|
+
Author Tobias Koppers @sokra
|
|
113
|
+
*/
|
|
114
|
+
// css base code, injected by the css-loader
|
|
115
|
+
// eslint-disable-next-line func-names
|
|
116
|
+
module.exports = function (useSourceMap) {
|
|
117
|
+
var list = []; // return the list of modules as css string
|
|
118
|
+
|
|
119
|
+
list.toString = function toString() {
|
|
120
|
+
return this.map(function (item) {
|
|
121
|
+
var content = cssWithMappingToString(item, useSourceMap);
|
|
122
|
+
|
|
123
|
+
if (item[2]) {
|
|
124
|
+
return "@media ".concat(item[2], " {").concat(content, "}");
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return content;
|
|
128
|
+
}).join('');
|
|
129
|
+
}; // import a list of modules into the list
|
|
130
|
+
// eslint-disable-next-line func-names
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
list.i = function (modules, mediaQuery, dedupe) {
|
|
134
|
+
if (typeof modules === 'string') {
|
|
135
|
+
// eslint-disable-next-line no-param-reassign
|
|
136
|
+
modules = [[null, modules, '']];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
var alreadyImportedModules = {};
|
|
140
|
+
|
|
141
|
+
if (dedupe) {
|
|
142
|
+
for (var i = 0; i < this.length; i++) {
|
|
143
|
+
// eslint-disable-next-line prefer-destructuring
|
|
144
|
+
var id = this[i][0];
|
|
145
|
+
|
|
146
|
+
if (id != null) {
|
|
147
|
+
alreadyImportedModules[id] = true;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
for (var _i = 0; _i < modules.length; _i++) {
|
|
153
|
+
var item = [].concat(modules[_i]);
|
|
154
|
+
|
|
155
|
+
if (dedupe && alreadyImportedModules[item[0]]) {
|
|
156
|
+
// eslint-disable-next-line no-continue
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (mediaQuery) {
|
|
161
|
+
if (!item[2]) {
|
|
162
|
+
item[2] = mediaQuery;
|
|
163
|
+
} else {
|
|
164
|
+
item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
list.push(item);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
return list;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
function cssWithMappingToString(item, useSourceMap) {
|
|
176
|
+
var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
|
|
177
|
+
|
|
178
|
+
var cssMapping = item[3];
|
|
179
|
+
|
|
180
|
+
if (!cssMapping) {
|
|
181
|
+
return content;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (useSourceMap && typeof btoa === 'function') {
|
|
185
|
+
var sourceMapping = toComment(cssMapping);
|
|
186
|
+
var sourceURLs = cssMapping.sources.map(function (source) {
|
|
187
|
+
return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
|
|
188
|
+
});
|
|
189
|
+
return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return [content].join('\n');
|
|
193
|
+
} // Adapted from convert-source-map (MIT)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
function toComment(sourceMap) {
|
|
197
|
+
// eslint-disable-next-line no-undef
|
|
198
|
+
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
|
|
199
|
+
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
|
|
200
|
+
return "/*# ".concat(data, " */");
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/***/ }),
|
|
204
|
+
|
|
205
|
+
/***/ "2cc0":
|
|
206
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
207
|
+
|
|
208
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
209
|
+
|
|
210
|
+
// load the styles
|
|
211
|
+
var content = __webpack_require__("18f4");
|
|
212
|
+
if(content.__esModule) content = content.default;
|
|
213
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
214
|
+
if(content.locals) module.exports = content.locals;
|
|
215
|
+
// add the styles to the DOM
|
|
216
|
+
var add = __webpack_require__("499e").default
|
|
217
|
+
var update = add("37432b0a", content, true, {"sourceMap":false,"shadowMode":false});
|
|
218
|
+
|
|
219
|
+
/***/ }),
|
|
220
|
+
|
|
221
|
+
/***/ "3a4c":
|
|
222
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
223
|
+
|
|
224
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
225
|
+
|
|
226
|
+
// load the styles
|
|
227
|
+
var content = __webpack_require__("50bd");
|
|
228
|
+
if(content.__esModule) content = content.default;
|
|
229
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
230
|
+
if(content.locals) module.exports = content.locals;
|
|
231
|
+
// add the styles to the DOM
|
|
232
|
+
var add = __webpack_require__("499e").default
|
|
233
|
+
var update = add("329bbec2", content, true, {"sourceMap":false,"shadowMode":false});
|
|
234
|
+
|
|
235
|
+
/***/ }),
|
|
236
|
+
|
|
237
|
+
/***/ "499e":
|
|
238
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
239
|
+
|
|
240
|
+
"use strict";
|
|
241
|
+
// ESM COMPAT FLAG
|
|
242
|
+
__webpack_require__.r(__webpack_exports__);
|
|
243
|
+
|
|
244
|
+
// EXPORTS
|
|
245
|
+
__webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ addStylesClient; });
|
|
246
|
+
|
|
247
|
+
// CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/listToStyles.js
|
|
248
|
+
/**
|
|
249
|
+
* Translates the list format produced by css-loader into something
|
|
250
|
+
* easier to manipulate.
|
|
251
|
+
*/
|
|
252
|
+
function listToStyles (parentId, list) {
|
|
253
|
+
var styles = []
|
|
254
|
+
var newStyles = {}
|
|
255
|
+
for (var i = 0; i < list.length; i++) {
|
|
256
|
+
var item = list[i]
|
|
257
|
+
var id = item[0]
|
|
258
|
+
var css = item[1]
|
|
259
|
+
var media = item[2]
|
|
260
|
+
var sourceMap = item[3]
|
|
261
|
+
var part = {
|
|
262
|
+
id: parentId + ':' + i,
|
|
263
|
+
css: css,
|
|
264
|
+
media: media,
|
|
265
|
+
sourceMap: sourceMap
|
|
266
|
+
}
|
|
267
|
+
if (!newStyles[id]) {
|
|
268
|
+
styles.push(newStyles[id] = { id: id, parts: [part] })
|
|
269
|
+
} else {
|
|
270
|
+
newStyles[id].parts.push(part)
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return styles
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/addStylesClient.js
|
|
277
|
+
/*
|
|
278
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
279
|
+
Author Tobias Koppers @sokra
|
|
280
|
+
Modified by Evan You @yyx990803
|
|
281
|
+
*/
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
var hasDocument = typeof document !== 'undefined'
|
|
286
|
+
|
|
287
|
+
if (typeof DEBUG !== 'undefined' && DEBUG) {
|
|
288
|
+
if (!hasDocument) {
|
|
289
|
+
throw new Error(
|
|
290
|
+
'vue-style-loader cannot be used in a non-browser environment. ' +
|
|
291
|
+
"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
|
|
292
|
+
) }
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/*
|
|
296
|
+
type StyleObject = {
|
|
297
|
+
id: number;
|
|
298
|
+
parts: Array<StyleObjectPart>
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
type StyleObjectPart = {
|
|
302
|
+
css: string;
|
|
303
|
+
media: string;
|
|
304
|
+
sourceMap: ?string
|
|
305
|
+
}
|
|
306
|
+
*/
|
|
307
|
+
|
|
308
|
+
var stylesInDom = {/*
|
|
309
|
+
[id: number]: {
|
|
310
|
+
id: number,
|
|
311
|
+
refs: number,
|
|
312
|
+
parts: Array<(obj?: StyleObjectPart) => void>
|
|
313
|
+
}
|
|
314
|
+
*/}
|
|
315
|
+
|
|
316
|
+
var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
|
|
317
|
+
var singletonElement = null
|
|
318
|
+
var singletonCounter = 0
|
|
319
|
+
var isProduction = false
|
|
320
|
+
var noop = function () {}
|
|
321
|
+
var options = null
|
|
322
|
+
var ssrIdKey = 'data-vue-ssr-id'
|
|
323
|
+
|
|
324
|
+
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
|
|
325
|
+
// tags it will allow on a page
|
|
326
|
+
var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
|
|
327
|
+
|
|
328
|
+
function addStylesClient (parentId, list, _isProduction, _options) {
|
|
329
|
+
isProduction = _isProduction
|
|
330
|
+
|
|
331
|
+
options = _options || {}
|
|
332
|
+
|
|
333
|
+
var styles = listToStyles(parentId, list)
|
|
334
|
+
addStylesToDom(styles)
|
|
335
|
+
|
|
336
|
+
return function update (newList) {
|
|
337
|
+
var mayRemove = []
|
|
338
|
+
for (var i = 0; i < styles.length; i++) {
|
|
339
|
+
var item = styles[i]
|
|
340
|
+
var domStyle = stylesInDom[item.id]
|
|
341
|
+
domStyle.refs--
|
|
342
|
+
mayRemove.push(domStyle)
|
|
343
|
+
}
|
|
344
|
+
if (newList) {
|
|
345
|
+
styles = listToStyles(parentId, newList)
|
|
346
|
+
addStylesToDom(styles)
|
|
347
|
+
} else {
|
|
348
|
+
styles = []
|
|
349
|
+
}
|
|
350
|
+
for (var i = 0; i < mayRemove.length; i++) {
|
|
351
|
+
var domStyle = mayRemove[i]
|
|
352
|
+
if (domStyle.refs === 0) {
|
|
353
|
+
for (var j = 0; j < domStyle.parts.length; j++) {
|
|
354
|
+
domStyle.parts[j]()
|
|
355
|
+
}
|
|
356
|
+
delete stylesInDom[domStyle.id]
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
function addStylesToDom (styles /* Array<StyleObject> */) {
|
|
363
|
+
for (var i = 0; i < styles.length; i++) {
|
|
364
|
+
var item = styles[i]
|
|
365
|
+
var domStyle = stylesInDom[item.id]
|
|
366
|
+
if (domStyle) {
|
|
367
|
+
domStyle.refs++
|
|
368
|
+
for (var j = 0; j < domStyle.parts.length; j++) {
|
|
369
|
+
domStyle.parts[j](item.parts[j])
|
|
370
|
+
}
|
|
371
|
+
for (; j < item.parts.length; j++) {
|
|
372
|
+
domStyle.parts.push(addStyle(item.parts[j]))
|
|
373
|
+
}
|
|
374
|
+
if (domStyle.parts.length > item.parts.length) {
|
|
375
|
+
domStyle.parts.length = item.parts.length
|
|
376
|
+
}
|
|
377
|
+
} else {
|
|
378
|
+
var parts = []
|
|
379
|
+
for (var j = 0; j < item.parts.length; j++) {
|
|
380
|
+
parts.push(addStyle(item.parts[j]))
|
|
381
|
+
}
|
|
382
|
+
stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
function createStyleElement () {
|
|
388
|
+
var styleElement = document.createElement('style')
|
|
389
|
+
styleElement.type = 'text/css'
|
|
390
|
+
head.appendChild(styleElement)
|
|
391
|
+
return styleElement
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
function addStyle (obj /* StyleObjectPart */) {
|
|
395
|
+
var update, remove
|
|
396
|
+
var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
|
|
397
|
+
|
|
398
|
+
if (styleElement) {
|
|
399
|
+
if (isProduction) {
|
|
400
|
+
// has SSR styles and in production mode.
|
|
401
|
+
// simply do nothing.
|
|
402
|
+
return noop
|
|
403
|
+
} else {
|
|
404
|
+
// has SSR styles but in dev mode.
|
|
405
|
+
// for some reason Chrome can't handle source map in server-rendered
|
|
406
|
+
// style tags - source maps in <style> only works if the style tag is
|
|
407
|
+
// created and inserted dynamically. So we remove the server rendered
|
|
408
|
+
// styles and inject new ones.
|
|
409
|
+
styleElement.parentNode.removeChild(styleElement)
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
if (isOldIE) {
|
|
414
|
+
// use singleton mode for IE9.
|
|
415
|
+
var styleIndex = singletonCounter++
|
|
416
|
+
styleElement = singletonElement || (singletonElement = createStyleElement())
|
|
417
|
+
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
|
|
418
|
+
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
|
|
419
|
+
} else {
|
|
420
|
+
// use multi-style-tag mode in all other cases
|
|
421
|
+
styleElement = createStyleElement()
|
|
422
|
+
update = applyToTag.bind(null, styleElement)
|
|
423
|
+
remove = function () {
|
|
424
|
+
styleElement.parentNode.removeChild(styleElement)
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
update(obj)
|
|
429
|
+
|
|
430
|
+
return function updateStyle (newObj /* StyleObjectPart */) {
|
|
431
|
+
if (newObj) {
|
|
432
|
+
if (newObj.css === obj.css &&
|
|
433
|
+
newObj.media === obj.media &&
|
|
434
|
+
newObj.sourceMap === obj.sourceMap) {
|
|
435
|
+
return
|
|
436
|
+
}
|
|
437
|
+
update(obj = newObj)
|
|
438
|
+
} else {
|
|
439
|
+
remove()
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
var replaceText = (function () {
|
|
445
|
+
var textStore = []
|
|
446
|
+
|
|
447
|
+
return function (index, replacement) {
|
|
448
|
+
textStore[index] = replacement
|
|
449
|
+
return textStore.filter(Boolean).join('\n')
|
|
450
|
+
}
|
|
451
|
+
})()
|
|
452
|
+
|
|
453
|
+
function applyToSingletonTag (styleElement, index, remove, obj) {
|
|
454
|
+
var css = remove ? '' : obj.css
|
|
455
|
+
|
|
456
|
+
if (styleElement.styleSheet) {
|
|
457
|
+
styleElement.styleSheet.cssText = replaceText(index, css)
|
|
458
|
+
} else {
|
|
459
|
+
var cssNode = document.createTextNode(css)
|
|
460
|
+
var childNodes = styleElement.childNodes
|
|
461
|
+
if (childNodes[index]) styleElement.removeChild(childNodes[index])
|
|
462
|
+
if (childNodes.length) {
|
|
463
|
+
styleElement.insertBefore(cssNode, childNodes[index])
|
|
464
|
+
} else {
|
|
465
|
+
styleElement.appendChild(cssNode)
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
function applyToTag (styleElement, obj) {
|
|
471
|
+
var css = obj.css
|
|
472
|
+
var media = obj.media
|
|
473
|
+
var sourceMap = obj.sourceMap
|
|
474
|
+
|
|
475
|
+
if (media) {
|
|
476
|
+
styleElement.setAttribute('media', media)
|
|
477
|
+
}
|
|
478
|
+
if (options.ssrId) {
|
|
479
|
+
styleElement.setAttribute(ssrIdKey, obj.id)
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
if (sourceMap) {
|
|
483
|
+
// https://developer.chrome.com/devtools/docs/javascript-debugging
|
|
484
|
+
// this makes source maps inside style tags work properly in Chrome
|
|
485
|
+
css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
|
|
486
|
+
// http://stackoverflow.com/a/26603875
|
|
487
|
+
css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
if (styleElement.styleSheet) {
|
|
491
|
+
styleElement.styleSheet.cssText = css
|
|
492
|
+
} else {
|
|
493
|
+
while (styleElement.firstChild) {
|
|
494
|
+
styleElement.removeChild(styleElement.firstChild)
|
|
495
|
+
}
|
|
496
|
+
styleElement.appendChild(document.createTextNode(css))
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
/***/ }),
|
|
502
|
+
|
|
503
|
+
/***/ "50bd":
|
|
504
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
505
|
+
|
|
506
|
+
// Imports
|
|
507
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
508
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
509
|
+
// Module
|
|
510
|
+
exports.push([module.i, ".v-amap-ctn[data-v-37c06024],.v-amap-ctn .v-amap[data-v-37c06024]{height:100%}", ""]);
|
|
511
|
+
// Exports
|
|
512
|
+
module.exports = exports;
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
/***/ }),
|
|
516
|
+
|
|
517
|
+
/***/ "61d4":
|
|
518
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
519
|
+
|
|
520
|
+
"use strict";
|
|
521
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_0_id_57fd4556_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c5a6");
|
|
522
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_0_id_57fd4556_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_0_id_57fd4556_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
523
|
+
/* unused harmony reexport * */
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
/***/ }),
|
|
527
|
+
|
|
528
|
+
/***/ "b661":
|
|
529
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
530
|
+
|
|
531
|
+
// Imports
|
|
532
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
533
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
534
|
+
// Module
|
|
535
|
+
exports.push([module.i, ".v-amap-place-search-input input[data-v-57fd4556]{display:inline-block;box-sizing:border-box;padding:0 15px;width:100%;height:40px;outline:0;border:1px solid #dcdfe6;border-radius:4px;background-color:#fff;background-image:none;color:#606266;font-size:inherit;line-height:40px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);-webkit-appearance:none}", ""]);
|
|
536
|
+
// Exports
|
|
537
|
+
module.exports = exports;
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
/***/ }),
|
|
541
|
+
|
|
542
|
+
/***/ "c5a3":
|
|
543
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
544
|
+
|
|
545
|
+
"use strict";
|
|
546
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMap_vue_vue_type_style_index_0_id_37c06024_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3a4c");
|
|
547
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMap_vue_vue_type_style_index_0_id_37c06024_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMap_vue_vue_type_style_index_0_id_37c06024_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
548
|
+
/* unused harmony reexport * */
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
/***/ }),
|
|
552
|
+
|
|
553
|
+
/***/ "c5a6":
|
|
554
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
555
|
+
|
|
556
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
557
|
+
|
|
558
|
+
// load the styles
|
|
559
|
+
var content = __webpack_require__("b661");
|
|
560
|
+
if(content.__esModule) content = content.default;
|
|
561
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
562
|
+
if(content.locals) module.exports = content.locals;
|
|
563
|
+
// add the styles to the DOM
|
|
564
|
+
var add = __webpack_require__("499e").default
|
|
565
|
+
var update = add("1e99f6c0", content, true, {"sourceMap":false,"shadowMode":false});
|
|
566
|
+
|
|
567
|
+
/***/ }),
|
|
568
|
+
|
|
569
|
+
/***/ "fb15":
|
|
570
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
571
|
+
|
|
572
|
+
"use strict";
|
|
573
|
+
// ESM COMPAT FLAG
|
|
574
|
+
__webpack_require__.r(__webpack_exports__);
|
|
575
|
+
|
|
576
|
+
// EXPORTS
|
|
577
|
+
__webpack_require__.d(__webpack_exports__, "AMapLoader", function() { return /* reexport */ loader; });
|
|
578
|
+
|
|
579
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
580
|
+
// This file is imported into lib/wc client bundles.
|
|
581
|
+
|
|
582
|
+
if (typeof window !== 'undefined') {
|
|
583
|
+
var currentScript = window.document.currentScript
|
|
584
|
+
if (false) { var getCurrentScript; }
|
|
585
|
+
|
|
586
|
+
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
587
|
+
if (src) {
|
|
588
|
+
__webpack_require__.p = src[1] // eslint-disable-line
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// Indicate to webpack that this file can be concatenated
|
|
593
|
+
/* harmony default export */ var setPublicPath = (null);
|
|
594
|
+
|
|
595
|
+
// CONCATENATED MODULE: ./src/CONSTANTS/index.js
|
|
596
|
+
const CONSTANTS = {
|
|
597
|
+
SDK_URL: 'https://webapi.amap.com/maps',
|
|
598
|
+
CALLBACK_NAME: 'aMapInitCallback'
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/* harmony default export */ var src_CONSTANTS = (CONSTANTS);
|
|
602
|
+
|
|
603
|
+
// CONCATENATED MODULE: ./src/loader/index.js
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
class loader_Loader {
|
|
607
|
+
get key() {
|
|
608
|
+
return this._key
|
|
609
|
+
}
|
|
610
|
+
get version() {
|
|
611
|
+
return this._version
|
|
612
|
+
}
|
|
613
|
+
get uiVersion() {
|
|
614
|
+
return this._uiVersion
|
|
615
|
+
}
|
|
616
|
+
get plugins() {
|
|
617
|
+
return this._plugins
|
|
618
|
+
}
|
|
619
|
+
get sdkUrl() {
|
|
620
|
+
return `${src_CONSTANTS.SDK_URL}?v=${this.version}&key=${
|
|
621
|
+
this.key
|
|
622
|
+
}&callback=${this.callbackName}&plugin=${this.plugins.join(',')}`
|
|
623
|
+
}
|
|
624
|
+
get uiSdkUrl() {
|
|
625
|
+
return `https://webapi.amap.com/ui/${this.uiVersion}/main-async.js`
|
|
626
|
+
}
|
|
627
|
+
get callbackName() {
|
|
628
|
+
return this._callbackName
|
|
629
|
+
}
|
|
630
|
+
get isSdkLoaded() {
|
|
631
|
+
return this._isSdkLoaded
|
|
632
|
+
}
|
|
633
|
+
get isSdkLoading() {
|
|
634
|
+
return this._isSdkLoading
|
|
635
|
+
}
|
|
636
|
+
get callbacks() {
|
|
637
|
+
return this._callbacks
|
|
638
|
+
}
|
|
639
|
+
constructor() {
|
|
640
|
+
this._loadCallback = null
|
|
641
|
+
this._callbackName = `${src_CONSTANTS.CALLBACK_NAME}_${Date.now()}`
|
|
642
|
+
this._isSdkLoaded = false
|
|
643
|
+
this._isSdkLoading = false
|
|
644
|
+
this._callbacks = []
|
|
645
|
+
}
|
|
646
|
+
_loadScript(url, callback) {
|
|
647
|
+
let el_script = document.createElement('script')
|
|
648
|
+
el_script.charset = 'utf-8'
|
|
649
|
+
el_script.src = url
|
|
650
|
+
|
|
651
|
+
if (el_script.addEventListener) {
|
|
652
|
+
el_script.addEventListener('load', () => {
|
|
653
|
+
callback && callback()
|
|
654
|
+
})
|
|
655
|
+
} else if (el_script.attachEvent) {
|
|
656
|
+
el_script.attachEvent('onreadystatechange', () => {
|
|
657
|
+
let target = window.event.srcElement
|
|
658
|
+
if (target.readyState == 'loaded') {
|
|
659
|
+
callback && callback()
|
|
660
|
+
}
|
|
661
|
+
})
|
|
662
|
+
}
|
|
663
|
+
document.head.appendChild(el_script)
|
|
664
|
+
}
|
|
665
|
+
config({ key = '', version = '', uiVersion = '', plugins } = {}) {
|
|
666
|
+
this._key = key
|
|
667
|
+
this._version = version
|
|
668
|
+
this._uiVersion = uiVersion
|
|
669
|
+
this._plugins = plugins
|
|
670
|
+
}
|
|
671
|
+
async load() {
|
|
672
|
+
if (this.isSdkLoaded) return window.AMap
|
|
673
|
+
|
|
674
|
+
if (this.isSdkLoading)
|
|
675
|
+
return new Promise(resolve => {
|
|
676
|
+
this.callbacks.push(() => {
|
|
677
|
+
resolve(window.AMap)
|
|
678
|
+
})
|
|
679
|
+
})
|
|
680
|
+
|
|
681
|
+
return new Promise(resolve => {
|
|
682
|
+
this._isSdkLoading = true
|
|
683
|
+
|
|
684
|
+
window[this.callbackName] = () => {
|
|
685
|
+
this._isSdkLoaded = true
|
|
686
|
+
this._isSdkLoading = false
|
|
687
|
+
|
|
688
|
+
if (this.uiVersion) {
|
|
689
|
+
window.initAMapUI()
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
delete window[this.callbackName]
|
|
693
|
+
resolve(window.AMap)
|
|
694
|
+
|
|
695
|
+
this.callbacks.forEach(callback => {
|
|
696
|
+
callback && callback()
|
|
697
|
+
})
|
|
698
|
+
|
|
699
|
+
this._callbacks = []
|
|
700
|
+
}
|
|
701
|
+
if (this.uiVersion) {
|
|
702
|
+
this._loadScript(this.uiSdkUrl, () => {
|
|
703
|
+
this._loadScript(this.sdkUrl)
|
|
704
|
+
})
|
|
705
|
+
} else {
|
|
706
|
+
this._loadScript(this.sdkUrl)
|
|
707
|
+
}
|
|
708
|
+
})
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/* harmony default export */ var loader = (new loader_Loader());
|
|
713
|
+
|
|
714
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"62109407-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/pug-plain-loader!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMap.vue?vue&type=template&id=37c06024&scoped=true&lang=pug&
|
|
715
|
+
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"v-amap-ctn"},[_c('div',{ref:"aMap",staticClass:"v-amap"}),(_vm.AMap && _vm.aMap)?[_vm._t("default",null,{"AMap":_vm.AMap,"aMap":_vm.aMap})]:_vm._e()],2)
|
|
716
|
+
}
|
|
717
|
+
var staticRenderFns = []
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
// CONCATENATED MODULE: ./src/Components/VAMap.vue?vue&type=template&id=37c06024&scoped=true&lang=pug&
|
|
721
|
+
|
|
722
|
+
// CONCATENATED MODULE: ./src/utils/listenerProxy.js
|
|
723
|
+
const listenerProxy = (aMapObject, vm) => {
|
|
724
|
+
const listeners = vm.$listeners
|
|
725
|
+
|
|
726
|
+
for (const event in listeners) {
|
|
727
|
+
if (Object.hasOwnProperty.call(listeners, event)) {
|
|
728
|
+
const handler = listeners[event]
|
|
729
|
+
|
|
730
|
+
aMapObject.on(event, (...args) => {
|
|
731
|
+
handler(...args)
|
|
732
|
+
})
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/* harmony default export */ var utils_listenerProxy = (listenerProxy);
|
|
738
|
+
|
|
739
|
+
// CONCATENATED MODULE: ./src/utils/typeOf.js
|
|
740
|
+
const typeOf = function (param) {
|
|
741
|
+
return Object.prototype.toString.call(param).match(/\s+(\w+)/)[1]
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/* harmony default export */ var utils_typeOf = (typeOf);
|
|
745
|
+
|
|
746
|
+
// CONCATENATED MODULE: ./src/utils/watchProps.js
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
const watchProps = (aMapObject, vm, props) => {
|
|
750
|
+
props
|
|
751
|
+
.map(prop => {
|
|
752
|
+
if (utils_typeOf(prop) === 'String')
|
|
753
|
+
return { prop, watchProp: `$attrs.${prop}` }
|
|
754
|
+
if (utils_typeOf(prop) === 'Array')
|
|
755
|
+
return {
|
|
756
|
+
prop: prop[0],
|
|
757
|
+
watchProp: `$attrs.${prop[0]}`,
|
|
758
|
+
handler: prop[1]
|
|
759
|
+
}
|
|
760
|
+
})
|
|
761
|
+
.forEach(({ watchProp, prop, handler }) => {
|
|
762
|
+
vm.$watch(watchProp, (newValue, oldValue) => {
|
|
763
|
+
try {
|
|
764
|
+
if (handler) {
|
|
765
|
+
handler.call(vm, aMapObject, newValue, oldValue)
|
|
766
|
+
} else {
|
|
767
|
+
aMapObject[
|
|
768
|
+
`set${prop.replace(prop[0], prop[0].toUpperCase())}`
|
|
769
|
+
](newValue)
|
|
770
|
+
}
|
|
771
|
+
} catch (error) {
|
|
772
|
+
// eslint-disable-next-line
|
|
773
|
+
console.error('Props watch error:', error)
|
|
774
|
+
}
|
|
775
|
+
})
|
|
776
|
+
})
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
/* harmony default export */ var utils_watchProps = (watchProps);
|
|
780
|
+
|
|
781
|
+
// CONCATENATED MODULE: ./src/utils/index.js
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMap.vue?vue&type=script&lang=js&
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
const watchedProps = [
|
|
793
|
+
'zoom',
|
|
794
|
+
[
|
|
795
|
+
'center',
|
|
796
|
+
function (aMap, newValue, oldValue) {
|
|
797
|
+
if (newValue === oldValue) return
|
|
798
|
+
aMap.setCenter(newValue)
|
|
799
|
+
}
|
|
800
|
+
],
|
|
801
|
+
'labelzIndex',
|
|
802
|
+
'lang',
|
|
803
|
+
'defaultCursor',
|
|
804
|
+
'features',
|
|
805
|
+
'mapStyle',
|
|
806
|
+
'pitch'
|
|
807
|
+
]
|
|
808
|
+
|
|
809
|
+
/* harmony default export */ var VAMapvue_type_script_lang_js_ = ({
|
|
810
|
+
name: 'VAMap',
|
|
811
|
+
data() {
|
|
812
|
+
return {
|
|
813
|
+
AMap: null,
|
|
814
|
+
aMap: null
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
created() {
|
|
818
|
+
this._createMap()
|
|
819
|
+
},
|
|
820
|
+
destroyed() {
|
|
821
|
+
this._destroyMap()
|
|
822
|
+
},
|
|
823
|
+
methods: {
|
|
824
|
+
async _createMap() {
|
|
825
|
+
this.AMap = await loader.load()
|
|
826
|
+
|
|
827
|
+
const options = Object.assign(
|
|
828
|
+
{},
|
|
829
|
+
src_0.globalMapOptions,
|
|
830
|
+
this.$attrs
|
|
831
|
+
)
|
|
832
|
+
|
|
833
|
+
this.aMap = new this.AMap.Map(this.$refs.aMap, options)
|
|
834
|
+
|
|
835
|
+
utils_listenerProxy(this.aMap, this)
|
|
836
|
+
utils_watchProps(this.aMap, this, watchedProps)
|
|
837
|
+
|
|
838
|
+
this.$emit('init', this.aMap, this.AMap)
|
|
839
|
+
},
|
|
840
|
+
_destroyMap() {
|
|
841
|
+
this.aMap && this.aMap.destroy()
|
|
842
|
+
},
|
|
843
|
+
addMarker(marker) {
|
|
844
|
+
this.aMap && this.aMap.add(marker)
|
|
845
|
+
},
|
|
846
|
+
removeMarker(marker) {
|
|
847
|
+
this.aMap && this.aMap.remove(marker)
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
|
|
852
|
+
// CONCATENATED MODULE: ./src/Components/VAMap.vue?vue&type=script&lang=js&
|
|
853
|
+
/* harmony default export */ var Components_VAMapvue_type_script_lang_js_ = (VAMapvue_type_script_lang_js_);
|
|
854
|
+
// EXTERNAL MODULE: ./src/Components/VAMap.vue?vue&type=style&index=0&id=37c06024&prod&lang=stylus&scoped=true&
|
|
855
|
+
var VAMapvue_type_style_index_0_id_37c06024_prod_lang_stylus_scoped_true_ = __webpack_require__("c5a3");
|
|
856
|
+
|
|
857
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
858
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
859
|
+
|
|
860
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
861
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
862
|
+
// be included in the final webpack user bundle.
|
|
863
|
+
|
|
864
|
+
function normalizeComponent(
|
|
865
|
+
scriptExports,
|
|
866
|
+
render,
|
|
867
|
+
staticRenderFns,
|
|
868
|
+
functionalTemplate,
|
|
869
|
+
injectStyles,
|
|
870
|
+
scopeId,
|
|
871
|
+
moduleIdentifier /* server only */,
|
|
872
|
+
shadowMode /* vue-cli only */
|
|
873
|
+
) {
|
|
874
|
+
// Vue.extend constructor export interop
|
|
875
|
+
var options =
|
|
876
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
877
|
+
|
|
878
|
+
// render functions
|
|
879
|
+
if (render) {
|
|
880
|
+
options.render = render
|
|
881
|
+
options.staticRenderFns = staticRenderFns
|
|
882
|
+
options._compiled = true
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
// functional template
|
|
886
|
+
if (functionalTemplate) {
|
|
887
|
+
options.functional = true
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
// scopedId
|
|
891
|
+
if (scopeId) {
|
|
892
|
+
options._scopeId = 'data-v-' + scopeId
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
var hook
|
|
896
|
+
if (moduleIdentifier) {
|
|
897
|
+
// server build
|
|
898
|
+
hook = function (context) {
|
|
899
|
+
// 2.3 injection
|
|
900
|
+
context =
|
|
901
|
+
context || // cached call
|
|
902
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
903
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
904
|
+
// 2.2 with runInNewContext: true
|
|
905
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
906
|
+
context = __VUE_SSR_CONTEXT__
|
|
907
|
+
}
|
|
908
|
+
// inject component styles
|
|
909
|
+
if (injectStyles) {
|
|
910
|
+
injectStyles.call(this, context)
|
|
911
|
+
}
|
|
912
|
+
// register component module identifier for async chunk inferrence
|
|
913
|
+
if (context && context._registeredComponents) {
|
|
914
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
// used by ssr in case component is cached and beforeCreate
|
|
918
|
+
// never gets called
|
|
919
|
+
options._ssrRegister = hook
|
|
920
|
+
} else if (injectStyles) {
|
|
921
|
+
hook = shadowMode
|
|
922
|
+
? function () {
|
|
923
|
+
injectStyles.call(
|
|
924
|
+
this,
|
|
925
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
926
|
+
)
|
|
927
|
+
}
|
|
928
|
+
: injectStyles
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
if (hook) {
|
|
932
|
+
if (options.functional) {
|
|
933
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
934
|
+
// go through the normalizer
|
|
935
|
+
options._injectStyles = hook
|
|
936
|
+
// register for functional component in vue file
|
|
937
|
+
var originalRender = options.render
|
|
938
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
939
|
+
hook.call(context)
|
|
940
|
+
return originalRender(h, context)
|
|
941
|
+
}
|
|
942
|
+
} else {
|
|
943
|
+
// inject component registration as beforeCreate hook
|
|
944
|
+
var existing = options.beforeCreate
|
|
945
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
return {
|
|
950
|
+
exports: scriptExports,
|
|
951
|
+
options: options
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
// CONCATENATED MODULE: ./src/Components/VAMap.vue
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
/* normalize component */
|
|
963
|
+
|
|
964
|
+
var component = normalizeComponent(
|
|
965
|
+
Components_VAMapvue_type_script_lang_js_,
|
|
966
|
+
render,
|
|
967
|
+
staticRenderFns,
|
|
968
|
+
false,
|
|
969
|
+
null,
|
|
970
|
+
"37c06024",
|
|
971
|
+
null
|
|
972
|
+
|
|
973
|
+
)
|
|
974
|
+
|
|
975
|
+
/* harmony default export */ var VAMap = (component.exports);
|
|
976
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"62109407-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/pug-plain-loader!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapMarker.vue?vue&type=template&id=18484f00&scoped=true&lang=pug&
|
|
977
|
+
var VAMapMarkervue_type_template_id_18484f00_scoped_true_lang_pug_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"v-amap-marker"},[_vm._t("default")],2)
|
|
978
|
+
}
|
|
979
|
+
var VAMapMarkervue_type_template_id_18484f00_scoped_true_lang_pug_staticRenderFns = []
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
// CONCATENATED MODULE: ./src/Components/VAMapMarker.vue?vue&type=template&id=18484f00&scoped=true&lang=pug&
|
|
983
|
+
|
|
984
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapMarker.vue?vue&type=script&lang=js&
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
const VAMapMarkervue_type_script_lang_js_watchedProps = [
|
|
990
|
+
'position',
|
|
991
|
+
'anchor',
|
|
992
|
+
'offset',
|
|
993
|
+
'icon',
|
|
994
|
+
'draggable',
|
|
995
|
+
'cursor',
|
|
996
|
+
[
|
|
997
|
+
'visible',
|
|
998
|
+
function (marker, value) {
|
|
999
|
+
marker[value ? 'show' : 'hide']()
|
|
1000
|
+
value && this._updateMarkerContent()
|
|
1001
|
+
}
|
|
1002
|
+
],
|
|
1003
|
+
[
|
|
1004
|
+
'zIndex',
|
|
1005
|
+
function (marker, value) {
|
|
1006
|
+
marker.setzIndex(value)
|
|
1007
|
+
}
|
|
1008
|
+
],
|
|
1009
|
+
'angle',
|
|
1010
|
+
'animation',
|
|
1011
|
+
'shadow',
|
|
1012
|
+
'title',
|
|
1013
|
+
'clickable',
|
|
1014
|
+
'shape',
|
|
1015
|
+
'extData',
|
|
1016
|
+
'label'
|
|
1017
|
+
]
|
|
1018
|
+
|
|
1019
|
+
/* harmony default export */ var VAMapMarkervue_type_script_lang_js_ = ({
|
|
1020
|
+
name: 'VAMapMarker',
|
|
1021
|
+
data() {
|
|
1022
|
+
return {
|
|
1023
|
+
marker: null,
|
|
1024
|
+
isFixedMarkerSize: false
|
|
1025
|
+
}
|
|
1026
|
+
},
|
|
1027
|
+
mounted() {
|
|
1028
|
+
this._createMarker()
|
|
1029
|
+
},
|
|
1030
|
+
async updated() {
|
|
1031
|
+
if (!this.marker) return
|
|
1032
|
+
if (this.isFixedMarkerSize) return
|
|
1033
|
+
|
|
1034
|
+
this.isFixedMarkerSize = true
|
|
1035
|
+
|
|
1036
|
+
await this.$nextTick()
|
|
1037
|
+
|
|
1038
|
+
this._updateMarkerContent()
|
|
1039
|
+
},
|
|
1040
|
+
destroyed() {
|
|
1041
|
+
this._removeMarker()
|
|
1042
|
+
},
|
|
1043
|
+
methods: {
|
|
1044
|
+
async _createMarker() {
|
|
1045
|
+
const AMap = await loader.load(),
|
|
1046
|
+
options = Object.assign({}, this.$attrs, {
|
|
1047
|
+
content: this.$scopedSlots.default ? this.$el : null
|
|
1048
|
+
})
|
|
1049
|
+
|
|
1050
|
+
this.marker = new AMap.Marker(options)
|
|
1051
|
+
|
|
1052
|
+
utils_listenerProxy(this.marker, this)
|
|
1053
|
+
utils_watchProps(this.marker, this, VAMapMarkervue_type_script_lang_js_watchedProps)
|
|
1054
|
+
|
|
1055
|
+
this._addMarker()
|
|
1056
|
+
},
|
|
1057
|
+
_updateMarkerContent() {
|
|
1058
|
+
this.marker.setContent(this.$el)
|
|
1059
|
+
},
|
|
1060
|
+
_addMarker() {
|
|
1061
|
+
if (!this.$parent.addMarker) return
|
|
1062
|
+
|
|
1063
|
+
this.$parent.addMarker(this.marker)
|
|
1064
|
+
|
|
1065
|
+
this.$emit('init', this.marker)
|
|
1066
|
+
},
|
|
1067
|
+
_removeMarker() {
|
|
1068
|
+
if (!this.marker) return
|
|
1069
|
+
if (!this.$parent.removeMarker) return
|
|
1070
|
+
|
|
1071
|
+
this.$parent.removeMarker(this.marker)
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
});
|
|
1075
|
+
|
|
1076
|
+
// CONCATENATED MODULE: ./src/Components/VAMapMarker.vue?vue&type=script&lang=js&
|
|
1077
|
+
/* harmony default export */ var Components_VAMapMarkervue_type_script_lang_js_ = (VAMapMarkervue_type_script_lang_js_);
|
|
1078
|
+
// CONCATENATED MODULE: ./src/Components/VAMapMarker.vue
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
/* normalize component */
|
|
1085
|
+
|
|
1086
|
+
var VAMapMarker_component = normalizeComponent(
|
|
1087
|
+
Components_VAMapMarkervue_type_script_lang_js_,
|
|
1088
|
+
VAMapMarkervue_type_template_id_18484f00_scoped_true_lang_pug_render,
|
|
1089
|
+
VAMapMarkervue_type_template_id_18484f00_scoped_true_lang_pug_staticRenderFns,
|
|
1090
|
+
false,
|
|
1091
|
+
null,
|
|
1092
|
+
"18484f00",
|
|
1093
|
+
null
|
|
1094
|
+
|
|
1095
|
+
)
|
|
1096
|
+
|
|
1097
|
+
/* harmony default export */ var VAMapMarker = (VAMapMarker_component.exports);
|
|
1098
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapMassMarks.vue?vue&type=script&lang=js&
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
const VAMapMassMarksvue_type_script_lang_js_watchedProps = [
|
|
1104
|
+
// 新增属性
|
|
1105
|
+
[
|
|
1106
|
+
'data',
|
|
1107
|
+
function (marker, value) {
|
|
1108
|
+
marker.setData(value)
|
|
1109
|
+
}
|
|
1110
|
+
],
|
|
1111
|
+
[
|
|
1112
|
+
'styleObject',
|
|
1113
|
+
(marker, value) => {
|
|
1114
|
+
marker.setStyle(value)
|
|
1115
|
+
}
|
|
1116
|
+
],
|
|
1117
|
+
[
|
|
1118
|
+
'visible',
|
|
1119
|
+
(marker, value) => {
|
|
1120
|
+
marker[value ? 'show' : 'hide']()
|
|
1121
|
+
}
|
|
1122
|
+
]
|
|
1123
|
+
]
|
|
1124
|
+
|
|
1125
|
+
/* harmony default export */ var VAMapMassMarksvue_type_script_lang_js_ = ({
|
|
1126
|
+
name: 'VAMapMassMarks',
|
|
1127
|
+
data() {
|
|
1128
|
+
return {
|
|
1129
|
+
marker: null
|
|
1130
|
+
}
|
|
1131
|
+
},
|
|
1132
|
+
created() {
|
|
1133
|
+
this._createMarker()
|
|
1134
|
+
},
|
|
1135
|
+
destroyed() {
|
|
1136
|
+
this._removeMarker()
|
|
1137
|
+
},
|
|
1138
|
+
methods: {
|
|
1139
|
+
async _createMarker() {
|
|
1140
|
+
const AMap = await loader.load(),
|
|
1141
|
+
options = Object.assign({}, this.$attrs, {
|
|
1142
|
+
style: this.$attrs.styleObject || {}
|
|
1143
|
+
})
|
|
1144
|
+
|
|
1145
|
+
this.marker = new AMap.MassMarks(this.$attrs.data || [], options)
|
|
1146
|
+
|
|
1147
|
+
utils_listenerProxy(this.marker, this)
|
|
1148
|
+
utils_watchProps(this.marker, this, VAMapMassMarksvue_type_script_lang_js_watchedProps)
|
|
1149
|
+
|
|
1150
|
+
this._addMarker()
|
|
1151
|
+
},
|
|
1152
|
+
_addMarker() {
|
|
1153
|
+
if (!this.$parent.aMap) return
|
|
1154
|
+
|
|
1155
|
+
this.marker.setMap(this.$parent.aMap)
|
|
1156
|
+
|
|
1157
|
+
this.$emit('init', this.marker)
|
|
1158
|
+
},
|
|
1159
|
+
_removeMarker() {
|
|
1160
|
+
if (!this.marker) return
|
|
1161
|
+
|
|
1162
|
+
this.marker.clear()
|
|
1163
|
+
this.marker.setMap()
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
render() {
|
|
1167
|
+
return null
|
|
1168
|
+
}
|
|
1169
|
+
});
|
|
1170
|
+
|
|
1171
|
+
// CONCATENATED MODULE: ./src/Components/VAMapMassMarks.vue?vue&type=script&lang=js&
|
|
1172
|
+
/* harmony default export */ var Components_VAMapMassMarksvue_type_script_lang_js_ = (VAMapMassMarksvue_type_script_lang_js_);
|
|
1173
|
+
// CONCATENATED MODULE: ./src/Components/VAMapMassMarks.vue
|
|
1174
|
+
var VAMapMassMarks_render, VAMapMassMarks_staticRenderFns
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
/* normalize component */
|
|
1180
|
+
|
|
1181
|
+
var VAMapMassMarks_component = normalizeComponent(
|
|
1182
|
+
Components_VAMapMassMarksvue_type_script_lang_js_,
|
|
1183
|
+
VAMapMassMarks_render,
|
|
1184
|
+
VAMapMassMarks_staticRenderFns,
|
|
1185
|
+
false,
|
|
1186
|
+
null,
|
|
1187
|
+
null,
|
|
1188
|
+
null
|
|
1189
|
+
|
|
1190
|
+
)
|
|
1191
|
+
|
|
1192
|
+
/* harmony default export */ var VAMapMassMarks = (VAMapMassMarks_component.exports);
|
|
1193
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapPolygon.vue?vue&type=script&lang=js&
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
const VAMapPolygonvue_type_script_lang_js_watchedProps = [
|
|
1199
|
+
'path',
|
|
1200
|
+
// 新增属性
|
|
1201
|
+
[
|
|
1202
|
+
'visible',
|
|
1203
|
+
function (marker, value) {
|
|
1204
|
+
marker[value ? 'show' : 'hide']()
|
|
1205
|
+
}
|
|
1206
|
+
],
|
|
1207
|
+
[
|
|
1208
|
+
'zIndex',
|
|
1209
|
+
function (marker, value) {
|
|
1210
|
+
marker.setOptions({ zIndex: value })
|
|
1211
|
+
}
|
|
1212
|
+
],
|
|
1213
|
+
[
|
|
1214
|
+
'bubble',
|
|
1215
|
+
function (marker, value) {
|
|
1216
|
+
marker.setOptions({ bubble: value })
|
|
1217
|
+
}
|
|
1218
|
+
],
|
|
1219
|
+
[
|
|
1220
|
+
'cursor',
|
|
1221
|
+
function (marker, value) {
|
|
1222
|
+
marker.setOptions({ cursor: value })
|
|
1223
|
+
}
|
|
1224
|
+
],
|
|
1225
|
+
[
|
|
1226
|
+
'strokeColor',
|
|
1227
|
+
function (marker, value) {
|
|
1228
|
+
marker.setOptions({ strokeColor: value })
|
|
1229
|
+
}
|
|
1230
|
+
],
|
|
1231
|
+
[
|
|
1232
|
+
'strokeOpacity',
|
|
1233
|
+
function (marker, value) {
|
|
1234
|
+
marker.setOptions({ strokeOpacity: value })
|
|
1235
|
+
}
|
|
1236
|
+
],
|
|
1237
|
+
[
|
|
1238
|
+
'strokeWeight',
|
|
1239
|
+
function (marker, value) {
|
|
1240
|
+
marker.setOptions({ strokeWeight: value })
|
|
1241
|
+
}
|
|
1242
|
+
],
|
|
1243
|
+
[
|
|
1244
|
+
'strokeStyle',
|
|
1245
|
+
function (marker, value) {
|
|
1246
|
+
marker.setOptions({ strokeStyle: value })
|
|
1247
|
+
}
|
|
1248
|
+
],
|
|
1249
|
+
[
|
|
1250
|
+
'strokeDasharray',
|
|
1251
|
+
function (marker, value) {
|
|
1252
|
+
marker.setOptions({ strokeDasharray: value })
|
|
1253
|
+
}
|
|
1254
|
+
],
|
|
1255
|
+
[
|
|
1256
|
+
'fillColor',
|
|
1257
|
+
function (marker, value) {
|
|
1258
|
+
marker.setOptions({ fillColor: value })
|
|
1259
|
+
}
|
|
1260
|
+
],
|
|
1261
|
+
[
|
|
1262
|
+
'fillOpacity',
|
|
1263
|
+
function (marker, value) {
|
|
1264
|
+
marker.setOptions({ fillOpacity: value })
|
|
1265
|
+
}
|
|
1266
|
+
],
|
|
1267
|
+
[
|
|
1268
|
+
'draggable',
|
|
1269
|
+
function (marker, value) {
|
|
1270
|
+
marker.setOptions({ draggable: value })
|
|
1271
|
+
}
|
|
1272
|
+
]
|
|
1273
|
+
]
|
|
1274
|
+
|
|
1275
|
+
/* harmony default export */ var VAMapPolygonvue_type_script_lang_js_ = ({
|
|
1276
|
+
name: 'VAMapPolygon',
|
|
1277
|
+
data() {
|
|
1278
|
+
return {
|
|
1279
|
+
marker: null
|
|
1280
|
+
}
|
|
1281
|
+
},
|
|
1282
|
+
created() {
|
|
1283
|
+
this._createMarker()
|
|
1284
|
+
},
|
|
1285
|
+
destroyed() {
|
|
1286
|
+
this._removeMarker()
|
|
1287
|
+
},
|
|
1288
|
+
methods: {
|
|
1289
|
+
async _createMarker() {
|
|
1290
|
+
const AMap = await loader.load(),
|
|
1291
|
+
options = Object.assign({}, this.$attrs, {
|
|
1292
|
+
map: undefined
|
|
1293
|
+
})
|
|
1294
|
+
|
|
1295
|
+
this.marker = new AMap.Polygon(options)
|
|
1296
|
+
|
|
1297
|
+
utils_listenerProxy(this.marker, this)
|
|
1298
|
+
utils_watchProps(this.marker, this, VAMapPolygonvue_type_script_lang_js_watchedProps)
|
|
1299
|
+
|
|
1300
|
+
this._addMarker()
|
|
1301
|
+
},
|
|
1302
|
+
_addMarker() {
|
|
1303
|
+
if (!this.$parent.addMarker) return
|
|
1304
|
+
|
|
1305
|
+
this.$parent.addMarker(this.marker)
|
|
1306
|
+
|
|
1307
|
+
this.$emit('init', this.marker)
|
|
1308
|
+
},
|
|
1309
|
+
_removeMarker() {
|
|
1310
|
+
if (!this.marker) return
|
|
1311
|
+
if (!this.$parent.removeMarker) return
|
|
1312
|
+
|
|
1313
|
+
this.$parent.removeMarker(this.marker)
|
|
1314
|
+
}
|
|
1315
|
+
},
|
|
1316
|
+
render() {
|
|
1317
|
+
return null
|
|
1318
|
+
}
|
|
1319
|
+
});
|
|
1320
|
+
|
|
1321
|
+
// CONCATENATED MODULE: ./src/Components/VAMapPolygon.vue?vue&type=script&lang=js&
|
|
1322
|
+
/* harmony default export */ var Components_VAMapPolygonvue_type_script_lang_js_ = (VAMapPolygonvue_type_script_lang_js_);
|
|
1323
|
+
// CONCATENATED MODULE: ./src/Components/VAMapPolygon.vue
|
|
1324
|
+
var VAMapPolygon_render, VAMapPolygon_staticRenderFns
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
/* normalize component */
|
|
1330
|
+
|
|
1331
|
+
var VAMapPolygon_component = normalizeComponent(
|
|
1332
|
+
Components_VAMapPolygonvue_type_script_lang_js_,
|
|
1333
|
+
VAMapPolygon_render,
|
|
1334
|
+
VAMapPolygon_staticRenderFns,
|
|
1335
|
+
false,
|
|
1336
|
+
null,
|
|
1337
|
+
null,
|
|
1338
|
+
null
|
|
1339
|
+
|
|
1340
|
+
)
|
|
1341
|
+
|
|
1342
|
+
/* harmony default export */ var VAMapPolygon = (VAMapPolygon_component.exports);
|
|
1343
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"62109407-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/pug-plain-loader!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapPlaceSearchInput.vue?vue&type=template&id=57fd4556&scoped=true&lang=pug&
|
|
1344
|
+
var VAMapPlaceSearchInputvue_type_template_id_57fd4556_scoped_true_lang_pug_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"v-amap-place-search-input"},[_c('input',{ref:"input",attrs:{"placeholder":_vm.placeholder}})])
|
|
1345
|
+
}
|
|
1346
|
+
var VAMapPlaceSearchInputvue_type_template_id_57fd4556_scoped_true_lang_pug_staticRenderFns = []
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
// CONCATENATED MODULE: ./src/Components/VAMapPlaceSearchInput.vue?vue&type=template&id=57fd4556&scoped=true&lang=pug&
|
|
1350
|
+
|
|
1351
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapPlaceSearchInput.vue?vue&type=script&lang=js&
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
/* harmony default export */ var VAMapPlaceSearchInputvue_type_script_lang_js_ = ({
|
|
1356
|
+
name: 'VAMapPlaceSearchInput',
|
|
1357
|
+
props: {
|
|
1358
|
+
placeholder: {
|
|
1359
|
+
type: String,
|
|
1360
|
+
default: ''
|
|
1361
|
+
},
|
|
1362
|
+
customEnable: {
|
|
1363
|
+
type: Boolean,
|
|
1364
|
+
default: true
|
|
1365
|
+
}
|
|
1366
|
+
},
|
|
1367
|
+
data() {
|
|
1368
|
+
return {
|
|
1369
|
+
AMap: null,
|
|
1370
|
+
autocompleteListener: null,
|
|
1371
|
+
placeSearchListener: null
|
|
1372
|
+
}
|
|
1373
|
+
},
|
|
1374
|
+
async mounted() {
|
|
1375
|
+
this.AMap = await loader.load()
|
|
1376
|
+
this.addListener()
|
|
1377
|
+
},
|
|
1378
|
+
destroyed() {
|
|
1379
|
+
this.removeListener()
|
|
1380
|
+
},
|
|
1381
|
+
methods: {
|
|
1382
|
+
async addListener() {
|
|
1383
|
+
const autocomplete = new this.AMap.Autocomplete({
|
|
1384
|
+
input: this.$refs.input
|
|
1385
|
+
}),
|
|
1386
|
+
placeSearch = new this.AMap.PlaceSearch({})
|
|
1387
|
+
|
|
1388
|
+
this.autocompleteListener = this.AMap.event.addListener(
|
|
1389
|
+
autocomplete,
|
|
1390
|
+
'select',
|
|
1391
|
+
event => {
|
|
1392
|
+
placeSearch.search(event.poi.name)
|
|
1393
|
+
}
|
|
1394
|
+
)
|
|
1395
|
+
|
|
1396
|
+
this.placeSearchListener = this.AMap.event.addListener(
|
|
1397
|
+
placeSearch,
|
|
1398
|
+
'complete',
|
|
1399
|
+
event => {
|
|
1400
|
+
var position = null
|
|
1401
|
+
if (
|
|
1402
|
+
event &&
|
|
1403
|
+
event.poiList &&
|
|
1404
|
+
event.poiList.pois &&
|
|
1405
|
+
event.poiList.pois.length
|
|
1406
|
+
) {
|
|
1407
|
+
position = [
|
|
1408
|
+
event.poiList.pois[0].location.lng,
|
|
1409
|
+
event.poiList.pois[0].location.lat
|
|
1410
|
+
]
|
|
1411
|
+
}
|
|
1412
|
+
this.$emit('change', position)
|
|
1413
|
+
|
|
1414
|
+
if (!position && !this.customEnable) {
|
|
1415
|
+
this.$refs.input.value = ''
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
)
|
|
1419
|
+
},
|
|
1420
|
+
removeListener() {
|
|
1421
|
+
this.AMap.event.removeListener(this.autocompleteListener)
|
|
1422
|
+
this.AMap.event.removeListener(this.placeSearchListener)
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
});
|
|
1426
|
+
|
|
1427
|
+
// CONCATENATED MODULE: ./src/Components/VAMapPlaceSearchInput.vue?vue&type=script&lang=js&
|
|
1428
|
+
/* harmony default export */ var Components_VAMapPlaceSearchInputvue_type_script_lang_js_ = (VAMapPlaceSearchInputvue_type_script_lang_js_);
|
|
1429
|
+
// EXTERNAL MODULE: ./src/Components/VAMapPlaceSearchInput.vue?vue&type=style&index=0&id=57fd4556&prod&lang=stylus&scoped=true&
|
|
1430
|
+
var VAMapPlaceSearchInputvue_type_style_index_0_id_57fd4556_prod_lang_stylus_scoped_true_ = __webpack_require__("61d4");
|
|
1431
|
+
|
|
1432
|
+
// EXTERNAL MODULE: ./src/Components/VAMapPlaceSearchInput.vue?vue&type=style&index=1&id=57fd4556&prod&lang=stylus&
|
|
1433
|
+
var VAMapPlaceSearchInputvue_type_style_index_1_id_57fd4556_prod_lang_stylus_ = __webpack_require__("fcc8");
|
|
1434
|
+
|
|
1435
|
+
// CONCATENATED MODULE: ./src/Components/VAMapPlaceSearchInput.vue
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
|
|
1443
|
+
/* normalize component */
|
|
1444
|
+
|
|
1445
|
+
var VAMapPlaceSearchInput_component = normalizeComponent(
|
|
1446
|
+
Components_VAMapPlaceSearchInputvue_type_script_lang_js_,
|
|
1447
|
+
VAMapPlaceSearchInputvue_type_template_id_57fd4556_scoped_true_lang_pug_render,
|
|
1448
|
+
VAMapPlaceSearchInputvue_type_template_id_57fd4556_scoped_true_lang_pug_staticRenderFns,
|
|
1449
|
+
false,
|
|
1450
|
+
null,
|
|
1451
|
+
"57fd4556",
|
|
1452
|
+
null
|
|
1453
|
+
|
|
1454
|
+
)
|
|
1455
|
+
|
|
1456
|
+
/* harmony default export */ var VAMapPlaceSearchInput = (VAMapPlaceSearchInput_component.exports);
|
|
1457
|
+
// CONCATENATED MODULE: ./src/Components/index.js
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
/* harmony default export */ var Components = ([
|
|
1465
|
+
VAMap,
|
|
1466
|
+
VAMapMarker,
|
|
1467
|
+
VAMapMassMarks,
|
|
1468
|
+
VAMapPolygon,
|
|
1469
|
+
VAMapPlaceSearchInput
|
|
1470
|
+
]);
|
|
1471
|
+
|
|
1472
|
+
// CONCATENATED MODULE: ./src/index.js
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
|
|
1476
|
+
let globalMapOptions = {}
|
|
1477
|
+
|
|
1478
|
+
class src_AMapManager {
|
|
1479
|
+
static get AMapLoader() {
|
|
1480
|
+
return loader
|
|
1481
|
+
}
|
|
1482
|
+
static get globalMapOptions() {
|
|
1483
|
+
return globalMapOptions
|
|
1484
|
+
}
|
|
1485
|
+
static install(Vue) {
|
|
1486
|
+
Components.forEach(Component => {
|
|
1487
|
+
Vue.component(Component.name, Component)
|
|
1488
|
+
})
|
|
1489
|
+
}
|
|
1490
|
+
static async initAMap({ globalMapOptions: options = {}, ...args }) {
|
|
1491
|
+
globalMapOptions = Object.assign({}, options)
|
|
1492
|
+
|
|
1493
|
+
loader.config({ ...args })
|
|
1494
|
+
|
|
1495
|
+
return await loader.load()
|
|
1496
|
+
}
|
|
1497
|
+
constructor() {}
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
/* harmony default export */ var src_0 = (src_AMapManager);
|
|
1503
|
+
|
|
1504
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
1505
|
+
|
|
1506
|
+
|
|
1507
|
+
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (src_0);
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
/***/ }),
|
|
1512
|
+
|
|
1513
|
+
/***/ "fcc8":
|
|
1514
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1515
|
+
|
|
1516
|
+
"use strict";
|
|
1517
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_1_id_57fd4556_prod_lang_stylus___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2cc0");
|
|
1518
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_1_id_57fd4556_prod_lang_stylus___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_1_id_57fd4556_prod_lang_stylus___WEBPACK_IMPORTED_MODULE_0__);
|
|
1519
|
+
/* unused harmony reexport * */
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
/***/ })
|
|
1523
|
+
|
|
1524
|
+
/******/ })["default"];
|
|
1525
|
+
//# sourceMappingURL=vue-amap.common.js.map
|