xt-element-ui 1.3.0 → 1.3.1
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/docs/components/base/xt-map.md +331 -0
- package/docs/components/base/xt-step-price.md +103 -217
- package/lib/index.common.js +2109 -38
- package/lib/index.css +1 -1
- package/lib/index.umd.js +2109 -38
- package/lib/index.umd.min.js +5 -5
- package/package.json +4 -3
- package/src/components/ex-button/index.js +8 -2
- package/src/components/ex-chart/index.js +6 -0
- package/src/components/ex-date-picker/index.js +8 -2
- package/src/components/ex-icon/index.js +6 -0
- package/src/components/ex-page/index.js +8 -2
- package/src/components/ex-select-tree/index.js +8 -2
- package/src/components/ex-table/index.js +6 -0
- package/src/components/ex-upload/index.js +6 -0
- package/src/components/xt-button/index.js +8 -2
- package/src/components/xt-card/index.js +8 -2
- package/src/components/xt-card-item/index.js +8 -2
- package/src/components/xt-config-provider/index.js +6 -0
- package/src/components/xt-flex-box/index.js +8 -2
- package/src/components/xt-flex-box/style/index.scss +0 -9
- package/src/components/xt-grid-box/index.js +8 -2
- package/src/components/xt-grid-item/index.js +7 -1
- package/src/components/xt-input/index.js +8 -2
- package/src/components/xt-map/adapters/amap.js +235 -0
- package/src/components/xt-map/adapters/baidu.js +254 -0
- package/src/components/xt-map/adapters/base.js +267 -0
- package/src/components/xt-map/adapters/index.js +29 -0
- package/src/components/xt-map/adapters/tianditu.js +242 -0
- package/src/components/xt-map/config/xt-map-config.js +197 -0
- package/src/components/xt-map/index.js +22 -0
- package/src/components/xt-map/index.vue +351 -0
- package/src/components/xt-map/loaders/script-loader.js +114 -0
- package/src/components/xt-map/provider.vue +200 -0
- package/src/components/xt-map/style/index.scss +77 -0
- package/src/components/xt-step-price/index.js +9 -0
- package/src/components/xt-step-price-item/index.js +6 -0
- package/src/components/xt-step-price-item/index.vue +3 -1
- package/src/components/xt-text/index.js +8 -2
- package/src/components/xt-time/index.js +6 -0
- package/src/index.js +6 -0
package/lib/index.umd.js
CHANGED
|
@@ -124,6 +124,13 @@ function isThisHour (dirtyDate) {
|
|
|
124
124
|
module.exports = isThisHour
|
|
125
125
|
|
|
126
126
|
|
|
127
|
+
/***/ }),
|
|
128
|
+
|
|
129
|
+
/***/ "033d":
|
|
130
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
131
|
+
|
|
132
|
+
// extracted by mini-css-extract-plugin
|
|
133
|
+
|
|
127
134
|
/***/ }),
|
|
128
135
|
|
|
129
136
|
/***/ "0918":
|
|
@@ -121242,6 +121249,17 @@ function startOfToday () {
|
|
|
121242
121249
|
module.exports = startOfToday
|
|
121243
121250
|
|
|
121244
121251
|
|
|
121252
|
+
/***/ }),
|
|
121253
|
+
|
|
121254
|
+
/***/ "3cef":
|
|
121255
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
121256
|
+
|
|
121257
|
+
"use strict";
|
|
121258
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_provider_vue_vue_type_style_index_0_id_16f243b0_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("033d");
|
|
121259
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_provider_vue_vue_type_style_index_0_id_16f243b0_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_provider_vue_vue_type_style_index_0_id_16f243b0_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
121260
|
+
/* unused harmony reexport * */
|
|
121261
|
+
|
|
121262
|
+
|
|
121245
121263
|
/***/ }),
|
|
121246
121264
|
|
|
121247
121265
|
/***/ "3eee":
|
|
@@ -126164,6 +126182,13 @@ function isSameSecond (dirtyDateLeft, dirtyDateRight) {
|
|
|
126164
126182
|
module.exports = isSameSecond
|
|
126165
126183
|
|
|
126166
126184
|
|
|
126185
|
+
/***/ }),
|
|
126186
|
+
|
|
126187
|
+
/***/ "c759":
|
|
126188
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
126189
|
+
|
|
126190
|
+
// extracted by mini-css-extract-plugin
|
|
126191
|
+
|
|
126167
126192
|
/***/ }),
|
|
126168
126193
|
|
|
126169
126194
|
/***/ "c7ce":
|
|
@@ -128931,7 +128956,7 @@ const onConfigChange = function(listener) {
|
|
|
128931
128956
|
onConfigChange
|
|
128932
128957
|
});
|
|
128933
128958
|
|
|
128934
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
128959
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-button/index.vue?vue&type=template&id=daf19d9c
|
|
128935
128960
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('button',{staticClass:"xt-button",class:[
|
|
128936
128961
|
_vm.type ? 'xt-button--' + _vm.type : '',
|
|
128937
128962
|
_vm.size ? 'xt-button--' + _vm.size : '',
|
|
@@ -129143,9 +129168,16 @@ var component = normalizeComponent(
|
|
|
129143
129168
|
|
|
129144
129169
|
/* harmony default export */ var xt_button = (component.exports);
|
|
129145
129170
|
// CONCATENATED MODULE: ./src/components/xt-button/index.js
|
|
129146
|
-
|
|
129171
|
+
|
|
129172
|
+
|
|
129173
|
+
xt_button.install = function (Vue) {
|
|
129174
|
+
Vue.component(xt_button.name, xt_button)
|
|
129175
|
+
}
|
|
129176
|
+
|
|
129147
129177
|
/* harmony default export */ var components_xt_button = (xt_button);
|
|
129148
|
-
|
|
129178
|
+
|
|
129179
|
+
|
|
129180
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-input/index.vue?vue&type=template&id=69bd5491
|
|
129149
129181
|
var xt_inputvue_type_template_id_69bd5491_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-input",class:[
|
|
129150
129182
|
_vm.size ? 'xt-input--' + _vm.size : '',
|
|
129151
129183
|
{ 'is-disabled': _vm.disabled }
|
|
@@ -129222,9 +129254,16 @@ var xt_input_component = normalizeComponent(
|
|
|
129222
129254
|
|
|
129223
129255
|
/* harmony default export */ var xt_input = (xt_input_component.exports);
|
|
129224
129256
|
// CONCATENATED MODULE: ./src/components/xt-input/index.js
|
|
129225
|
-
|
|
129257
|
+
|
|
129258
|
+
|
|
129259
|
+
xt_input.install = function (Vue) {
|
|
129260
|
+
Vue.component(xt_input.name, xt_input)
|
|
129261
|
+
}
|
|
129262
|
+
|
|
129226
129263
|
/* harmony default export */ var components_xt_input = (xt_input);
|
|
129227
|
-
|
|
129264
|
+
|
|
129265
|
+
|
|
129266
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-flex-box/index.vue?vue&type=template&id=21429280
|
|
129228
129267
|
var xt_flex_boxvue_type_template_id_21429280_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-flex-box",class:_vm.classAttrs,style:(_vm.flexStyle)},[_vm._t("default")],2)
|
|
129229
129268
|
}
|
|
129230
129269
|
var xt_flex_boxvue_type_template_id_21429280_staticRenderFns = []
|
|
@@ -129284,9 +129323,16 @@ var xt_flex_box_component = normalizeComponent(
|
|
|
129284
129323
|
|
|
129285
129324
|
/* harmony default export */ var xt_flex_box = (xt_flex_box_component.exports);
|
|
129286
129325
|
// CONCATENATED MODULE: ./src/components/xt-flex-box/index.js
|
|
129287
|
-
|
|
129326
|
+
|
|
129327
|
+
|
|
129328
|
+
xt_flex_box.install = function (Vue) {
|
|
129329
|
+
Vue.component(xt_flex_box.name, xt_flex_box)
|
|
129330
|
+
}
|
|
129331
|
+
|
|
129288
129332
|
/* harmony default export */ var components_xt_flex_box = (xt_flex_box);
|
|
129289
|
-
|
|
129333
|
+
|
|
129334
|
+
|
|
129335
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-card/index.vue?vue&type=template&id=bc9ed1fa
|
|
129290
129336
|
var xt_cardvue_type_template_id_bc9ed1fa_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-card",class:{'no-padding': _vm.noPadding }},[(_vm.title)?_c('div',{staticClass:"card__header"},[_vm._t("icon",function(){return [_vm._v(_vm._s(_vm.icon))]}),_vm._t("title",function(){return [_vm._v(_vm._s(_vm.title))]})],2):_vm._e(),_c('div',{staticClass:"card__body"},[_vm._t("default",function(){return [_c('span',{staticClass:"value"},[_vm._t("value",function(){return [_vm._v(_vm._s(_vm.value))]})],2),_c('span',{staticClass:"unit"},[_vm._v(_vm._s(_vm.unit))])]})],2)])
|
|
129291
129337
|
}
|
|
129292
129338
|
var xt_cardvue_type_template_id_bc9ed1fa_staticRenderFns = []
|
|
@@ -129332,9 +129378,16 @@ var xt_card_component = normalizeComponent(
|
|
|
129332
129378
|
|
|
129333
129379
|
/* harmony default export */ var xt_card = (xt_card_component.exports);
|
|
129334
129380
|
// CONCATENATED MODULE: ./src/components/xt-card/index.js
|
|
129335
|
-
|
|
129381
|
+
|
|
129382
|
+
|
|
129383
|
+
xt_card.install = function (Vue) {
|
|
129384
|
+
Vue.component(xt_card.name, xt_card)
|
|
129385
|
+
}
|
|
129386
|
+
|
|
129336
129387
|
/* harmony default export */ var components_xt_card = (xt_card);
|
|
129337
|
-
|
|
129388
|
+
|
|
129389
|
+
|
|
129390
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-card-item/index.vue?vue&type=template&id=1e46df45
|
|
129338
129391
|
var xt_card_itemvue_type_template_id_1e46df45_render = function render(){var _vm=this,_c=_vm._self._c;return _c('ex-card',{staticClass:"xt-card-item",class:{ [`is-${_vm.type}`]: _vm.type ? true : false},attrs:{"bordered":false}},[_c('xt-text',{attrs:{"bold":"","size":"medium"}},[_vm._v(_vm._s(_vm.title))]),_c('xt-flex-box',[_c('div',{staticStyle:{"width":"50%","margin-bottom":"5px"}},[_c('xt-text',{attrs:{"bold":"","size":"large","format":"thousand","type":_vm.type,"decimals":0},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}}),_c('div',{staticStyle:{"margin":"5px 0"}},[_c('xt-text',{attrs:{"size":"small"}},[_vm._v("较昨日")]),_c('xt-text',{attrs:{"format":"normal","type":_vm.diff > 0 ? 'success' : 'danger',"suffix":_vm.diff > 0 ? '↑' : '↓'},model:{value:(_vm.change),callback:function ($$v) {_vm.change=$$v},expression:"change"}})],1)],1),_c('div',{staticStyle:{"flex":"1","height":"100%"}},[_vm._t("icon",function(){return [_c('xt-text',{attrs:{"size":"extra-large","type":_vm.type}},[_c('i',{staticClass:"el-icon-user"})])]})],2)])],1)
|
|
129339
129392
|
}
|
|
129340
129393
|
var xt_card_itemvue_type_template_id_1e46df45_staticRenderFns = []
|
|
@@ -129382,8 +129435,15 @@ var xt_card_item_component = normalizeComponent(
|
|
|
129382
129435
|
|
|
129383
129436
|
/* harmony default export */ var xt_card_item = (xt_card_item_component.exports);
|
|
129384
129437
|
// CONCATENATED MODULE: ./src/components/xt-card-item/index.js
|
|
129385
|
-
|
|
129438
|
+
|
|
129439
|
+
|
|
129440
|
+
xt_card_item.install = function (Vue) {
|
|
129441
|
+
Vue.component(xt_card_item.name, xt_card_item)
|
|
129442
|
+
}
|
|
129443
|
+
|
|
129386
129444
|
/* harmony default export */ var components_xt_card_item = (xt_card_item);
|
|
129445
|
+
|
|
129446
|
+
|
|
129387
129447
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-config-provider/index.vue?vue&type=script&lang=js
|
|
129388
129448
|
|
|
129389
129449
|
|
|
@@ -129767,9 +129827,15 @@ var xt_config_provider_component = normalizeComponent(
|
|
|
129767
129827
|
/* harmony default export */ var xt_config_provider = (xt_config_provider_component.exports);
|
|
129768
129828
|
// CONCATENATED MODULE: ./src/components/xt-config-provider/index.js
|
|
129769
129829
|
|
|
129830
|
+
|
|
129831
|
+
xt_config_provider.install = function (Vue) {
|
|
129832
|
+
Vue.component(xt_config_provider.name, xt_config_provider)
|
|
129833
|
+
}
|
|
129834
|
+
|
|
129770
129835
|
/* harmony default export */ var components_xt_config_provider = (xt_config_provider);
|
|
129836
|
+
|
|
129771
129837
|
|
|
129772
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
129838
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-text/index.vue?vue&type=template&id=7df75bea
|
|
129773
129839
|
var xt_textvue_type_template_id_7df75bea_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-text",class:[
|
|
129774
129840
|
_vm.type ? 'xt-text--' + _vm.type : '',
|
|
129775
129841
|
'xt-text--' + _vm.size,
|
|
@@ -129941,9 +130007,16 @@ var xt_text_component = normalizeComponent(
|
|
|
129941
130007
|
|
|
129942
130008
|
/* harmony default export */ var xt_text = (xt_text_component.exports);
|
|
129943
130009
|
// CONCATENATED MODULE: ./src/components/xt-text/index.js
|
|
129944
|
-
|
|
130010
|
+
|
|
130011
|
+
|
|
130012
|
+
xt_text.install = function (Vue) {
|
|
130013
|
+
Vue.component(xt_text.name, xt_text)
|
|
130014
|
+
}
|
|
130015
|
+
|
|
129945
130016
|
/* harmony default export */ var components_xt_text = (xt_text);
|
|
129946
|
-
|
|
130017
|
+
|
|
130018
|
+
|
|
130019
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-time/index.vue?vue&type=template&id=d29acf2c
|
|
129947
130020
|
var xt_timevue_type_template_id_d29acf2c_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-time",class:[
|
|
129948
130021
|
_vm.typeColor ? 'xt-time--' + _vm.typeColor : '',
|
|
129949
130022
|
'xt-time--' + _vm.size,
|
|
@@ -130256,9 +130329,15 @@ var xt_time_component = normalizeComponent(
|
|
|
130256
130329
|
/* harmony default export */ var xt_time = (xt_time_component.exports);
|
|
130257
130330
|
// CONCATENATED MODULE: ./src/components/xt-time/index.js
|
|
130258
130331
|
|
|
130332
|
+
|
|
130333
|
+
xt_time.install = function (Vue) {
|
|
130334
|
+
Vue.component(xt_time.name, xt_time)
|
|
130335
|
+
}
|
|
130336
|
+
|
|
130259
130337
|
/* harmony default export */ var components_xt_time = (xt_time);
|
|
130338
|
+
|
|
130260
130339
|
|
|
130261
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
130340
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-step-price/index.vue?vue&type=template&id=1fb68540
|
|
130262
130341
|
var xt_step_pricevue_type_template_id_1fb68540_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-step-price",class:{ 'is-disabled': _vm.disabled }},[(_vm.title || _vm.$slots.header)?_c('div',{staticClass:"xt-step-price__header"},[(_vm.title)?_c('xt-text',{attrs:{"bold":"","size":"medium"}},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._t("header"),(!_vm.disabled && !_vm.isLimitReached)?_c('xt-button',{attrs:{"type":"primary","size":"small","icon":"el-icon-plus","plain":""},on:{"click":_vm.onAdd}},[_vm._v("新增档位")]):_vm._e(),(_vm.isLimitReached)?_c('xt-text',{attrs:{"size":"small","type-color":"info"}},[_vm._v("已达上限("+_vm._s(_vm.localItems.length)+"/"+_vm._s(_vm.limit)+")")]):_vm._e()],2):_vm._e(),_c('div',{staticClass:"xt-step-price__list"},_vm._l((_vm.localItems),function(item,idx){return _c('XtStepPriceItem',{key:idx,attrs:{"value":item,"index":idx,"is-first":idx === 0,"is-last":idx === _vm.localItems.length - 1,"items-length":_vm.localItems.length,"removable":idx !== 0,"min-locked":idx !== 0 ? true : false,"unit":_vm.unit,"precision":_vm.precision,"step":_vm.step,"left-bracket":_vm.leftBracket,"right-bracket":_vm.rightBracket,"field-keys":_vm.fieldKeys,"disabled":_vm.disabled},on:{"input":(val) => _vm.onItemInput(val, idx),"max-change":_vm.onMaxChange,"min-change":_vm.onMinChange,"delete":_vm.onDelete}})}),1),(_vm.localItems.length === 0)?_c('div',{staticClass:"xt-step-price__empty"},[_c('span',[_vm._v("暂无数据,点击右上角「新增档位」开始配置")])]):_vm._e(),(_vm.tip || _vm.$slots.tip)?_c('div',{staticClass:"xt-step-price__tip"},[_vm._t("tip",function(){return [_c('xt-text',{attrs:{"size":"small","type-color":"warning"}},[_vm._v(_vm._s(_vm.tip))])]})],2):_vm._e()])
|
|
130263
130342
|
}
|
|
130264
130343
|
var xt_step_pricevue_type_template_id_1fb68540_staticRenderFns = []
|
|
@@ -130266,13 +130345,13 @@ var xt_step_pricevue_type_template_id_1fb68540_staticRenderFns = []
|
|
|
130266
130345
|
|
|
130267
130346
|
// CONCATENATED MODULE: ./src/components/xt-step-price/index.vue?vue&type=template&id=1fb68540
|
|
130268
130347
|
|
|
130269
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
130270
|
-
var
|
|
130348
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-step-price-item/index.vue?vue&type=template&id=0606a780
|
|
130349
|
+
var xt_step_price_itemvue_type_template_id_0606a780_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-step-price-item"},[_c('div',{staticClass:"xt-step-price-item__range"},[_c('span',{staticClass:"xt-step-price-item__bracket"},[_vm._v(_vm._s(_vm.finalLeftBracket))]),(_vm.itemsLength > 1)?_c('span',{staticClass:"xt-step-price-item__name"},[_vm._v("第"+_vm._s(_vm.index + 1)+"档")]):_vm._e(),_c('span',{staticClass:"xt-step-price-item__bracket"},[_vm._v(_vm._s(_vm.finalRightBracket))]),_c('xt-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled || _vm.minLocked,"size":"small","placeholder":"下限"},on:{"blur":_vm.onMinBlur},model:{value:(_vm.minInput),callback:function ($$v) {_vm.minInput=_vm._n($$v)},expression:"minInput"}}),_c('span',{staticClass:"xt-step-price-item__comma"},[_vm._v("-")]),(!_vm.isLast)?_c('xt-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled,"size":"small","placeholder":"上限"},on:{"blur":_vm.onMaxBlur},model:{value:(_vm.maxInput),callback:function ($$v) {_vm.maxInput=_vm._n($$v)},expression:"maxInput"}}):_c('span',{staticClass:"xt-step-price-item__infinity"},[_vm._v("+∞")])],1),_c('div',{staticClass:"xt-step-price-item__price"},[_c('xt-input',{staticClass:"xt-step-price-item__input xt-step-price-item__input--price",attrs:{"disabled":_vm.disabled,"size":"small","placeholder":"价格"},on:{"blur":_vm.onPriceBlur},model:{value:(_vm.priceInput),callback:function ($$v) {_vm.priceInput=_vm._n($$v)},expression:"priceInput"}}),_c('span',{staticClass:"xt-step-price-item__unit"},[_vm._v(_vm._s(_vm.unit))])],1),(!_vm.disabled && _vm.removable && _vm.itemsLength > 1)?_c('xt-button',{staticClass:"xt-step-price-item__delete",attrs:{"text":"","icon":"el-icon-delete"},on:{"click":_vm.onDelete}}):_vm._e()],1)
|
|
130271
130350
|
}
|
|
130272
|
-
var
|
|
130351
|
+
var xt_step_price_itemvue_type_template_id_0606a780_staticRenderFns = []
|
|
130273
130352
|
|
|
130274
130353
|
|
|
130275
|
-
// CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=template&id=
|
|
130354
|
+
// CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=template&id=0606a780
|
|
130276
130355
|
|
|
130277
130356
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-step-price-item/index.vue?vue&type=script&lang=js
|
|
130278
130357
|
|
|
@@ -130313,7 +130392,7 @@ var xt_step_price_itemvue_type_template_id_ad5d83ae_staticRenderFns = []
|
|
|
130313
130392
|
keyPrice() { return (this.fieldKeys && this.fieldKeys.price) || 'price' },
|
|
130314
130393
|
finalRightBracket() {
|
|
130315
130394
|
if (this.rightBracket !== null && this.rightBracket !== undefined && this.rightBracket !== '') return this.rightBracket
|
|
130316
|
-
return this.
|
|
130395
|
+
return this.isLast ? ']' : ')'
|
|
130317
130396
|
},
|
|
130318
130397
|
finalLeftBracket() {
|
|
130319
130398
|
return (this.leftBracket === null || this.leftBracket === undefined) ? '[' : this.leftBracket
|
|
@@ -130424,8 +130503,8 @@ var xt_step_price_itemvue_type_template_id_ad5d83ae_staticRenderFns = []
|
|
|
130424
130503
|
|
|
130425
130504
|
var xt_step_price_item_component = normalizeComponent(
|
|
130426
130505
|
components_xt_step_price_itemvue_type_script_lang_js,
|
|
130427
|
-
|
|
130428
|
-
|
|
130506
|
+
xt_step_price_itemvue_type_template_id_0606a780_render,
|
|
130507
|
+
xt_step_price_itemvue_type_template_id_0606a780_staticRenderFns,
|
|
130429
130508
|
false,
|
|
130430
130509
|
null,
|
|
130431
130510
|
null,
|
|
@@ -130678,13 +130757,1954 @@ var xt_step_price_component = normalizeComponent(
|
|
|
130678
130757
|
/* harmony default export */ var xt_step_price = (xt_step_price_component.exports);
|
|
130679
130758
|
// CONCATENATED MODULE: ./src/components/xt-step-price/index.js
|
|
130680
130759
|
|
|
130760
|
+
|
|
130761
|
+
|
|
130762
|
+
xt_step_price.install = function (Vue) {
|
|
130763
|
+
Vue.component(xt_step_price.name, xt_step_price)
|
|
130764
|
+
Vue.component(xt_step_price_item.name, xt_step_price_item)
|
|
130765
|
+
}
|
|
130766
|
+
|
|
130767
|
+
// 同时导出组件和 install 方法,支持多种引入方式
|
|
130681
130768
|
/* harmony default export */ var components_xt_step_price = (xt_step_price);
|
|
130682
130769
|
|
|
130683
130770
|
// CONCATENATED MODULE: ./src/components/xt-step-price-item/index.js
|
|
130684
130771
|
|
|
130772
|
+
|
|
130773
|
+
xt_step_price_item.install = function (Vue) {
|
|
130774
|
+
Vue.component(xt_step_price_item.name, xt_step_price_item)
|
|
130775
|
+
}
|
|
130776
|
+
|
|
130685
130777
|
/* harmony default export */ var components_xt_step_price_item = (xt_step_price_item);
|
|
130686
130778
|
|
|
130687
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
130779
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-map/index.vue?vue&type=template&id=0c15823e
|
|
130780
|
+
var xt_mapvue_type_template_id_0c15823e_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-map-wrapper"},[_c('div',{ref:"mapContainer",staticClass:"xt-map-container",attrs:{"data-theme":_vm.mergedTheme}}),(_vm.loading)?_c('div',{staticClass:"xt-map-loading"},[_c('span',[_vm._v("地图加载中...")])]):_vm._e(),(_vm.errorMessage)?_c('div',{staticClass:"xt-map-error"},[_c('span',[_vm._v(_vm._s(_vm.errorMessage))])]):_vm._e(),_vm._t("overlay")],2)
|
|
130781
|
+
}
|
|
130782
|
+
var xt_mapvue_type_template_id_0c15823e_staticRenderFns = []
|
|
130783
|
+
|
|
130784
|
+
|
|
130785
|
+
// CONCATENATED MODULE: ./src/components/xt-map/index.vue?vue&type=template&id=0c15823e
|
|
130786
|
+
|
|
130787
|
+
// CONCATENATED MODULE: ./src/components/xt-map/loaders/script-loader.js
|
|
130788
|
+
/**
|
|
130789
|
+
* 动态脚本加载器
|
|
130790
|
+
* 负责动态注入地图 SDK <script> 标签,并返回 Promise
|
|
130791
|
+
* 同一 URL 只会加载一次,缓存已加载的结果
|
|
130792
|
+
*/
|
|
130793
|
+
|
|
130794
|
+
const loadedScripts = new Map() // URL -> Promise
|
|
130795
|
+
const loadingScripts = new Map() // URL -> Promise (正在加载中)
|
|
130796
|
+
|
|
130797
|
+
/**
|
|
130798
|
+
* 动态加载单个脚本
|
|
130799
|
+
* @param {string} url - 脚本 URL
|
|
130800
|
+
* @param {object} options - 配置
|
|
130801
|
+
* @param {string} options.charset - 字符集,默认 'utf-8'
|
|
130802
|
+
* @param {boolean} options.async - 是否异步,默认 true
|
|
130803
|
+
* @param {number} options.timeout - 超时时间(ms),默认 30000
|
|
130804
|
+
* @returns {Promise<HTMLScriptElement>}
|
|
130805
|
+
*/
|
|
130806
|
+
const loadScript = (url, options = {}) => {
|
|
130807
|
+
if (typeof window === 'undefined') {
|
|
130808
|
+
return Promise.reject(new Error('[XtMap] 非浏览器环境'))
|
|
130809
|
+
}
|
|
130810
|
+
|
|
130811
|
+
const { charset = 'utf-8', async = true, timeout = 30000 } = options
|
|
130812
|
+
|
|
130813
|
+
if (loadedScripts.has(url)) {
|
|
130814
|
+
return loadedScripts.get(url)
|
|
130815
|
+
}
|
|
130816
|
+
|
|
130817
|
+
if (loadingScripts.has(url)) {
|
|
130818
|
+
return loadingScripts.get(url)
|
|
130819
|
+
}
|
|
130820
|
+
|
|
130821
|
+
const promise = new Promise((resolve, reject) => {
|
|
130822
|
+
const script = document.createElement('script')
|
|
130823
|
+
script.type = 'text/javascript'
|
|
130824
|
+
script.src = url
|
|
130825
|
+
script.charset = charset
|
|
130826
|
+
script.async = async
|
|
130827
|
+
|
|
130828
|
+
let timer = null
|
|
130829
|
+
let done = false
|
|
130830
|
+
|
|
130831
|
+
const cleanup = () => {
|
|
130832
|
+
done = true
|
|
130833
|
+
if (timer) clearTimeout(timer)
|
|
130834
|
+
script.onload = null
|
|
130835
|
+
script.onerror = null
|
|
130836
|
+
}
|
|
130837
|
+
|
|
130838
|
+
script.onload = () => {
|
|
130839
|
+
if (done) return
|
|
130840
|
+
cleanup()
|
|
130841
|
+
loadingScripts.delete(url)
|
|
130842
|
+
loadedScripts.set(url, Promise.resolve(script))
|
|
130843
|
+
resolve(script)
|
|
130844
|
+
}
|
|
130845
|
+
|
|
130846
|
+
script.onerror = (err) => {
|
|
130847
|
+
if (done) return
|
|
130848
|
+
cleanup()
|
|
130849
|
+
loadingScripts.delete(url)
|
|
130850
|
+
reject(new Error(`[XtMap] 脚本加载失败: ${url}`))
|
|
130851
|
+
}
|
|
130852
|
+
|
|
130853
|
+
if (timeout > 0) {
|
|
130854
|
+
timer = setTimeout(() => {
|
|
130855
|
+
if (done) return
|
|
130856
|
+
cleanup()
|
|
130857
|
+
loadingScripts.delete(url)
|
|
130858
|
+
reject(new Error(`[XtMap] 脚本加载超时: ${url}`))
|
|
130859
|
+
}, timeout)
|
|
130860
|
+
}
|
|
130861
|
+
|
|
130862
|
+
document.head.appendChild(script)
|
|
130863
|
+
})
|
|
130864
|
+
|
|
130865
|
+
loadingScripts.set(url, promise)
|
|
130866
|
+
return promise
|
|
130867
|
+
}
|
|
130868
|
+
|
|
130869
|
+
/**
|
|
130870
|
+
* 批量加载脚本(按顺序)
|
|
130871
|
+
* @param {string[]} urls
|
|
130872
|
+
* @param {object} options
|
|
130873
|
+
*/
|
|
130874
|
+
const loadScripts = async (urls, options = {}) => {
|
|
130875
|
+
for (const url of urls) {
|
|
130876
|
+
await loadScript(url, options)
|
|
130877
|
+
}
|
|
130878
|
+
}
|
|
130879
|
+
|
|
130880
|
+
/**
|
|
130881
|
+
* 清除加载缓存(切换密钥等场景使用)
|
|
130882
|
+
*/
|
|
130883
|
+
const clearScriptCache = () => {
|
|
130884
|
+
loadedScripts.clear()
|
|
130885
|
+
loadingScripts.clear()
|
|
130886
|
+
}
|
|
130887
|
+
|
|
130888
|
+
/**
|
|
130889
|
+
* 检查全局对象是否存在
|
|
130890
|
+
*/
|
|
130891
|
+
const hasGlobal = (name) => {
|
|
130892
|
+
if (typeof window === 'undefined') return false
|
|
130893
|
+
return window[name] !== undefined
|
|
130894
|
+
}
|
|
130895
|
+
|
|
130896
|
+
/* harmony default export */ var script_loader = ({
|
|
130897
|
+
loadScript,
|
|
130898
|
+
loadScripts,
|
|
130899
|
+
clearScriptCache,
|
|
130900
|
+
hasGlobal
|
|
130901
|
+
});
|
|
130902
|
+
|
|
130903
|
+
// CONCATENATED MODULE: ./src/components/xt-map/adapters/base.js
|
|
130904
|
+
/**
|
|
130905
|
+
* 地图适配器基类
|
|
130906
|
+
* 定义统一的 API 接口,各地图引擎(高德/天地图/百度)通过继承/实现该接口完成适配
|
|
130907
|
+
*
|
|
130908
|
+
* 统一坐标系统:WGS84 (lng, lat) 作为输入输出标准,各适配器内部处理转换
|
|
130909
|
+
* 统一地图类型:standard | satellite | hybrid | traffic
|
|
130910
|
+
* 统一主题:light | dark
|
|
130911
|
+
*/
|
|
130912
|
+
|
|
130913
|
+
|
|
130914
|
+
|
|
130915
|
+
// 地图类型 -> 内部常量(各适配器可覆盖转换)
|
|
130916
|
+
const DEFAULT_MAP_TYPE_MAP = {
|
|
130917
|
+
standard: 'standard',
|
|
130918
|
+
satellite: 'satellite',
|
|
130919
|
+
hybrid: 'hybrid',
|
|
130920
|
+
traffic: 'traffic'
|
|
130921
|
+
}
|
|
130922
|
+
|
|
130923
|
+
class base_MapAdapterBase {
|
|
130924
|
+
constructor(container, options = {}) {
|
|
130925
|
+
this.container = container
|
|
130926
|
+
this.options = options
|
|
130927
|
+
this.mapInstance = null
|
|
130928
|
+
this.mapType = options.mapType || 'standard'
|
|
130929
|
+
this.theme = options.theme || 'light'
|
|
130930
|
+
this.center = options.center || [116.397428, 39.90923]
|
|
130931
|
+
this.zoom = options.zoom || 11
|
|
130932
|
+
this.apiKey = options.apiKey || ''
|
|
130933
|
+
this.apiUrl = options.apiUrl || null
|
|
130934
|
+
this.plugins = options.plugins || []
|
|
130935
|
+
this.eventHandlers = new Map()
|
|
130936
|
+
this.ready = false
|
|
130937
|
+
this._mapTypeMap = { ...DEFAULT_MAP_TYPE_MAP }
|
|
130938
|
+
}
|
|
130939
|
+
|
|
130940
|
+
/**
|
|
130941
|
+
* 获取 SDK 脚本 URL(各适配器必须实现)
|
|
130942
|
+
* @returns {string}
|
|
130943
|
+
*/
|
|
130944
|
+
getScriptUrl() {
|
|
130945
|
+
throw new Error('[XtMap] 子类必须实现 getScriptUrl()')
|
|
130946
|
+
}
|
|
130947
|
+
|
|
130948
|
+
/**
|
|
130949
|
+
* 检查 SDK 是否已加载
|
|
130950
|
+
*/
|
|
130951
|
+
isSdkLoaded() {
|
|
130952
|
+
throw new Error('[XtMap] 子类必须实现 isSdkLoaded()')
|
|
130953
|
+
}
|
|
130954
|
+
|
|
130955
|
+
/**
|
|
130956
|
+
* 在脚本加载前执行(可选覆盖)
|
|
130957
|
+
* 用于设置 securityJsCode、注册全局 callback 等前置准备
|
|
130958
|
+
*/
|
|
130959
|
+
beforeLoadScript() {
|
|
130960
|
+
// 可选实现 - 各适配器可覆盖
|
|
130961
|
+
}
|
|
130962
|
+
|
|
130963
|
+
/**
|
|
130964
|
+
* 创建地图实例(各适配器必须实现)
|
|
130965
|
+
*/
|
|
130966
|
+
async createMap() {
|
|
130967
|
+
throw new Error('[XtMap] 子类必须实现 createMap()')
|
|
130968
|
+
}
|
|
130969
|
+
|
|
130970
|
+
/**
|
|
130971
|
+
* 加载 SDK 并初始化地图
|
|
130972
|
+
*/
|
|
130973
|
+
async init() {
|
|
130974
|
+
if (!this.container) {
|
|
130975
|
+
throw new Error('[XtMap] 缺少容器元素')
|
|
130976
|
+
}
|
|
130977
|
+
|
|
130978
|
+
if (!this.isSdkLoaded()) {
|
|
130979
|
+
// 1. 脚本加载前执行钩子(设置安全密钥等)
|
|
130980
|
+
this.beforeLoadScript()
|
|
130981
|
+
|
|
130982
|
+
// 2. 获取脚本 URL
|
|
130983
|
+
const url = this.getScriptUrl()
|
|
130984
|
+
if (!url) {
|
|
130985
|
+
throw new Error('[XtMap] 缺少 API URL,请配置 apiKey 或 apiUrl')
|
|
130986
|
+
}
|
|
130987
|
+
|
|
130988
|
+
// 3. 动态加载脚本
|
|
130989
|
+
await loadScript(url)
|
|
130990
|
+
|
|
130991
|
+
// 4. 等待 SDK 初始化全局对象(部分 SDK 需要等待 callback 或脚本内部初始化完成)
|
|
130992
|
+
await this._waitForSdkReady()
|
|
130993
|
+
}
|
|
130994
|
+
|
|
130995
|
+
// 5. 创建地图实例
|
|
130996
|
+
await this.createMap()
|
|
130997
|
+
this.ready = true
|
|
130998
|
+
return this.mapInstance
|
|
130999
|
+
}
|
|
131000
|
+
|
|
131001
|
+
/**
|
|
131002
|
+
* 等待 SDK 准备好(部分地图 SDK 需要等待 callback 执行)
|
|
131003
|
+
*/
|
|
131004
|
+
async _waitForSdkReady() {
|
|
131005
|
+
return new Promise((resolve) => {
|
|
131006
|
+
let attempts = 0
|
|
131007
|
+
const maxAttempts = 100
|
|
131008
|
+
const check = () => {
|
|
131009
|
+
if (this.isSdkLoaded() || attempts >= maxAttempts) {
|
|
131010
|
+
resolve()
|
|
131011
|
+
} else {
|
|
131012
|
+
attempts++
|
|
131013
|
+
setTimeout(check, 100)
|
|
131014
|
+
}
|
|
131015
|
+
}
|
|
131016
|
+
check()
|
|
131017
|
+
})
|
|
131018
|
+
}
|
|
131019
|
+
|
|
131020
|
+
/**
|
|
131021
|
+
* 统一地图类型转换:xt-map 枚举 -> 引擎内部值
|
|
131022
|
+
*/
|
|
131023
|
+
getNativeMapType(xtType) {
|
|
131024
|
+
return this._mapTypeMap[xtType] || this._mapTypeMap.standard
|
|
131025
|
+
}
|
|
131026
|
+
|
|
131027
|
+
/**
|
|
131028
|
+
* 设置地图类型
|
|
131029
|
+
*/
|
|
131030
|
+
setMapType(type) {
|
|
131031
|
+
this.mapType = type
|
|
131032
|
+
if (this.ready && this.mapInstance) {
|
|
131033
|
+
this._applyMapType(type)
|
|
131034
|
+
}
|
|
131035
|
+
}
|
|
131036
|
+
|
|
131037
|
+
/**
|
|
131038
|
+
* 应用地图类型到引擎(各适配器实现)
|
|
131039
|
+
*/
|
|
131040
|
+
_applyMapType(type) {
|
|
131041
|
+
// 可选实现
|
|
131042
|
+
}
|
|
131043
|
+
|
|
131044
|
+
/**
|
|
131045
|
+
* 设置主题
|
|
131046
|
+
*/
|
|
131047
|
+
setTheme(theme) {
|
|
131048
|
+
this.theme = theme
|
|
131049
|
+
if (this.ready && this.mapInstance) {
|
|
131050
|
+
this._applyTheme(theme)
|
|
131051
|
+
}
|
|
131052
|
+
}
|
|
131053
|
+
|
|
131054
|
+
/**
|
|
131055
|
+
* 应用主题到引擎(各适配器实现)
|
|
131056
|
+
*/
|
|
131057
|
+
_applyTheme(theme) {
|
|
131058
|
+
// 可选实现
|
|
131059
|
+
}
|
|
131060
|
+
|
|
131061
|
+
/**
|
|
131062
|
+
* 设置中心坐标 [lng, lat]
|
|
131063
|
+
*/
|
|
131064
|
+
setCenter(center) {
|
|
131065
|
+
this.center = center
|
|
131066
|
+
if (this.ready && this.mapInstance) {
|
|
131067
|
+
this._applyCenter(center)
|
|
131068
|
+
}
|
|
131069
|
+
}
|
|
131070
|
+
|
|
131071
|
+
_applyCenter(center) {
|
|
131072
|
+
// 各适配器实现
|
|
131073
|
+
}
|
|
131074
|
+
|
|
131075
|
+
/**
|
|
131076
|
+
* 设置缩放级别
|
|
131077
|
+
*/
|
|
131078
|
+
setZoom(zoom) {
|
|
131079
|
+
this.zoom = zoom
|
|
131080
|
+
if (this.ready && this.mapInstance) {
|
|
131081
|
+
this._applyZoom(zoom)
|
|
131082
|
+
}
|
|
131083
|
+
}
|
|
131084
|
+
|
|
131085
|
+
_applyZoom(zoom) {
|
|
131086
|
+
// 各适配器实现
|
|
131087
|
+
}
|
|
131088
|
+
|
|
131089
|
+
/**
|
|
131090
|
+
* 获取当前中心坐标
|
|
131091
|
+
*/
|
|
131092
|
+
getCenter() {
|
|
131093
|
+
return this.center
|
|
131094
|
+
}
|
|
131095
|
+
|
|
131096
|
+
/**
|
|
131097
|
+
* 获取当前缩放级别
|
|
131098
|
+
*/
|
|
131099
|
+
getZoom() {
|
|
131100
|
+
return this.zoom
|
|
131101
|
+
}
|
|
131102
|
+
|
|
131103
|
+
/**
|
|
131104
|
+
* 获取原始地图实例(用于高级自定义操作)
|
|
131105
|
+
*/
|
|
131106
|
+
getNativeMap() {
|
|
131107
|
+
return this.mapInstance
|
|
131108
|
+
}
|
|
131109
|
+
|
|
131110
|
+
/**
|
|
131111
|
+
* 绑定事件(统一事件名:click, moveend, zoomend, ready 等)
|
|
131112
|
+
*/
|
|
131113
|
+
on(eventName, handler) {
|
|
131114
|
+
if (typeof handler !== 'function') return
|
|
131115
|
+
this.eventHandlers.set(eventName, handler)
|
|
131116
|
+
if (this.ready && this.mapInstance) {
|
|
131117
|
+
this._bindEvent(eventName, handler)
|
|
131118
|
+
}
|
|
131119
|
+
}
|
|
131120
|
+
|
|
131121
|
+
_bindEvent(eventName, handler) {
|
|
131122
|
+
// 各适配器实现具体事件绑定
|
|
131123
|
+
}
|
|
131124
|
+
|
|
131125
|
+
/**
|
|
131126
|
+
* 解绑事件
|
|
131127
|
+
*/
|
|
131128
|
+
off(eventName) {
|
|
131129
|
+
const handler = this.eventHandlers.get(eventName)
|
|
131130
|
+
if (handler && this.ready && this.mapInstance) {
|
|
131131
|
+
this._unbindEvent(eventName, handler)
|
|
131132
|
+
}
|
|
131133
|
+
this.eventHandlers.delete(eventName)
|
|
131134
|
+
}
|
|
131135
|
+
|
|
131136
|
+
_unbindEvent(eventName, handler) {
|
|
131137
|
+
// 各适配器实现
|
|
131138
|
+
}
|
|
131139
|
+
|
|
131140
|
+
/**
|
|
131141
|
+
* 调整地图大小(容器尺寸变化后调用)
|
|
131142
|
+
*/
|
|
131143
|
+
resize() {
|
|
131144
|
+
if (this.ready && this.mapInstance) {
|
|
131145
|
+
this._applyResize()
|
|
131146
|
+
}
|
|
131147
|
+
}
|
|
131148
|
+
|
|
131149
|
+
_applyResize() {
|
|
131150
|
+
// 各适配器实现
|
|
131151
|
+
}
|
|
131152
|
+
|
|
131153
|
+
/**
|
|
131154
|
+
* 销毁地图
|
|
131155
|
+
*/
|
|
131156
|
+
destroy() {
|
|
131157
|
+
this.eventHandlers.clear()
|
|
131158
|
+
if (this.mapInstance && typeof this.mapInstance.destroy === 'function') {
|
|
131159
|
+
try {
|
|
131160
|
+
this.mapInstance.destroy()
|
|
131161
|
+
} catch (e) {
|
|
131162
|
+
// 忽略销毁错误
|
|
131163
|
+
}
|
|
131164
|
+
}
|
|
131165
|
+
this.mapInstance = null
|
|
131166
|
+
this.ready = false
|
|
131167
|
+
}
|
|
131168
|
+
}
|
|
131169
|
+
|
|
131170
|
+
/* harmony default export */ var base = (base_MapAdapterBase);
|
|
131171
|
+
|
|
131172
|
+
// CONCATENATED MODULE: ./src/components/xt-map/adapters/amap.js
|
|
131173
|
+
/**
|
|
131174
|
+
* 高德地图适配器 (AMap)
|
|
131175
|
+
* 以高德为基准,所有 xt-map 枚举直接映射
|
|
131176
|
+
*/
|
|
131177
|
+
|
|
131178
|
+
|
|
131179
|
+
|
|
131180
|
+
|
|
131181
|
+
const A_MAP_MAP_TYPES = {
|
|
131182
|
+
standard: 'amap', // 标准/矢量
|
|
131183
|
+
satellite: 'satellite', // 卫星
|
|
131184
|
+
hybrid: 'satellite', // 混合(卫星+路网,用卫星+路网图层组合实现)
|
|
131185
|
+
traffic: 'traffic' // 实时路况(叠加在 standard 上)
|
|
131186
|
+
}
|
|
131187
|
+
|
|
131188
|
+
// 高德地图样式 ID(主题映射)
|
|
131189
|
+
const A_MAP_STYLES = {
|
|
131190
|
+
light: 'amap://styles/normal',
|
|
131191
|
+
dark: 'amap://styles/dark'
|
|
131192
|
+
}
|
|
131193
|
+
|
|
131194
|
+
class amap_AMapAdapter extends base_MapAdapterBase {
|
|
131195
|
+
constructor(container, options = {}) {
|
|
131196
|
+
super(container, options)
|
|
131197
|
+
this._mapTypeMap = { ...A_MAP_MAP_TYPES }
|
|
131198
|
+
this._trafficLayer = null // 路况图层引用
|
|
131199
|
+
this._satelliteLayer = null // 卫星图层
|
|
131200
|
+
this._roadnetLayer = null // 路网图层(用于 hybrid)
|
|
131201
|
+
this._currentLayers = [] // 当前叠加图层
|
|
131202
|
+
}
|
|
131203
|
+
|
|
131204
|
+
getScriptUrl() {
|
|
131205
|
+
if (this.apiUrl) return this.apiUrl
|
|
131206
|
+
if (!this.apiKey) {
|
|
131207
|
+
console.warn('[XtMap] 高德地图需要配置 apiKey')
|
|
131208
|
+
return ''
|
|
131209
|
+
}
|
|
131210
|
+
// 高德 2.0 Web API
|
|
131211
|
+
return `https://webapi.amap.com/maps?v=2.0&key=${encodeURIComponent(this.apiKey)}&plugin=AMap.Scale,AMap.ToolBar`
|
|
131212
|
+
}
|
|
131213
|
+
|
|
131214
|
+
/**
|
|
131215
|
+
* 脚本加载前设置高德 2.0 安全密钥
|
|
131216
|
+
*/
|
|
131217
|
+
beforeLoadScript() {
|
|
131218
|
+
const securityJsCode = this.options.securityJsCode || (typeof window !== 'undefined' && window._AMapSecurityConfig && window._AMapSecurityConfig.securityJsCode) || ''
|
|
131219
|
+
if (securityJsCode && typeof window !== 'undefined') {
|
|
131220
|
+
window._AMapSecurityConfig = {
|
|
131221
|
+
securityJsCode: securityJsCode
|
|
131222
|
+
}
|
|
131223
|
+
}
|
|
131224
|
+
}
|
|
131225
|
+
|
|
131226
|
+
isSdkLoaded() {
|
|
131227
|
+
return hasGlobal('AMap') && typeof window.AMap === 'function'
|
|
131228
|
+
}
|
|
131229
|
+
|
|
131230
|
+
async createMap() {
|
|
131231
|
+
const AMap = window.AMap
|
|
131232
|
+
if (!AMap) throw new Error('[XtMap] 高德地图 SDK 未加载')
|
|
131233
|
+
|
|
131234
|
+
const mapOptions = {
|
|
131235
|
+
center: this.center,
|
|
131236
|
+
zoom: this.zoom,
|
|
131237
|
+
mapStyle: A_MAP_STYLES[this.theme] || A_MAP_STYLES.light,
|
|
131238
|
+
viewMode: '2D',
|
|
131239
|
+
resizeEnable: true
|
|
131240
|
+
}
|
|
131241
|
+
|
|
131242
|
+
this.mapInstance = new AMap.Map(this.container, mapOptions)
|
|
131243
|
+
|
|
131244
|
+
// 应用地图类型
|
|
131245
|
+
this._applyMapType(this.mapType)
|
|
131246
|
+
|
|
131247
|
+
// 绑定事件(延迟到地图就绪后)
|
|
131248
|
+
await new Promise((resolve) => {
|
|
131249
|
+
this.mapInstance.on('complete', () => resolve())
|
|
131250
|
+
// 兜底:1秒后强制 resolve
|
|
131251
|
+
setTimeout(resolve, 1500)
|
|
131252
|
+
})
|
|
131253
|
+
|
|
131254
|
+
// 重新绑定已注册事件
|
|
131255
|
+
for (const [eventName, handler] of this.eventHandlers.entries()) {
|
|
131256
|
+
this._bindEvent(eventName, handler)
|
|
131257
|
+
}
|
|
131258
|
+
}
|
|
131259
|
+
|
|
131260
|
+
_applyMapType(type) {
|
|
131261
|
+
if (!this.mapInstance) return
|
|
131262
|
+
const AMap = window.AMap
|
|
131263
|
+
if (!AMap) return
|
|
131264
|
+
|
|
131265
|
+
// 清除所有叠加图层
|
|
131266
|
+
this._clearLayers()
|
|
131267
|
+
|
|
131268
|
+
try {
|
|
131269
|
+
// 设置底图样式
|
|
131270
|
+
this.mapInstance.setMapStyle(A_MAP_STYLES[this.theme] || A_MAP_STYLES.light)
|
|
131271
|
+
|
|
131272
|
+
if (type === 'satellite') {
|
|
131273
|
+
this._satelliteLayer = new AMap.TileLayer.Satellite()
|
|
131274
|
+
this.mapInstance.add(this._satelliteLayer)
|
|
131275
|
+
this._currentLayers.push(this._satelliteLayer)
|
|
131276
|
+
} else if (type === 'hybrid') {
|
|
131277
|
+
// 卫星 + 路网
|
|
131278
|
+
this._satelliteLayer = new AMap.TileLayer.Satellite()
|
|
131279
|
+
this._roadnetLayer = new AMap.TileLayer.RoadNet()
|
|
131280
|
+
this.mapInstance.add([this._satelliteLayer, this._roadnetLayer])
|
|
131281
|
+
this._currentLayers.push(this._satelliteLayer, this._roadnetLayer)
|
|
131282
|
+
} else if (type === 'traffic') {
|
|
131283
|
+
// 路况图层叠加在 standard 上
|
|
131284
|
+
this._trafficLayer = new AMap.TileLayer.Traffic({
|
|
131285
|
+
autoRefresh: true,
|
|
131286
|
+
interval: 180
|
|
131287
|
+
})
|
|
131288
|
+
this.mapInstance.add(this._trafficLayer)
|
|
131289
|
+
this._currentLayers.push(this._trafficLayer)
|
|
131290
|
+
}
|
|
131291
|
+
} catch (e) {
|
|
131292
|
+
console.warn('[XtMap] 设置地图类型失败:', e)
|
|
131293
|
+
}
|
|
131294
|
+
}
|
|
131295
|
+
|
|
131296
|
+
_clearLayers() {
|
|
131297
|
+
if (!this.mapInstance) return
|
|
131298
|
+
try {
|
|
131299
|
+
if (this._currentLayers.length > 0) {
|
|
131300
|
+
this.mapInstance.remove(this._currentLayers)
|
|
131301
|
+
}
|
|
131302
|
+
} catch (e) {
|
|
131303
|
+
// 忽略
|
|
131304
|
+
}
|
|
131305
|
+
this._currentLayers = []
|
|
131306
|
+
this._trafficLayer = null
|
|
131307
|
+
this._satelliteLayer = null
|
|
131308
|
+
this._roadnetLayer = null
|
|
131309
|
+
}
|
|
131310
|
+
|
|
131311
|
+
_applyTheme(theme) {
|
|
131312
|
+
if (!this.mapInstance) return
|
|
131313
|
+
try {
|
|
131314
|
+
this.mapInstance.setMapStyle(A_MAP_STYLES[theme] || A_MAP_STYLES.light)
|
|
131315
|
+
// 主题变更可能影响图层显示,重新应用地图类型
|
|
131316
|
+
this._applyMapType(this.mapType)
|
|
131317
|
+
} catch (e) {
|
|
131318
|
+
console.warn('[XtMap] 设置主题失败:', e)
|
|
131319
|
+
}
|
|
131320
|
+
}
|
|
131321
|
+
|
|
131322
|
+
_applyCenter(center) {
|
|
131323
|
+
if (!this.mapInstance) return
|
|
131324
|
+
try {
|
|
131325
|
+
this.mapInstance.setCenter(center)
|
|
131326
|
+
} catch (e) {
|
|
131327
|
+
// 忽略
|
|
131328
|
+
}
|
|
131329
|
+
}
|
|
131330
|
+
|
|
131331
|
+
_applyZoom(zoom) {
|
|
131332
|
+
if (!this.mapInstance) return
|
|
131333
|
+
try {
|
|
131334
|
+
this.mapInstance.setZoom(zoom)
|
|
131335
|
+
} catch (e) {
|
|
131336
|
+
// 忽略
|
|
131337
|
+
}
|
|
131338
|
+
}
|
|
131339
|
+
|
|
131340
|
+
getCenter() {
|
|
131341
|
+
if (this.mapInstance && this.mapInstance.getCenter) {
|
|
131342
|
+
const c = this.mapInstance.getCenter()
|
|
131343
|
+
return [c.lng, c.lat]
|
|
131344
|
+
}
|
|
131345
|
+
return this.center
|
|
131346
|
+
}
|
|
131347
|
+
|
|
131348
|
+
getZoom() {
|
|
131349
|
+
if (this.mapInstance && this.mapInstance.getZoom) {
|
|
131350
|
+
return this.mapInstance.getZoom()
|
|
131351
|
+
}
|
|
131352
|
+
return this.zoom
|
|
131353
|
+
}
|
|
131354
|
+
|
|
131355
|
+
_bindEvent(eventName, handler) {
|
|
131356
|
+
if (!this.mapInstance) return
|
|
131357
|
+
try {
|
|
131358
|
+
// 统一事件名映射
|
|
131359
|
+
const eventMap = {
|
|
131360
|
+
click: 'click',
|
|
131361
|
+
moveend: 'moveend',
|
|
131362
|
+
zoomend: 'zoomend',
|
|
131363
|
+
zoomchange: 'zoomchange',
|
|
131364
|
+
mapmove: 'mapmove',
|
|
131365
|
+
complete: 'complete',
|
|
131366
|
+
resize: 'resize'
|
|
131367
|
+
}
|
|
131368
|
+
const nativeEvent = eventMap[eventName] || eventName
|
|
131369
|
+
this.mapInstance.on(nativeEvent, (e) => {
|
|
131370
|
+
// 统一事件参数格式
|
|
131371
|
+
const normalized = {
|
|
131372
|
+
originalEvent: e,
|
|
131373
|
+
lnglat: e && e.lnglat ? [e.lnglat.lng, e.lnglat.lat] : null
|
|
131374
|
+
}
|
|
131375
|
+
handler(normalized)
|
|
131376
|
+
})
|
|
131377
|
+
} catch (err) {
|
|
131378
|
+
console.warn('[XtMap] 事件绑定失败:', eventName, err)
|
|
131379
|
+
}
|
|
131380
|
+
}
|
|
131381
|
+
|
|
131382
|
+
_unbindEvent(eventName, handler) {
|
|
131383
|
+
if (!this.mapInstance) return
|
|
131384
|
+
try {
|
|
131385
|
+
this.mapInstance.off(eventName, handler)
|
|
131386
|
+
} catch (e) {
|
|
131387
|
+
// 忽略
|
|
131388
|
+
}
|
|
131389
|
+
}
|
|
131390
|
+
|
|
131391
|
+
_applyResize() {
|
|
131392
|
+
if (this.mapInstance && this.mapInstance.resize) {
|
|
131393
|
+
try {
|
|
131394
|
+
this.mapInstance.resize()
|
|
131395
|
+
} catch (e) {
|
|
131396
|
+
// 忽略
|
|
131397
|
+
}
|
|
131398
|
+
}
|
|
131399
|
+
}
|
|
131400
|
+
|
|
131401
|
+
destroy() {
|
|
131402
|
+
this._clearLayers()
|
|
131403
|
+
super.destroy()
|
|
131404
|
+
}
|
|
131405
|
+
}
|
|
131406
|
+
|
|
131407
|
+
/* harmony default export */ var amap = (amap_AMapAdapter);
|
|
131408
|
+
|
|
131409
|
+
// CONCATENATED MODULE: ./src/components/xt-map/adapters/tianditu.js
|
|
131410
|
+
/**
|
|
131411
|
+
* 天地图适配器 (Tianditu)
|
|
131412
|
+
* 天地图使用 WMTS 切片服务,不支持原生主题切换,
|
|
131413
|
+
* dark/light 通过图层样式参数模拟(部分图层可调整色调)
|
|
131414
|
+
*/
|
|
131415
|
+
|
|
131416
|
+
|
|
131417
|
+
|
|
131418
|
+
|
|
131419
|
+
// 天地图地图类型映射
|
|
131420
|
+
const TIANDITU_MAP_TYPES = {
|
|
131421
|
+
standard: 'vec', // 矢量地图
|
|
131422
|
+
satellite: 'img', // 影像地图
|
|
131423
|
+
hybrid: 'img', // 混合(影像 + 注记)
|
|
131424
|
+
traffic: 'vec' // 天地图不支持原生路况,降级为矢量
|
|
131425
|
+
}
|
|
131426
|
+
|
|
131427
|
+
// 天地图主题色模拟:通过调整图层透明度/色调CSS滤镜
|
|
131428
|
+
const TIANDITU_THEME_FILTER = {
|
|
131429
|
+
light: 'none',
|
|
131430
|
+
dark: 'invert(1) hue-rotate(180deg) saturate(1.2) brightness(0.95)'
|
|
131431
|
+
}
|
|
131432
|
+
|
|
131433
|
+
class tianditu_TiandituAdapter extends base_MapAdapterBase {
|
|
131434
|
+
constructor(container, options = {}) {
|
|
131435
|
+
super(container, options)
|
|
131436
|
+
this._mapTypeMap = { ...TIANDITU_MAP_TYPES }
|
|
131437
|
+
this._layerType = options.tiandituLayerType || 'vec'
|
|
131438
|
+
this._currentLayer = null
|
|
131439
|
+
this._annotationLayer = null
|
|
131440
|
+
}
|
|
131441
|
+
|
|
131442
|
+
getScriptUrl() {
|
|
131443
|
+
if (this.apiUrl) return this.apiUrl
|
|
131444
|
+
if (!this.apiKey) {
|
|
131445
|
+
console.warn('[XtMap] 天地图需要配置 apiKey (tk)')
|
|
131446
|
+
return ''
|
|
131447
|
+
}
|
|
131448
|
+
return `https://api.tianditu.gov.cn/api?v=4.0&tk=${encodeURIComponent(this.apiKey)}`
|
|
131449
|
+
}
|
|
131450
|
+
|
|
131451
|
+
isSdkLoaded() {
|
|
131452
|
+
return hasGlobal('T') && typeof window.T === 'object' && window.T.Map
|
|
131453
|
+
}
|
|
131454
|
+
|
|
131455
|
+
async createMap() {
|
|
131456
|
+
const T = window.T
|
|
131457
|
+
if (!T || !T.Map) throw new Error('[XtMap] 天地图 SDK 未加载')
|
|
131458
|
+
|
|
131459
|
+
const mapOptions = {
|
|
131460
|
+
center: new T.LngLat(this.center[0], this.center[1]),
|
|
131461
|
+
zoom: this.zoom
|
|
131462
|
+
}
|
|
131463
|
+
|
|
131464
|
+
this.mapInstance = new T.Map(this.container, mapOptions)
|
|
131465
|
+
|
|
131466
|
+
// 应用地图类型
|
|
131467
|
+
this._applyMapType(this.mapType)
|
|
131468
|
+
|
|
131469
|
+
// 应用主题
|
|
131470
|
+
this._applyTheme(this.theme)
|
|
131471
|
+
|
|
131472
|
+
// 等待地图就绪
|
|
131473
|
+
await new Promise((resolve) => {
|
|
131474
|
+
setTimeout(resolve, 500)
|
|
131475
|
+
})
|
|
131476
|
+
|
|
131477
|
+
// 绑定事件
|
|
131478
|
+
for (const [eventName, handler] of this.eventHandlers.entries()) {
|
|
131479
|
+
this._bindEvent(eventName, handler)
|
|
131480
|
+
}
|
|
131481
|
+
}
|
|
131482
|
+
|
|
131483
|
+
_applyMapType(type) {
|
|
131484
|
+
if (!this.mapInstance) return
|
|
131485
|
+
const T = window.T
|
|
131486
|
+
if (!T) return
|
|
131487
|
+
|
|
131488
|
+
try {
|
|
131489
|
+
// 天地图通过 switchTo 方法切换图层
|
|
131490
|
+
const layerType = this._mapTypeMap[type] || 'vec'
|
|
131491
|
+
|
|
131492
|
+
if (type === 'standard') {
|
|
131493
|
+
// 矢量地图
|
|
131494
|
+
this.mapInstance.setMapType(window.TMAP_NORMAL_MAP || 1)
|
|
131495
|
+
} else if (type === 'satellite') {
|
|
131496
|
+
// 影像地图
|
|
131497
|
+
this.mapInstance.setMapType(window.TMAP_SATELLITE_MAP || 2)
|
|
131498
|
+
} else if (type === 'hybrid') {
|
|
131499
|
+
// 混合(影像+注记)
|
|
131500
|
+
this.mapInstance.setMapType(window.TMAP_HYBRID_MAP || 3)
|
|
131501
|
+
} else {
|
|
131502
|
+
// 路况等特殊类型,天地图无原生支持
|
|
131503
|
+
this.mapInstance.setMapType(window.TMAP_NORMAL_MAP || 1)
|
|
131504
|
+
}
|
|
131505
|
+
} catch (e) {
|
|
131506
|
+
console.warn('[XtMap] 天地图切换地图类型失败:', e)
|
|
131507
|
+
}
|
|
131508
|
+
}
|
|
131509
|
+
|
|
131510
|
+
_applyTheme(theme) {
|
|
131511
|
+
if (!this.container) return
|
|
131512
|
+
// 天地图不支持原生 dark 主题,通过 CSS 滤镜模拟
|
|
131513
|
+
const filter = TIANDITU_THEME_FILTER[theme] || 'none'
|
|
131514
|
+
const imgElements = this.container.querySelectorAll('img')
|
|
131515
|
+
imgElements.forEach((img) => {
|
|
131516
|
+
img.style.filter = filter
|
|
131517
|
+
img.style.webkitFilter = filter
|
|
131518
|
+
})
|
|
131519
|
+
// 同时设置容器级 CSS 变量,方便样式覆盖
|
|
131520
|
+
this.container.setAttribute('data-map-theme', theme)
|
|
131521
|
+
// 监听后续新增的 tile 图片(通过 MutationObserver)
|
|
131522
|
+
this._setupThemeObserver(theme)
|
|
131523
|
+
}
|
|
131524
|
+
|
|
131525
|
+
_setupThemeObserver(theme) {
|
|
131526
|
+
if (this._themeObserver) {
|
|
131527
|
+
this._themeObserver.disconnect()
|
|
131528
|
+
}
|
|
131529
|
+
if (theme !== 'dark') return
|
|
131530
|
+
const filter = TIANDITU_THEME_FILTER[theme]
|
|
131531
|
+
this._themeObserver = new MutationObserver((mutations) => {
|
|
131532
|
+
mutations.forEach((mutation) => {
|
|
131533
|
+
mutation.addedNodes.forEach((node) => {
|
|
131534
|
+
if (node.nodeType === 1) {
|
|
131535
|
+
if (node.tagName === 'IMG') {
|
|
131536
|
+
node.style.filter = filter
|
|
131537
|
+
node.style.webkitFilter = filter
|
|
131538
|
+
} else if (node.querySelectorAll) {
|
|
131539
|
+
const imgs = node.querySelectorAll('img')
|
|
131540
|
+
imgs.forEach((img) => {
|
|
131541
|
+
img.style.filter = filter
|
|
131542
|
+
img.style.webkitFilter = filter
|
|
131543
|
+
})
|
|
131544
|
+
}
|
|
131545
|
+
}
|
|
131546
|
+
})
|
|
131547
|
+
})
|
|
131548
|
+
})
|
|
131549
|
+
try {
|
|
131550
|
+
this._themeObserver.observe(this.container, {
|
|
131551
|
+
childList: true,
|
|
131552
|
+
subtree: true
|
|
131553
|
+
})
|
|
131554
|
+
} catch (e) {
|
|
131555
|
+
// 忽略
|
|
131556
|
+
}
|
|
131557
|
+
}
|
|
131558
|
+
|
|
131559
|
+
_applyCenter(center) {
|
|
131560
|
+
if (!this.mapInstance || !window.T) return
|
|
131561
|
+
try {
|
|
131562
|
+
this.mapInstance.centerAndZoom(new window.T.LngLat(center[0], center[1]), this.zoom)
|
|
131563
|
+
} catch (e) {
|
|
131564
|
+
// 忽略
|
|
131565
|
+
}
|
|
131566
|
+
}
|
|
131567
|
+
|
|
131568
|
+
_applyZoom(zoom) {
|
|
131569
|
+
if (!this.mapInstance) return
|
|
131570
|
+
try {
|
|
131571
|
+
this.mapInstance.setZoom(zoom)
|
|
131572
|
+
} catch (e) {
|
|
131573
|
+
// 忽略
|
|
131574
|
+
}
|
|
131575
|
+
}
|
|
131576
|
+
|
|
131577
|
+
getCenter() {
|
|
131578
|
+
if (this.mapInstance && this.mapInstance.getCenter) {
|
|
131579
|
+
const c = this.mapInstance.getCenter()
|
|
131580
|
+
if (c && c.getLng !== undefined) {
|
|
131581
|
+
return [c.getLng(), c.getLat()]
|
|
131582
|
+
}
|
|
131583
|
+
}
|
|
131584
|
+
return this.center
|
|
131585
|
+
}
|
|
131586
|
+
|
|
131587
|
+
getZoom() {
|
|
131588
|
+
if (this.mapInstance && this.mapInstance.getZoom) {
|
|
131589
|
+
return this.mapInstance.getZoom()
|
|
131590
|
+
}
|
|
131591
|
+
return this.zoom
|
|
131592
|
+
}
|
|
131593
|
+
|
|
131594
|
+
_bindEvent(eventName, handler) {
|
|
131595
|
+
if (!this.mapInstance) return
|
|
131596
|
+
try {
|
|
131597
|
+
const eventMap = {
|
|
131598
|
+
click: 'click',
|
|
131599
|
+
moveend: 'moveend',
|
|
131600
|
+
zoomend: 'zoomend',
|
|
131601
|
+
zoomchange: 'zoomend'
|
|
131602
|
+
}
|
|
131603
|
+
const nativeEvent = eventMap[eventName] || eventName
|
|
131604
|
+
this.mapInstance.addEventListener(nativeEvent, (e) => {
|
|
131605
|
+
const normalized = {
|
|
131606
|
+
originalEvent: e,
|
|
131607
|
+
lnglat: e && e.lnglat ? [e.lnglat.getLng(), e.lnglat.getLat()] : null
|
|
131608
|
+
}
|
|
131609
|
+
handler(normalized)
|
|
131610
|
+
})
|
|
131611
|
+
} catch (err) {
|
|
131612
|
+
console.warn('[XtMap] 天地图事件绑定失败:', eventName, err)
|
|
131613
|
+
}
|
|
131614
|
+
}
|
|
131615
|
+
|
|
131616
|
+
_unbindEvent(eventName, handler) {
|
|
131617
|
+
if (!this.mapInstance) return
|
|
131618
|
+
try {
|
|
131619
|
+
this.mapInstance.removeEventListener(eventName, handler)
|
|
131620
|
+
} catch (e) {
|
|
131621
|
+
// 忽略
|
|
131622
|
+
}
|
|
131623
|
+
}
|
|
131624
|
+
|
|
131625
|
+
_applyResize() {
|
|
131626
|
+
if (this.mapInstance && this.mapInstance.checkResize) {
|
|
131627
|
+
try {
|
|
131628
|
+
this.mapInstance.checkResize()
|
|
131629
|
+
} catch (e) {
|
|
131630
|
+
// 忽略
|
|
131631
|
+
}
|
|
131632
|
+
}
|
|
131633
|
+
}
|
|
131634
|
+
|
|
131635
|
+
destroy() {
|
|
131636
|
+
if (this._themeObserver) {
|
|
131637
|
+
this._themeObserver.disconnect()
|
|
131638
|
+
this._themeObserver = null
|
|
131639
|
+
}
|
|
131640
|
+
if (this.mapInstance && typeof this.mapInstance.clearOverLays === 'function') {
|
|
131641
|
+
try {
|
|
131642
|
+
this.mapInstance.clearOverLays()
|
|
131643
|
+
} catch (e) {
|
|
131644
|
+
// 忽略
|
|
131645
|
+
}
|
|
131646
|
+
}
|
|
131647
|
+
super.destroy()
|
|
131648
|
+
}
|
|
131649
|
+
}
|
|
131650
|
+
|
|
131651
|
+
/* harmony default export */ var tianditu = (tianditu_TiandituAdapter);
|
|
131652
|
+
|
|
131653
|
+
// CONCATENATED MODULE: ./src/components/xt-map/adapters/baidu.js
|
|
131654
|
+
/**
|
|
131655
|
+
* 百度地图适配器 (BMap / Baidu)
|
|
131656
|
+
* 百度地图 JS API 3.0 支持自定义样式
|
|
131657
|
+
*/
|
|
131658
|
+
|
|
131659
|
+
|
|
131660
|
+
|
|
131661
|
+
|
|
131662
|
+
// 百度地图类型映射
|
|
131663
|
+
const BAIDU_MAP_TYPES = {
|
|
131664
|
+
standard: 'BMAP_NORMAL_MAP',
|
|
131665
|
+
satellite: 'BMAP_SATELLITE_MAP',
|
|
131666
|
+
hybrid: 'BMAP_HYBRID_MAP',
|
|
131667
|
+
traffic: 'BMAP_NORMAL_MAP' // 路况通过图层叠加
|
|
131668
|
+
}
|
|
131669
|
+
|
|
131670
|
+
// 百度地图自定义样式 ID(主题)
|
|
131671
|
+
// light: 官方 normal 样式
|
|
131672
|
+
// dark: 午夜蓝 dark 样式
|
|
131673
|
+
const BAIDU_STYLES = {
|
|
131674
|
+
light: { style: 'normal' },
|
|
131675
|
+
dark: { style: 'dark' }
|
|
131676
|
+
}
|
|
131677
|
+
|
|
131678
|
+
class baidu_BaiduAdapter extends base_MapAdapterBase {
|
|
131679
|
+
constructor(container, options = {}) {
|
|
131680
|
+
super(container, options)
|
|
131681
|
+
this._mapTypeMap = { ...BAIDU_MAP_TYPES }
|
|
131682
|
+
this._coordType = options.baiduCoordType || 'bd09ll'
|
|
131683
|
+
this._trafficLayer = null
|
|
131684
|
+
this._callbackName = null
|
|
131685
|
+
}
|
|
131686
|
+
|
|
131687
|
+
getScriptUrl() {
|
|
131688
|
+
if (this.apiUrl) return this.apiUrl
|
|
131689
|
+
if (!this.apiKey) {
|
|
131690
|
+
console.warn('[XtMap] 百度地图需要配置 apiKey (ak)')
|
|
131691
|
+
return ''
|
|
131692
|
+
}
|
|
131693
|
+
// 注意:_callbackName 在 beforeLoadScript 中已注册
|
|
131694
|
+
return `https://api.map.baidu.com/api?v=3.0&ak=${encodeURIComponent(this.apiKey)}&callback=${this._callbackName}`
|
|
131695
|
+
}
|
|
131696
|
+
|
|
131697
|
+
/**
|
|
131698
|
+
* 脚本加载前注册百度 SDK 回调函数
|
|
131699
|
+
*/
|
|
131700
|
+
beforeLoadScript() {
|
|
131701
|
+
// 生成唯一 callback 名称,支持多实例
|
|
131702
|
+
this._callbackName = `__xt_map_baidu_${Date.now()}_${Math.floor(Math.random() * 100000)}`
|
|
131703
|
+
// 注册全局 callback(百度地图 SDK 加载完成后调用)
|
|
131704
|
+
if (typeof window !== 'undefined') {
|
|
131705
|
+
window[this._callbackName] = () => {
|
|
131706
|
+
// 空实现,仅用于触发 Promise resolve
|
|
131707
|
+
}
|
|
131708
|
+
}
|
|
131709
|
+
}
|
|
131710
|
+
|
|
131711
|
+
isSdkLoaded() {
|
|
131712
|
+
return hasGlobal('BMap') && typeof window.BMap === 'function'
|
|
131713
|
+
}
|
|
131714
|
+
|
|
131715
|
+
async createMap() {
|
|
131716
|
+
const BMap = window.BMap
|
|
131717
|
+
if (!BMap) throw new Error('[XtMap] 百度地图 SDK 未加载')
|
|
131718
|
+
|
|
131719
|
+
const mapOptions = {
|
|
131720
|
+
enableMapClick: false
|
|
131721
|
+
}
|
|
131722
|
+
|
|
131723
|
+
this.mapInstance = new BMap.Map(this.container, mapOptions)
|
|
131724
|
+
this.mapInstance.centerAndZoom(new BMap.Point(this.center[0], this.center[1]), this.zoom)
|
|
131725
|
+
this.mapInstance.enableScrollWheelZoom(true)
|
|
131726
|
+
|
|
131727
|
+
// 应用地图类型
|
|
131728
|
+
this._applyMapType(this.mapType)
|
|
131729
|
+
|
|
131730
|
+
// 应用主题
|
|
131731
|
+
this._applyTheme(this.theme)
|
|
131732
|
+
|
|
131733
|
+
// 等待地图就绪
|
|
131734
|
+
await new Promise((resolve) => setTimeout(resolve, 500))
|
|
131735
|
+
|
|
131736
|
+
for (const [eventName, handler] of this.eventHandlers.entries()) {
|
|
131737
|
+
this._bindEvent(eventName, handler)
|
|
131738
|
+
}
|
|
131739
|
+
}
|
|
131740
|
+
|
|
131741
|
+
_applyMapType(type) {
|
|
131742
|
+
if (!this.mapInstance || !window.BMap) return
|
|
131743
|
+
|
|
131744
|
+
try {
|
|
131745
|
+
// 清除路况图层
|
|
131746
|
+
if (this._trafficLayer) {
|
|
131747
|
+
try {
|
|
131748
|
+
this.mapInstance.removeTileLayer(this._trafficLayer)
|
|
131749
|
+
} catch (e) {}
|
|
131750
|
+
this._trafficLayer = null
|
|
131751
|
+
}
|
|
131752
|
+
|
|
131753
|
+
if (type === 'satellite') {
|
|
131754
|
+
this.mapInstance.setMapType(window.BMAP_SATELLITE_MAP || 1)
|
|
131755
|
+
} else if (type === 'hybrid') {
|
|
131756
|
+
this.mapInstance.setMapType(window.BMAP_HYBRID_MAP || 2)
|
|
131757
|
+
} else if (type === 'traffic') {
|
|
131758
|
+
this.mapInstance.setMapType(window.BMAP_NORMAL_MAP || 0)
|
|
131759
|
+
// 叠加路况图层
|
|
131760
|
+
try {
|
|
131761
|
+
const BMap = window.BMap
|
|
131762
|
+
this._trafficLayer = new BMap.TrafficLayer()
|
|
131763
|
+
this.mapInstance.addTileLayer(this._trafficLayer)
|
|
131764
|
+
} catch (e) {
|
|
131765
|
+
console.warn('[XtMap] 百度地图加载路况图层失败:', e)
|
|
131766
|
+
}
|
|
131767
|
+
} else {
|
|
131768
|
+
this.mapInstance.setMapType(window.BMAP_NORMAL_MAP || 0)
|
|
131769
|
+
}
|
|
131770
|
+
} catch (e) {
|
|
131771
|
+
console.warn('[XtMap] 百度地图切换地图类型失败:', e)
|
|
131772
|
+
}
|
|
131773
|
+
}
|
|
131774
|
+
|
|
131775
|
+
_applyTheme(theme) {
|
|
131776
|
+
if (!this.mapInstance || !window.BMap) return
|
|
131777
|
+
try {
|
|
131778
|
+
// 百度 3.0 通过 setMapStyle 设置主题样式
|
|
131779
|
+
const styleConfig = BAIDU_STYLES[theme] || BAIDU_STYLES.light
|
|
131780
|
+
if (this.mapInstance.setMapStyleV2) {
|
|
131781
|
+
// 新版 API
|
|
131782
|
+
this.mapInstance.setMapStyleV2({ styleId: styleConfig.style === 'dark' ? 'midnight' : '' })
|
|
131783
|
+
} else if (this.mapInstance.setMapStyle) {
|
|
131784
|
+
// 旧版 API
|
|
131785
|
+
const styleJson = theme === 'dark' ? this._getDarkStyleJson() : null
|
|
131786
|
+
if (styleJson) {
|
|
131787
|
+
this.mapInstance.setMapStyle({ styleJson: styleJson })
|
|
131788
|
+
}
|
|
131789
|
+
}
|
|
131790
|
+
} catch (e) {
|
|
131791
|
+
console.warn('[XtMap] 百度地图设置主题失败:', e)
|
|
131792
|
+
}
|
|
131793
|
+
}
|
|
131794
|
+
|
|
131795
|
+
/**
|
|
131796
|
+
* 简易百度地图 dark 样式 JSON 配置
|
|
131797
|
+
*/
|
|
131798
|
+
_getDarkStyleJson() {
|
|
131799
|
+
return [
|
|
131800
|
+
{ featureType: 'land', elementType: 'geometry', stylers: { color: '#1a1a1a' } },
|
|
131801
|
+
{ featureType: 'water', elementType: 'geometry', stylers: { color: '#0a1a2a' } },
|
|
131802
|
+
{ featureType: 'green', elementType: 'geometry', stylers: { color: '#0a2a1a' } },
|
|
131803
|
+
{ featureType: 'building', elementType: 'geometry', stylers: { color: '#2a2a2a' } },
|
|
131804
|
+
{ featureType: 'highway', elementType: 'geometry', stylers: { color: '#3a3a3a' } },
|
|
131805
|
+
{ featureType: 'highway', elementType: 'geometry.stroke', stylers: { color: '#4a4a4a' } },
|
|
131806
|
+
{ featureType: 'arterial', elementType: 'geometry', stylers: { color: '#333333' } },
|
|
131807
|
+
{ featureType: 'arterial', elementType: 'geometry.stroke', stylers: { color: '#3d3d3d' } },
|
|
131808
|
+
{ featureType: 'local', elementType: 'geometry', stylers: { color: '#2a2a2a' } },
|
|
131809
|
+
{ featureType: 'railway', elementType: 'geometry', stylers: { color: '#3a3a3a' } },
|
|
131810
|
+
{ featureType: 'subway', elementType: 'geometry', stylers: { color: '#3a3a3a' } },
|
|
131811
|
+
{ featureType: 'boundary', elementType: 'geometry', stylers: { color: '#666666' } },
|
|
131812
|
+
{ featureType: 'district', elementType: 'labels.text.fill', stylers: { color: '#888888' } },
|
|
131813
|
+
{ featureType: 'poi', elementType: 'labels', stylers: { visibility: 'off' } }
|
|
131814
|
+
]
|
|
131815
|
+
}
|
|
131816
|
+
|
|
131817
|
+
_applyCenter(center) {
|
|
131818
|
+
if (!this.mapInstance || !window.BMap) return
|
|
131819
|
+
try {
|
|
131820
|
+
this.mapInstance.centerAndZoom(new window.BMap.Point(center[0], center[1]), this.zoom)
|
|
131821
|
+
} catch (e) {
|
|
131822
|
+
// 忽略
|
|
131823
|
+
}
|
|
131824
|
+
}
|
|
131825
|
+
|
|
131826
|
+
_applyZoom(zoom) {
|
|
131827
|
+
if (!this.mapInstance) return
|
|
131828
|
+
try {
|
|
131829
|
+
this.mapInstance.setZoom(zoom)
|
|
131830
|
+
} catch (e) {
|
|
131831
|
+
// 忽略
|
|
131832
|
+
}
|
|
131833
|
+
}
|
|
131834
|
+
|
|
131835
|
+
getCenter() {
|
|
131836
|
+
if (this.mapInstance && this.mapInstance.getCenter) {
|
|
131837
|
+
const c = this.mapInstance.getCenter()
|
|
131838
|
+
if (c) return [c.lng, c.lat]
|
|
131839
|
+
}
|
|
131840
|
+
return this.center
|
|
131841
|
+
}
|
|
131842
|
+
|
|
131843
|
+
getZoom() {
|
|
131844
|
+
if (this.mapInstance && this.mapInstance.getZoom) {
|
|
131845
|
+
return this.mapInstance.getZoom()
|
|
131846
|
+
}
|
|
131847
|
+
return this.zoom
|
|
131848
|
+
}
|
|
131849
|
+
|
|
131850
|
+
_bindEvent(eventName, handler) {
|
|
131851
|
+
if (!this.mapInstance) return
|
|
131852
|
+
try {
|
|
131853
|
+
const eventMap = {
|
|
131854
|
+
click: 'click',
|
|
131855
|
+
moveend: 'moveend',
|
|
131856
|
+
zoomend: 'zoomend',
|
|
131857
|
+
zoomchange: 'zoomend',
|
|
131858
|
+
mapmove: 'movestart'
|
|
131859
|
+
}
|
|
131860
|
+
const nativeEvent = eventMap[eventName] || eventName
|
|
131861
|
+
this.mapInstance.addEventListener(nativeEvent, (e) => {
|
|
131862
|
+
const normalized = {
|
|
131863
|
+
originalEvent: e,
|
|
131864
|
+
lnglat: e && e.point ? [e.point.lng, e.point.lat] : null
|
|
131865
|
+
}
|
|
131866
|
+
handler(normalized)
|
|
131867
|
+
})
|
|
131868
|
+
} catch (err) {
|
|
131869
|
+
console.warn('[XtMap] 百度地图事件绑定失败:', eventName, err)
|
|
131870
|
+
}
|
|
131871
|
+
}
|
|
131872
|
+
|
|
131873
|
+
_unbindEvent(eventName, handler) {
|
|
131874
|
+
if (!this.mapInstance) return
|
|
131875
|
+
try {
|
|
131876
|
+
this.mapInstance.removeEventListener(eventName, handler)
|
|
131877
|
+
} catch (e) {
|
|
131878
|
+
// 忽略
|
|
131879
|
+
}
|
|
131880
|
+
}
|
|
131881
|
+
|
|
131882
|
+
_applyResize() {
|
|
131883
|
+
if (this.mapInstance && this.mapInstance.enableResize) {
|
|
131884
|
+
try {
|
|
131885
|
+
// 百度地图默认启用 resize,无需手动调用
|
|
131886
|
+
if (typeof this.mapInstance.checkResize === 'function') {
|
|
131887
|
+
this.mapInstance.checkResize()
|
|
131888
|
+
}
|
|
131889
|
+
} catch (e) {
|
|
131890
|
+
// 忽略
|
|
131891
|
+
}
|
|
131892
|
+
}
|
|
131893
|
+
}
|
|
131894
|
+
|
|
131895
|
+
destroy() {
|
|
131896
|
+
if (this._callbackName && typeof window !== 'undefined') {
|
|
131897
|
+
try {
|
|
131898
|
+
delete window[this._callbackName]
|
|
131899
|
+
} catch (e) {
|
|
131900
|
+
// 忽略
|
|
131901
|
+
}
|
|
131902
|
+
}
|
|
131903
|
+
super.destroy()
|
|
131904
|
+
}
|
|
131905
|
+
}
|
|
131906
|
+
|
|
131907
|
+
/* harmony default export */ var baidu = (baidu_BaiduAdapter);
|
|
131908
|
+
|
|
131909
|
+
// CONCATENATED MODULE: ./src/components/xt-map/adapters/index.js
|
|
131910
|
+
/**
|
|
131911
|
+
* 地图适配器索引
|
|
131912
|
+
* 根据 provider 字符串返回对应的适配器构造函数
|
|
131913
|
+
*/
|
|
131914
|
+
|
|
131915
|
+
|
|
131916
|
+
|
|
131917
|
+
|
|
131918
|
+
|
|
131919
|
+
const adapters = {
|
|
131920
|
+
amap: amap_AMapAdapter,
|
|
131921
|
+
tianditu: tianditu_TiandituAdapter,
|
|
131922
|
+
baidu: baidu_BaiduAdapter
|
|
131923
|
+
}
|
|
131924
|
+
|
|
131925
|
+
const getAdapterClass = (provider) => {
|
|
131926
|
+
return adapters[provider] || amap_AMapAdapter
|
|
131927
|
+
}
|
|
131928
|
+
|
|
131929
|
+
|
|
131930
|
+
|
|
131931
|
+
|
|
131932
|
+
/* harmony default export */ var xt_map_adapters = ({
|
|
131933
|
+
adapters,
|
|
131934
|
+
getAdapterClass,
|
|
131935
|
+
AMapAdapter: amap_AMapAdapter,
|
|
131936
|
+
TiandituAdapter: tianditu_TiandituAdapter,
|
|
131937
|
+
BaiduAdapter: baidu_BaiduAdapter
|
|
131938
|
+
});
|
|
131939
|
+
|
|
131940
|
+
// CONCATENATED MODULE: ./src/components/xt-map/config/xt-map-config.js
|
|
131941
|
+
/**
|
|
131942
|
+
* XtMap 全局配置管理
|
|
131943
|
+
* 支持通过 Vue.use 配置或运行时动态设置地图提供商、密钥、URL、主题等
|
|
131944
|
+
*/
|
|
131945
|
+
|
|
131946
|
+
// 支持的地图提供商
|
|
131947
|
+
const MAP_PROVIDERS = ['amap', 'tianditu', 'baidu']
|
|
131948
|
+
|
|
131949
|
+
// 支持的地图类型(统一枚举,各适配器会转成对应引擎的类型)
|
|
131950
|
+
const MAP_TYPES = ['standard', 'satellite', 'hybrid', 'traffic']
|
|
131951
|
+
|
|
131952
|
+
// 支持的主题
|
|
131953
|
+
const MAP_THEMES = ['light', 'dark']
|
|
131954
|
+
|
|
131955
|
+
// 默认配置 - 以高德地图为基准
|
|
131956
|
+
const xt_map_config_defaultConfig = {
|
|
131957
|
+
provider: 'amap',
|
|
131958
|
+
apiKey: '',
|
|
131959
|
+
apiUrl: null,
|
|
131960
|
+
mapType: 'standard',
|
|
131961
|
+
theme: 'light',
|
|
131962
|
+
center: [116.397428, 39.90923],
|
|
131963
|
+
zoom: 11,
|
|
131964
|
+
plugins: [],
|
|
131965
|
+
securityJsCode: null,
|
|
131966
|
+
// 天地图专用:图层类型(vec:矢量, img:影像, ter:地形)
|
|
131967
|
+
tiandituLayerType: 'vec',
|
|
131968
|
+
// 百度地图专用:坐标系(bd09ll:百度经纬度, bd09mc:百度墨卡托)
|
|
131969
|
+
baiduCoordType: 'bd09ll'
|
|
131970
|
+
}
|
|
131971
|
+
|
|
131972
|
+
// 当前配置
|
|
131973
|
+
let xt_map_config_currentConfig = { ...xt_map_config_defaultConfig }
|
|
131974
|
+
|
|
131975
|
+
// 配置变更监听器
|
|
131976
|
+
const xt_map_config_configChangeListeners = []
|
|
131977
|
+
|
|
131978
|
+
const xt_map_config_emitConfigChange = (key, value) => {
|
|
131979
|
+
xt_map_config_configChangeListeners.forEach(listener => {
|
|
131980
|
+
try {
|
|
131981
|
+
listener(key, value)
|
|
131982
|
+
} catch (e) {
|
|
131983
|
+
console.warn('[XtMap] 配置变更监听异常:', e)
|
|
131984
|
+
}
|
|
131985
|
+
})
|
|
131986
|
+
}
|
|
131987
|
+
|
|
131988
|
+
// 获取完整配置
|
|
131989
|
+
const getMapConfig = () => ({ ...xt_map_config_currentConfig })
|
|
131990
|
+
|
|
131991
|
+
// 设置完整配置
|
|
131992
|
+
const setMapConfig = (config) => {
|
|
131993
|
+
if (typeof config !== 'object' || config === null) {
|
|
131994
|
+
console.warn('[XtMap] setMapConfig 必须传入对象参数')
|
|
131995
|
+
return
|
|
131996
|
+
}
|
|
131997
|
+
|
|
131998
|
+
if (config.provider !== undefined) setMapProvider(config.provider)
|
|
131999
|
+
if (config.apiKey !== undefined) setMapApiKey(config.apiKey)
|
|
132000
|
+
if (config.apiUrl !== undefined) setMapApiUrl(config.apiUrl)
|
|
132001
|
+
if (config.mapType !== undefined) setMapType(config.mapType)
|
|
132002
|
+
if (config.theme !== undefined) setMapTheme(config.theme)
|
|
132003
|
+
if (config.center !== undefined) setMapCenter(config.center)
|
|
132004
|
+
if (config.zoom !== undefined) setMapZoom(config.zoom)
|
|
132005
|
+
if (config.plugins !== undefined) setMapPlugins(config.plugins)
|
|
132006
|
+
if (config.securityJsCode !== undefined) setSecurityJsCode(config.securityJsCode)
|
|
132007
|
+
}
|
|
132008
|
+
|
|
132009
|
+
const setMapProvider = (provider) => {
|
|
132010
|
+
if (!MAP_PROVIDERS.includes(provider)) {
|
|
132011
|
+
console.warn(`[XtMap] 无效的地图提供商: ${provider},可选: ${MAP_PROVIDERS.join(', ')}`)
|
|
132012
|
+
return
|
|
132013
|
+
}
|
|
132014
|
+
xt_map_config_currentConfig.provider = provider
|
|
132015
|
+
xt_map_config_emitConfigChange('provider', provider)
|
|
132016
|
+
}
|
|
132017
|
+
|
|
132018
|
+
const setMapApiKey = (key) => {
|
|
132019
|
+
xt_map_config_currentConfig.apiKey = key
|
|
132020
|
+
xt_map_config_emitConfigChange('apiKey', key)
|
|
132021
|
+
}
|
|
132022
|
+
|
|
132023
|
+
const setMapApiUrl = (url) => {
|
|
132024
|
+
xt_map_config_currentConfig.apiUrl = url
|
|
132025
|
+
xt_map_config_emitConfigChange('apiUrl', url)
|
|
132026
|
+
}
|
|
132027
|
+
|
|
132028
|
+
const setMapType = (type) => {
|
|
132029
|
+
if (!MAP_TYPES.includes(type)) {
|
|
132030
|
+
console.warn(`[XtMap] 无效的地图类型: ${type},可选: ${MAP_TYPES.join(', ')}`)
|
|
132031
|
+
return
|
|
132032
|
+
}
|
|
132033
|
+
xt_map_config_currentConfig.mapType = type
|
|
132034
|
+
xt_map_config_emitConfigChange('mapType', type)
|
|
132035
|
+
}
|
|
132036
|
+
|
|
132037
|
+
const setMapTheme = (theme) => {
|
|
132038
|
+
if (!MAP_THEMES.includes(theme)) {
|
|
132039
|
+
console.warn(`[XtMap] 无效的主题: ${theme},可选: ${MAP_THEMES.join(', ')}`)
|
|
132040
|
+
return
|
|
132041
|
+
}
|
|
132042
|
+
xt_map_config_currentConfig.theme = theme
|
|
132043
|
+
xt_map_config_emitConfigChange('theme', theme)
|
|
132044
|
+
}
|
|
132045
|
+
|
|
132046
|
+
const setMapCenter = (center) => {
|
|
132047
|
+
if (!Array.isArray(center) || center.length !== 2) {
|
|
132048
|
+
console.warn('[XtMap] center 必须是 [lng, lat] 数组')
|
|
132049
|
+
return
|
|
132050
|
+
}
|
|
132051
|
+
xt_map_config_currentConfig.center = center
|
|
132052
|
+
xt_map_config_emitConfigChange('center', center)
|
|
132053
|
+
}
|
|
132054
|
+
|
|
132055
|
+
const setMapZoom = (zoom) => {
|
|
132056
|
+
const z = Number(zoom)
|
|
132057
|
+
if (isNaN(z)) {
|
|
132058
|
+
console.warn('[XtMap] zoom 必须是数字')
|
|
132059
|
+
return
|
|
132060
|
+
}
|
|
132061
|
+
xt_map_config_currentConfig.zoom = z
|
|
132062
|
+
xt_map_config_emitConfigChange('zoom', z)
|
|
132063
|
+
}
|
|
132064
|
+
|
|
132065
|
+
const setMapPlugins = (plugins) => {
|
|
132066
|
+
if (!Array.isArray(plugins)) {
|
|
132067
|
+
console.warn('[XtMap] plugins 必须是数组')
|
|
132068
|
+
return
|
|
132069
|
+
}
|
|
132070
|
+
xt_map_config_currentConfig.plugins = plugins
|
|
132071
|
+
xt_map_config_emitConfigChange('plugins', plugins)
|
|
132072
|
+
}
|
|
132073
|
+
|
|
132074
|
+
const setSecurityJsCode = (code) => {
|
|
132075
|
+
xt_map_config_currentConfig.securityJsCode = code
|
|
132076
|
+
// 高德地图安全密钥:设置 window._AMapSecurityConfig
|
|
132077
|
+
if (typeof window !== 'undefined' && code) {
|
|
132078
|
+
window._AMapSecurityConfig = {
|
|
132079
|
+
securityJsCode: code,
|
|
132080
|
+
...(window._AMapSecurityConfig || {})
|
|
132081
|
+
}
|
|
132082
|
+
}
|
|
132083
|
+
xt_map_config_emitConfigChange('securityJsCode', code)
|
|
132084
|
+
}
|
|
132085
|
+
|
|
132086
|
+
// 获取当前配置的快捷方法
|
|
132087
|
+
const getMapProvider = () => xt_map_config_currentConfig.provider
|
|
132088
|
+
const getMapApiKey = () => xt_map_config_currentConfig.apiKey
|
|
132089
|
+
const getMapApiUrl = () => xt_map_config_currentConfig.apiUrl
|
|
132090
|
+
const getMapType = () => xt_map_config_currentConfig.mapType
|
|
132091
|
+
const getMapTheme = () => xt_map_config_currentConfig.theme
|
|
132092
|
+
const getMapCenter = () => xt_map_config_currentConfig.center
|
|
132093
|
+
const getMapZoom = () => xt_map_config_currentConfig.zoom
|
|
132094
|
+
const getMapPlugins = () => xt_map_config_currentConfig.plugins
|
|
132095
|
+
|
|
132096
|
+
// 监听配置变更
|
|
132097
|
+
const onMapConfigChange = (listener) => {
|
|
132098
|
+
if (typeof listener === 'function') {
|
|
132099
|
+
xt_map_config_configChangeListeners.push(listener)
|
|
132100
|
+
return () => {
|
|
132101
|
+
const index = xt_map_config_configChangeListeners.indexOf(listener)
|
|
132102
|
+
if (index > -1) xt_map_config_configChangeListeners.splice(index, 1)
|
|
132103
|
+
}
|
|
132104
|
+
}
|
|
132105
|
+
}
|
|
132106
|
+
|
|
132107
|
+
// 重置为默认配置
|
|
132108
|
+
const resetMapConfig = () => {
|
|
132109
|
+
setMapConfig(xt_map_config_defaultConfig)
|
|
132110
|
+
}
|
|
132111
|
+
|
|
132112
|
+
/* harmony default export */ var xt_map_config = ({
|
|
132113
|
+
MAP_PROVIDERS,
|
|
132114
|
+
MAP_TYPES,
|
|
132115
|
+
MAP_THEMES,
|
|
132116
|
+
getMapConfig,
|
|
132117
|
+
setMapConfig,
|
|
132118
|
+
setMapProvider,
|
|
132119
|
+
setMapApiKey,
|
|
132120
|
+
setMapApiUrl,
|
|
132121
|
+
setMapType,
|
|
132122
|
+
setMapTheme,
|
|
132123
|
+
setMapCenter,
|
|
132124
|
+
setMapZoom,
|
|
132125
|
+
setMapPlugins,
|
|
132126
|
+
setSecurityJsCode,
|
|
132127
|
+
getMapProvider,
|
|
132128
|
+
getMapApiKey,
|
|
132129
|
+
getMapApiUrl,
|
|
132130
|
+
getMapType,
|
|
132131
|
+
getMapTheme,
|
|
132132
|
+
getMapCenter,
|
|
132133
|
+
getMapZoom,
|
|
132134
|
+
getMapPlugins,
|
|
132135
|
+
onMapConfigChange,
|
|
132136
|
+
resetMapConfig
|
|
132137
|
+
});
|
|
132138
|
+
|
|
132139
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-map/index.vue?vue&type=script&lang=js
|
|
132140
|
+
|
|
132141
|
+
|
|
132142
|
+
|
|
132143
|
+
|
|
132144
|
+
|
|
132145
|
+
/* harmony default export */ var xt_mapvue_type_script_lang_js = ({
|
|
132146
|
+
name: 'XtMap',
|
|
132147
|
+
|
|
132148
|
+
props: {
|
|
132149
|
+
provider: {
|
|
132150
|
+
type: String,
|
|
132151
|
+
default: '',
|
|
132152
|
+
validator: (val) => val === '' || MAP_PROVIDERS.includes(val)
|
|
132153
|
+
},
|
|
132154
|
+
apiKey: {
|
|
132155
|
+
type: String,
|
|
132156
|
+
default: ''
|
|
132157
|
+
},
|
|
132158
|
+
apiUrl: {
|
|
132159
|
+
type: String,
|
|
132160
|
+
default: ''
|
|
132161
|
+
},
|
|
132162
|
+
mapType: {
|
|
132163
|
+
type: String,
|
|
132164
|
+
default: '',
|
|
132165
|
+
validator: (val) => val === '' || MAP_TYPES.includes(val)
|
|
132166
|
+
},
|
|
132167
|
+
theme: {
|
|
132168
|
+
type: String,
|
|
132169
|
+
default: '',
|
|
132170
|
+
validator: (val) => val === '' || MAP_THEMES.includes(val)
|
|
132171
|
+
},
|
|
132172
|
+
center: {
|
|
132173
|
+
type: Array,
|
|
132174
|
+
default: () => null
|
|
132175
|
+
},
|
|
132176
|
+
zoom: {
|
|
132177
|
+
type: Number,
|
|
132178
|
+
default: null
|
|
132179
|
+
},
|
|
132180
|
+
plugins: {
|
|
132181
|
+
type: Array,
|
|
132182
|
+
default: () => []
|
|
132183
|
+
},
|
|
132184
|
+
width: {
|
|
132185
|
+
type: String,
|
|
132186
|
+
default: '100%'
|
|
132187
|
+
},
|
|
132188
|
+
height: {
|
|
132189
|
+
type: String,
|
|
132190
|
+
default: '400px'
|
|
132191
|
+
},
|
|
132192
|
+
securityJsCode: {
|
|
132193
|
+
type: String,
|
|
132194
|
+
default: ''
|
|
132195
|
+
},
|
|
132196
|
+
tiandituLayerType: {
|
|
132197
|
+
type: String,
|
|
132198
|
+
default: 'vec'
|
|
132199
|
+
},
|
|
132200
|
+
baiduCoordType: {
|
|
132201
|
+
type: String,
|
|
132202
|
+
default: 'bd09ll'
|
|
132203
|
+
}
|
|
132204
|
+
},
|
|
132205
|
+
|
|
132206
|
+
data() {
|
|
132207
|
+
return {
|
|
132208
|
+
loading: true,
|
|
132209
|
+
errorMessage: '',
|
|
132210
|
+
adapter: null,
|
|
132211
|
+
_unsubscribeConfig: null
|
|
132212
|
+
}
|
|
132213
|
+
},
|
|
132214
|
+
|
|
132215
|
+
computed: {
|
|
132216
|
+
mergedProvider() {
|
|
132217
|
+
return this.provider || getMapProvider() || 'amap'
|
|
132218
|
+
},
|
|
132219
|
+
mergedApiKey() {
|
|
132220
|
+
return this.apiKey || getMapApiKey() || ''
|
|
132221
|
+
},
|
|
132222
|
+
mergedApiUrl() {
|
|
132223
|
+
return this.apiUrl || getMapApiUrl() || ''
|
|
132224
|
+
},
|
|
132225
|
+
mergedMapType() {
|
|
132226
|
+
return this.mapType || getMapType() || 'standard'
|
|
132227
|
+
},
|
|
132228
|
+
mergedTheme() {
|
|
132229
|
+
return this.theme || getMapTheme() || 'light'
|
|
132230
|
+
},
|
|
132231
|
+
mergedCenter() {
|
|
132232
|
+
return this.center || getMapCenter() || [116.397428, 39.90923]
|
|
132233
|
+
},
|
|
132234
|
+
mergedZoom() {
|
|
132235
|
+
return this.zoom !== null ? this.zoom : getMapZoom()
|
|
132236
|
+
},
|
|
132237
|
+
mergedSecurityJsCode() {
|
|
132238
|
+
return this.securityJsCode || (getMapConfig().securityJsCode) || ''
|
|
132239
|
+
},
|
|
132240
|
+
mergedPlugins() {
|
|
132241
|
+
return this.plugins.length > 0 ? this.plugins : getMapConfig().plugins || []
|
|
132242
|
+
}
|
|
132243
|
+
},
|
|
132244
|
+
|
|
132245
|
+
watch: {
|
|
132246
|
+
mergedProvider: {
|
|
132247
|
+
handler() {
|
|
132248
|
+
this.$nextTick(() => this.rebuildMap())
|
|
132249
|
+
}
|
|
132250
|
+
},
|
|
132251
|
+
mergedApiKey: {
|
|
132252
|
+
handler() {
|
|
132253
|
+
this.$nextTick(() => this.rebuildMap())
|
|
132254
|
+
}
|
|
132255
|
+
},
|
|
132256
|
+
mergedMapType: {
|
|
132257
|
+
handler(newVal) {
|
|
132258
|
+
if (this.adapter) this.adapter.setMapType(newVal)
|
|
132259
|
+
}
|
|
132260
|
+
},
|
|
132261
|
+
mergedTheme: {
|
|
132262
|
+
handler(newVal) {
|
|
132263
|
+
if (this.adapter) this.adapter.setTheme(newVal)
|
|
132264
|
+
if (this.$refs.mapContainer) {
|
|
132265
|
+
this.$refs.mapContainer.setAttribute('data-theme', newVal)
|
|
132266
|
+
}
|
|
132267
|
+
}
|
|
132268
|
+
},
|
|
132269
|
+
mergedCenter: {
|
|
132270
|
+
handler(newVal) {
|
|
132271
|
+
if (this.adapter) this.adapter.setCenter(newVal)
|
|
132272
|
+
}
|
|
132273
|
+
},
|
|
132274
|
+
mergedZoom: {
|
|
132275
|
+
handler(newVal) {
|
|
132276
|
+
if (this.adapter) this.adapter.setZoom(newVal)
|
|
132277
|
+
}
|
|
132278
|
+
},
|
|
132279
|
+
width: {
|
|
132280
|
+
handler() {
|
|
132281
|
+
this.$nextTick(() => {
|
|
132282
|
+
if (this.adapter) this.adapter.resize()
|
|
132283
|
+
})
|
|
132284
|
+
}
|
|
132285
|
+
},
|
|
132286
|
+
height: {
|
|
132287
|
+
handler() {
|
|
132288
|
+
this.$nextTick(() => {
|
|
132289
|
+
if (this.adapter) this.adapter.resize()
|
|
132290
|
+
})
|
|
132291
|
+
}
|
|
132292
|
+
},
|
|
132293
|
+
securityJsCode: {
|
|
132294
|
+
handler(newVal) {
|
|
132295
|
+
if (newVal) {
|
|
132296
|
+
setSecurityJsCode(newVal)
|
|
132297
|
+
// 高德 2.0:SDK 已加载后再设置 securityJsCode 无效,需要重建地图
|
|
132298
|
+
if (this.mergedProvider === 'amap' && this.adapter && this.adapter.ready) {
|
|
132299
|
+
this.$nextTick(() => this.rebuildMap())
|
|
132300
|
+
}
|
|
132301
|
+
}
|
|
132302
|
+
}
|
|
132303
|
+
}
|
|
132304
|
+
},
|
|
132305
|
+
|
|
132306
|
+
mounted() {
|
|
132307
|
+
// 监听全局配置变更
|
|
132308
|
+
this._unsubscribeConfig = onMapConfigChange((key, value) => {
|
|
132309
|
+
if (!this.provider && (key === 'provider')) this.$nextTick(() => this.rebuildMap())
|
|
132310
|
+
if (!this.apiKey && (key === 'apiKey')) this.$nextTick(() => this.rebuildMap())
|
|
132311
|
+
if (!this.apiUrl && (key === 'apiUrl')) this.$nextTick(() => this.rebuildMap())
|
|
132312
|
+
if (!this.theme && key === 'theme' && this.adapter) this.adapter.setTheme(value)
|
|
132313
|
+
if (!this.mapType && key === 'mapType' && this.adapter) this.adapter.setMapType(value)
|
|
132314
|
+
if (!this.center && key === 'center' && this.adapter) this.adapter.setCenter(value)
|
|
132315
|
+
if (this.zoom === null && key === 'zoom' && this.adapter) this.adapter.setZoom(value)
|
|
132316
|
+
})
|
|
132317
|
+
|
|
132318
|
+
// 设置高德安全密钥
|
|
132319
|
+
if (this.securityJsCode) setSecurityJsCode(this.securityJsCode)
|
|
132320
|
+
|
|
132321
|
+
this.$nextTick(() => this.initMap())
|
|
132322
|
+
|
|
132323
|
+
// 监听窗口尺寸变化
|
|
132324
|
+
this._onWindowResize = () => {
|
|
132325
|
+
if (this.adapter) this.adapter.resize()
|
|
132326
|
+
}
|
|
132327
|
+
if (typeof window !== 'undefined') {
|
|
132328
|
+
window.addEventListener('resize', this._onWindowResize)
|
|
132329
|
+
}
|
|
132330
|
+
},
|
|
132331
|
+
|
|
132332
|
+
beforeDestroy() {
|
|
132333
|
+
this.destroyMap()
|
|
132334
|
+
if (this._unsubscribeConfig) this._unsubscribeConfig()
|
|
132335
|
+
if (this._onWindowResize && typeof window !== 'undefined') {
|
|
132336
|
+
window.removeEventListener('resize', this._onWindowResize)
|
|
132337
|
+
}
|
|
132338
|
+
},
|
|
132339
|
+
|
|
132340
|
+
methods: {
|
|
132341
|
+
async initMap() {
|
|
132342
|
+
const container = this.$refs.mapContainer
|
|
132343
|
+
if (!container) return
|
|
132344
|
+
|
|
132345
|
+
// 设置容器尺寸
|
|
132346
|
+
container.style.width = this.width
|
|
132347
|
+
container.style.height = this.height
|
|
132348
|
+
|
|
132349
|
+
// 设置安全密钥(高德需要)
|
|
132350
|
+
if (this.securityJsCode) setSecurityJsCode(this.securityJsCode)
|
|
132351
|
+
|
|
132352
|
+
this.loading = true
|
|
132353
|
+
this.errorMessage = ''
|
|
132354
|
+
|
|
132355
|
+
const AdapterClass = getAdapterClass(this.mergedProvider)
|
|
132356
|
+
|
|
132357
|
+
this.adapter = new AdapterClass(container, {
|
|
132358
|
+
apiKey: this.mergedApiKey,
|
|
132359
|
+
apiUrl: this.mergedApiUrl,
|
|
132360
|
+
mapType: this.mergedMapType,
|
|
132361
|
+
theme: this.mergedTheme,
|
|
132362
|
+
center: this.mergedCenter,
|
|
132363
|
+
zoom: this.mergedZoom,
|
|
132364
|
+
plugins: this.mergedPlugins,
|
|
132365
|
+
securityJsCode: this.mergedSecurityJsCode,
|
|
132366
|
+
tiandituLayerType: this.tiandituLayerType,
|
|
132367
|
+
baiduCoordType: this.baiduCoordType
|
|
132368
|
+
})
|
|
132369
|
+
|
|
132370
|
+
try {
|
|
132371
|
+
await this.adapter.init()
|
|
132372
|
+
this.loading = false
|
|
132373
|
+
|
|
132374
|
+
// 绑定事件
|
|
132375
|
+
this._bindAdapterEvents()
|
|
132376
|
+
|
|
132377
|
+
// 向父组件发出 ready 事件
|
|
132378
|
+
this.$emit('ready', {
|
|
132379
|
+
provider: this.mergedProvider,
|
|
132380
|
+
map: this.adapter.getNativeMap(),
|
|
132381
|
+
adapter: this.adapter
|
|
132382
|
+
})
|
|
132383
|
+
} catch (err) {
|
|
132384
|
+
this.loading = false
|
|
132385
|
+
this.errorMessage = err.message || '地图初始化失败'
|
|
132386
|
+
this.$emit('error', err)
|
|
132387
|
+
}
|
|
132388
|
+
},
|
|
132389
|
+
|
|
132390
|
+
rebuildMap() {
|
|
132391
|
+
this.destroyMap()
|
|
132392
|
+
// 清理脚本缓存,确保新配置能生效(例如切换密钥后重新加载)
|
|
132393
|
+
if (typeof clearScriptCache === 'function') {
|
|
132394
|
+
clearScriptCache()
|
|
132395
|
+
}
|
|
132396
|
+
this.$nextTick(() => this.initMap())
|
|
132397
|
+
},
|
|
132398
|
+
|
|
132399
|
+
destroyMap() {
|
|
132400
|
+
if (this.adapter) {
|
|
132401
|
+
this.adapter.destroy()
|
|
132402
|
+
this.adapter = null
|
|
132403
|
+
}
|
|
132404
|
+
},
|
|
132405
|
+
|
|
132406
|
+
_bindAdapterEvents() {
|
|
132407
|
+
if (!this.adapter) return
|
|
132408
|
+
|
|
132409
|
+
const events = ['click', 'moveend', 'zoomend', 'zoomchange', 'mapmove']
|
|
132410
|
+
events.forEach((evt) => {
|
|
132411
|
+
this.adapter.on(evt, (data) => {
|
|
132412
|
+
this.$emit(evt, data)
|
|
132413
|
+
})
|
|
132414
|
+
})
|
|
132415
|
+
},
|
|
132416
|
+
|
|
132417
|
+
// 对外暴露的统一 API
|
|
132418
|
+
setCenter(center) {
|
|
132419
|
+
if (this.adapter) this.adapter.setCenter(center)
|
|
132420
|
+
},
|
|
132421
|
+
|
|
132422
|
+
setZoom(zoom) {
|
|
132423
|
+
if (this.adapter) this.adapter.setZoom(zoom)
|
|
132424
|
+
},
|
|
132425
|
+
|
|
132426
|
+
setMapType(type) {
|
|
132427
|
+
if (this.adapter) this.adapter.setMapType(type)
|
|
132428
|
+
},
|
|
132429
|
+
|
|
132430
|
+
setTheme(theme) {
|
|
132431
|
+
if (this.adapter) this.adapter.setTheme(theme)
|
|
132432
|
+
},
|
|
132433
|
+
|
|
132434
|
+
getCenter() {
|
|
132435
|
+
return this.adapter ? this.adapter.getCenter() : this.mergedCenter
|
|
132436
|
+
},
|
|
132437
|
+
|
|
132438
|
+
getZoom() {
|
|
132439
|
+
return this.adapter ? this.adapter.getZoom() : this.mergedZoom
|
|
132440
|
+
},
|
|
132441
|
+
|
|
132442
|
+
getNativeMap() {
|
|
132443
|
+
return this.adapter ? this.adapter.getNativeMap() : null
|
|
132444
|
+
},
|
|
132445
|
+
|
|
132446
|
+
resize() {
|
|
132447
|
+
if (this.adapter) this.adapter.resize()
|
|
132448
|
+
},
|
|
132449
|
+
|
|
132450
|
+
on(eventName, handler) {
|
|
132451
|
+
if (this.adapter) this.adapter.on(eventName, handler)
|
|
132452
|
+
},
|
|
132453
|
+
|
|
132454
|
+
off(eventName) {
|
|
132455
|
+
if (this.adapter) this.adapter.off(eventName)
|
|
132456
|
+
},
|
|
132457
|
+
|
|
132458
|
+
rebuild() {
|
|
132459
|
+
this.rebuildMap()
|
|
132460
|
+
}
|
|
132461
|
+
}
|
|
132462
|
+
});
|
|
132463
|
+
|
|
132464
|
+
// CONCATENATED MODULE: ./src/components/xt-map/index.vue?vue&type=script&lang=js
|
|
132465
|
+
/* harmony default export */ var components_xt_mapvue_type_script_lang_js = (xt_mapvue_type_script_lang_js);
|
|
132466
|
+
// CONCATENATED MODULE: ./src/components/xt-map/index.vue
|
|
132467
|
+
|
|
132468
|
+
|
|
132469
|
+
|
|
132470
|
+
|
|
132471
|
+
|
|
132472
|
+
/* normalize component */
|
|
132473
|
+
|
|
132474
|
+
var xt_map_component = normalizeComponent(
|
|
132475
|
+
components_xt_mapvue_type_script_lang_js,
|
|
132476
|
+
xt_mapvue_type_template_id_0c15823e_render,
|
|
132477
|
+
xt_mapvue_type_template_id_0c15823e_staticRenderFns,
|
|
132478
|
+
false,
|
|
132479
|
+
null,
|
|
132480
|
+
null,
|
|
132481
|
+
null
|
|
132482
|
+
|
|
132483
|
+
)
|
|
132484
|
+
|
|
132485
|
+
/* harmony default export */ var xt_map = (xt_map_component.exports);
|
|
132486
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-map/provider.vue?vue&type=template&id=16f243b0&scoped=true
|
|
132487
|
+
var providervue_type_template_id_16f243b0_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{class:['xt-map-provider', { 'xt-map-provider--dark': _vm.mergedTheme === 'dark' }],style:(_vm.wrapperStyle)},[_vm._t("default")],2)
|
|
132488
|
+
}
|
|
132489
|
+
var providervue_type_template_id_16f243b0_scoped_true_staticRenderFns = []
|
|
132490
|
+
|
|
132491
|
+
|
|
132492
|
+
// CONCATENATED MODULE: ./src/components/xt-map/provider.vue?vue&type=template&id=16f243b0&scoped=true
|
|
132493
|
+
|
|
132494
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-map/provider.vue?vue&type=script&lang=js
|
|
132495
|
+
|
|
132496
|
+
|
|
132497
|
+
|
|
132498
|
+
/* harmony default export */ var providervue_type_script_lang_js = ({
|
|
132499
|
+
name: 'XtMapProvider',
|
|
132500
|
+
|
|
132501
|
+
props: {
|
|
132502
|
+
provider: {
|
|
132503
|
+
type: String,
|
|
132504
|
+
default: '',
|
|
132505
|
+
validator: (val) => val === '' || MAP_PROVIDERS.includes(val)
|
|
132506
|
+
},
|
|
132507
|
+
apiKey: {
|
|
132508
|
+
type: String,
|
|
132509
|
+
default: ''
|
|
132510
|
+
},
|
|
132511
|
+
apiUrl: {
|
|
132512
|
+
type: String,
|
|
132513
|
+
default: ''
|
|
132514
|
+
},
|
|
132515
|
+
mapType: {
|
|
132516
|
+
type: String,
|
|
132517
|
+
default: '',
|
|
132518
|
+
validator: (val) => val === '' || MAP_TYPES.includes(val)
|
|
132519
|
+
},
|
|
132520
|
+
theme: {
|
|
132521
|
+
type: String,
|
|
132522
|
+
default: '',
|
|
132523
|
+
validator: (val) => val === '' || MAP_THEMES.includes(val)
|
|
132524
|
+
},
|
|
132525
|
+
center: {
|
|
132526
|
+
type: Array,
|
|
132527
|
+
default: () => null
|
|
132528
|
+
},
|
|
132529
|
+
zoom: {
|
|
132530
|
+
type: Number,
|
|
132531
|
+
default: null
|
|
132532
|
+
},
|
|
132533
|
+
plugins: {
|
|
132534
|
+
type: Array,
|
|
132535
|
+
default: () => []
|
|
132536
|
+
},
|
|
132537
|
+
securityJsCode: {
|
|
132538
|
+
type: String,
|
|
132539
|
+
default: ''
|
|
132540
|
+
},
|
|
132541
|
+
tag: {
|
|
132542
|
+
type: String,
|
|
132543
|
+
default: 'div'
|
|
132544
|
+
}
|
|
132545
|
+
},
|
|
132546
|
+
|
|
132547
|
+
data() {
|
|
132548
|
+
return {
|
|
132549
|
+
mergedTheme: this.theme || getMapTheme() || 'light'
|
|
132550
|
+
}
|
|
132551
|
+
},
|
|
132552
|
+
|
|
132553
|
+
computed: {
|
|
132554
|
+
wrapperStyle() {
|
|
132555
|
+
return {}
|
|
132556
|
+
}
|
|
132557
|
+
},
|
|
132558
|
+
|
|
132559
|
+
watch: {
|
|
132560
|
+
provider: {
|
|
132561
|
+
immediate: true,
|
|
132562
|
+
handler(newVal) {
|
|
132563
|
+
if (newVal) setMapProvider(newVal)
|
|
132564
|
+
}
|
|
132565
|
+
},
|
|
132566
|
+
apiKey: {
|
|
132567
|
+
immediate: true,
|
|
132568
|
+
handler(newVal) {
|
|
132569
|
+
if (newVal) setMapApiKey(newVal)
|
|
132570
|
+
}
|
|
132571
|
+
},
|
|
132572
|
+
apiUrl: {
|
|
132573
|
+
immediate: true,
|
|
132574
|
+
handler(newVal) {
|
|
132575
|
+
if (newVal) setMapApiUrl(newVal)
|
|
132576
|
+
}
|
|
132577
|
+
},
|
|
132578
|
+
mapType: {
|
|
132579
|
+
immediate: true,
|
|
132580
|
+
handler(newVal) {
|
|
132581
|
+
if (newVal) setMapType(newVal)
|
|
132582
|
+
}
|
|
132583
|
+
},
|
|
132584
|
+
theme: {
|
|
132585
|
+
immediate: true,
|
|
132586
|
+
handler(newVal) {
|
|
132587
|
+
if (newVal) {
|
|
132588
|
+
setMapTheme(newVal)
|
|
132589
|
+
this.mergedTheme = newVal
|
|
132590
|
+
}
|
|
132591
|
+
}
|
|
132592
|
+
},
|
|
132593
|
+
center: {
|
|
132594
|
+
immediate: true,
|
|
132595
|
+
handler(newVal) {
|
|
132596
|
+
if (newVal) setMapCenter(newVal)
|
|
132597
|
+
}
|
|
132598
|
+
},
|
|
132599
|
+
zoom: {
|
|
132600
|
+
immediate: true,
|
|
132601
|
+
handler(newVal) {
|
|
132602
|
+
if (newVal !== null && newVal !== undefined) setMapZoom(newVal)
|
|
132603
|
+
}
|
|
132604
|
+
},
|
|
132605
|
+
plugins: {
|
|
132606
|
+
immediate: true,
|
|
132607
|
+
handler(newVal) {
|
|
132608
|
+
if (newVal && newVal.length > 0) setMapPlugins(newVal)
|
|
132609
|
+
}
|
|
132610
|
+
},
|
|
132611
|
+
securityJsCode: {
|
|
132612
|
+
immediate: true,
|
|
132613
|
+
handler(newVal) {
|
|
132614
|
+
if (newVal) setSecurityJsCode(newVal)
|
|
132615
|
+
}
|
|
132616
|
+
}
|
|
132617
|
+
},
|
|
132618
|
+
|
|
132619
|
+
provide() {
|
|
132620
|
+
return {
|
|
132621
|
+
xtMapConfig: {
|
|
132622
|
+
getProvider: () => this.provider || getMapProvider(),
|
|
132623
|
+
getApiKey: () => this.apiKey || getMapApiKey(),
|
|
132624
|
+
getApiUrl: () => this.apiUrl || getMapApiUrl(),
|
|
132625
|
+
getMapType: () => this.mapType || getMapType(),
|
|
132626
|
+
getTheme: () => this.theme || getMapTheme(),
|
|
132627
|
+
getCenter: () => this.center || getMapCenter(),
|
|
132628
|
+
getZoom: () => this.zoom !== null ? this.zoom : getMapZoom(),
|
|
132629
|
+
getPlugins: () => this.plugins.length > 0 ? this.plugins : getMapPlugins(),
|
|
132630
|
+
getConfig: () => ({
|
|
132631
|
+
provider: this.provider || getMapProvider(),
|
|
132632
|
+
apiKey: this.apiKey || getMapApiKey(),
|
|
132633
|
+
apiUrl: this.apiUrl || getMapApiUrl(),
|
|
132634
|
+
mapType: this.mapType || getMapType(),
|
|
132635
|
+
theme: this.theme || getMapTheme(),
|
|
132636
|
+
center: this.center || getMapCenter(),
|
|
132637
|
+
zoom: this.zoom !== null ? this.zoom : getMapZoom()
|
|
132638
|
+
})
|
|
132639
|
+
}
|
|
132640
|
+
}
|
|
132641
|
+
},
|
|
132642
|
+
|
|
132643
|
+
created() {
|
|
132644
|
+
this._unsubscribe = onMapConfigChange((key, value) => {
|
|
132645
|
+
if (key === 'theme') this.mergedTheme = this.theme || value
|
|
132646
|
+
})
|
|
132647
|
+
},
|
|
132648
|
+
|
|
132649
|
+
beforeDestroy() {
|
|
132650
|
+
if (this._unsubscribe) this._unsubscribe()
|
|
132651
|
+
}
|
|
132652
|
+
});
|
|
132653
|
+
|
|
132654
|
+
// CONCATENATED MODULE: ./src/components/xt-map/provider.vue?vue&type=script&lang=js
|
|
132655
|
+
/* harmony default export */ var xt_map_providervue_type_script_lang_js = (providervue_type_script_lang_js);
|
|
132656
|
+
// EXTERNAL MODULE: ./src/components/xt-map/provider.vue?vue&type=style&index=0&id=16f243b0&prod&scoped=true&lang=css
|
|
132657
|
+
var providervue_type_style_index_0_id_16f243b0_prod_scoped_true_lang_css = __webpack_require__("3cef");
|
|
132658
|
+
|
|
132659
|
+
// CONCATENATED MODULE: ./src/components/xt-map/provider.vue
|
|
132660
|
+
|
|
132661
|
+
|
|
132662
|
+
|
|
132663
|
+
|
|
132664
|
+
|
|
132665
|
+
|
|
132666
|
+
/* normalize component */
|
|
132667
|
+
|
|
132668
|
+
var provider_component = normalizeComponent(
|
|
132669
|
+
xt_map_providervue_type_script_lang_js,
|
|
132670
|
+
providervue_type_template_id_16f243b0_scoped_true_render,
|
|
132671
|
+
providervue_type_template_id_16f243b0_scoped_true_staticRenderFns,
|
|
132672
|
+
false,
|
|
132673
|
+
null,
|
|
132674
|
+
"16f243b0",
|
|
132675
|
+
null
|
|
132676
|
+
|
|
132677
|
+
)
|
|
132678
|
+
|
|
132679
|
+
/* harmony default export */ var xt_map_provider = (provider_component.exports);
|
|
132680
|
+
// EXTERNAL MODULE: ./src/components/xt-map/style/index.scss
|
|
132681
|
+
var xt_map_style = __webpack_require__("c759");
|
|
132682
|
+
|
|
132683
|
+
// CONCATENATED MODULE: ./src/components/xt-map/index.js
|
|
132684
|
+
|
|
132685
|
+
|
|
132686
|
+
|
|
132687
|
+
|
|
132688
|
+
xt_map.install = function (Vue) {
|
|
132689
|
+
Vue.component(xt_map.name, xt_map)
|
|
132690
|
+
}
|
|
132691
|
+
|
|
132692
|
+
xt_map_provider.install = function (Vue) {
|
|
132693
|
+
Vue.component(xt_map_provider.name, xt_map_provider)
|
|
132694
|
+
}
|
|
132695
|
+
|
|
132696
|
+
|
|
132697
|
+
|
|
132698
|
+
/* harmony default export */ var components_xt_map = ({
|
|
132699
|
+
install(Vue) {
|
|
132700
|
+
Vue.component(xt_map.name, xt_map)
|
|
132701
|
+
Vue.component(xt_map_provider.name, xt_map_provider)
|
|
132702
|
+
},
|
|
132703
|
+
XtMap: xt_map,
|
|
132704
|
+
XtMapProvider: xt_map_provider
|
|
132705
|
+
});
|
|
132706
|
+
|
|
132707
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-grid-box/index.vue?vue&type=template&id=67e197c4
|
|
130688
132708
|
var xt_grid_boxvue_type_template_id_67e197c4_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-grid-box",style:(_vm.styleAttrs)},[_vm._t("default")],2)
|
|
130689
132709
|
}
|
|
130690
132710
|
var xt_grid_boxvue_type_template_id_67e197c4_staticRenderFns = []
|
|
@@ -130845,10 +132865,16 @@ var xt_grid_box_component = normalizeComponent(
|
|
|
130845
132865
|
|
|
130846
132866
|
/* harmony default export */ var xt_grid_box = (xt_grid_box_component.exports);
|
|
130847
132867
|
// CONCATENATED MODULE: ./src/components/xt-grid-box/index.js
|
|
132868
|
+
|
|
132869
|
+
|
|
132870
|
+
xt_grid_box.install = function (Vue) {
|
|
132871
|
+
Vue.component(xt_grid_box.name, xt_grid_box)
|
|
132872
|
+
}
|
|
132873
|
+
|
|
132874
|
+
/* harmony default export */ var components_xt_grid_box = (xt_grid_box);
|
|
130848
132875
|
|
|
130849
|
-
/* harmony default export */ var components_xt_grid_box = (xt_grid_box);
|
|
130850
132876
|
|
|
130851
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
132877
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-grid-item/index.vue?vue&type=template&id=5318efc6&scoped=true
|
|
130852
132878
|
var xt_grid_itemvue_type_template_id_5318efc6_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-grid-item",style:(_vm.styleAttrs)},[_vm._t("default")],2)
|
|
130853
132879
|
}
|
|
130854
132880
|
var xt_grid_itemvue_type_template_id_5318efc6_scoped_true_staticRenderFns = []
|
|
@@ -130980,8 +133006,15 @@ var xt_grid_item_component = normalizeComponent(
|
|
|
130980
133006
|
/* harmony default export */ var xt_grid_item = (xt_grid_item_component.exports);
|
|
130981
133007
|
// CONCATENATED MODULE: ./src/components/xt-grid-item/index.js
|
|
130982
133008
|
|
|
133009
|
+
|
|
133010
|
+
xt_grid_item.install = function (Vue) {
|
|
133011
|
+
Vue.component(xt_grid_item.name, xt_grid_item)
|
|
133012
|
+
}
|
|
133013
|
+
|
|
130983
133014
|
/* harmony default export */ var components_xt_grid_item = (xt_grid_item);
|
|
130984
|
-
|
|
133015
|
+
|
|
133016
|
+
|
|
133017
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-date-picker/index.vue?vue&type=template&id=ff20c256&scoped=true
|
|
130985
133018
|
var ex_date_pickervue_type_template_id_ff20c256_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticStyle:{"display":"inline-block"}},[(_vm.dateType=='quarter')?_c('FlexBox',{staticClass:"xt-date-picker",class:{focus: _vm.isfocus},style:(_vm.width?{width: `${_vm.width}px`}:{}),attrs:{"type":"inline-flex"}},[_c('Quarter',{attrs:{"format":_vm.format,"placeholder":"开始时间","quarter-type":"quarter-start","clearable":""},model:{value:(_vm.timeStart),callback:function ($$v) {_vm.timeStart=$$v},expression:"timeStart"}}),_c('span',{staticClass:"separator"},[_vm._v(_vm._s(_vm.separator))]),_c('Quarter',{attrs:{"format":_vm.format,"placeholder":"结束时间","quarter-type":"quarter-end","clearable":""},model:{value:(_vm.timeEnd),callback:function ($$v) {_vm.timeEnd=$$v},expression:"timeEnd"}})],1):_c('FlexBox',{staticClass:"xt-date",class:{focus: _vm.isfocus},style:(_vm.width?{width: `${_vm.width}px`}:{}),attrs:{"type":"inline-flex"}},[_c('el-date-picker',{key:"startSelect",ref:"timeStart",attrs:{"size":"small","disabled":_vm.disabled,"append-to-body":"","picker-options":_vm.startTimeRange,"format":_vm.format,"type":_vm.dateType,"placeholder":"开始时间","clearable":""},on:{"blur":function($event){return _vm.$emit('blur')},"focus":function($event){return _vm.$emit('focus')}},model:{value:(_vm.timeStart),callback:function ($$v) {_vm.timeStart=$$v},expression:"timeStart"}}),_c('span',{staticClass:"separator"},[_vm._v(_vm._s(_vm.separator))]),_c('el-date-picker',{key:"endSelect",ref:"timeEnd",attrs:{"size":"small","disabled":_vm.disabled,"append-to-body":"","picker-options":_vm.endTimeRange,"format":_vm.format,"type":_vm.dateType,"placeholder":"结束时间","clearable":""},on:{"blur":function($event){return _vm.$emit('blur')},"focus":function($event){return _vm.$emit('focus')}},model:{value:(_vm.timeEnd),callback:function ($$v) {_vm.timeEnd=$$v},expression:"timeEnd"}})],1)],1)
|
|
130986
133019
|
}
|
|
130987
133020
|
var ex_date_pickervue_type_template_id_ff20c256_scoped_true_staticRenderFns = []
|
|
@@ -130989,7 +133022,7 @@ var ex_date_pickervue_type_template_id_ff20c256_scoped_true_staticRenderFns = []
|
|
|
130989
133022
|
|
|
130990
133023
|
// CONCATENATED MODULE: ./src/components/ex-date-picker/index.vue?vue&type=template&id=ff20c256&scoped=true
|
|
130991
133024
|
|
|
130992
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
133025
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-date-picker/quarter.vue?vue&type=template&id=39ae9f5e
|
|
130993
133026
|
var quartervue_type_template_id_39ae9f5e_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-popover',{attrs:{"trigger":"click","disabled":_vm.disabled,"transition":"el-zoom-in-top","placement":_vm.placement,"width":_vm.popoverWidth},on:{"hide":_vm.handleBlur},model:{value:(_vm.popoverVisible),callback:function ($$v) {_vm.popoverVisible=$$v},expression:"popoverVisible"}},[_c('div',{staticClass:"quarter-wrapper"},[_c('BaseFlexBox',{attrs:{"content":"between"}},[_c('i',{staticClass:"el-icon-d-arrow-left",on:{"click":_vm.prev}}),_c('span',[_vm._v(_vm._s(_vm.selectYear))]),_c('i',{staticClass:"el-icon-d-arrow-right",on:{"click":_vm.after}})]),_c('BaseFlexBox',{staticStyle:{"margin-top":"10px"},attrs:{"content":"between"}},_vm._l((_vm.quarterList),function(item){return _c('el-button',{key:item.value,attrs:{"disabled":_vm.getDisable(item),"type":_vm.currentyear==_vm.selectYear&&item.value == _vm.currentQuarter ?'primary':'',"size":"mini","round":""},on:{"click":function($event){return _vm.setCurrent(item)}}},[_vm._v(_vm._s(item.label))])}),1)],1),_c('el-input',{ref:"reference",attrs:{"slot":"reference","size":"small","value":_vm.quarterLabel,"readonly":"","title":_vm.value,"placeholder":_vm.placeholder,"prefix-icon":"el-icon-date","clearable":""},slot:"reference"})],1)
|
|
130994
133027
|
}
|
|
130995
133028
|
var quartervue_type_template_id_39ae9f5e_staticRenderFns = []
|
|
@@ -131275,9 +133308,16 @@ var ex_date_picker_component = normalizeComponent(
|
|
|
131275
133308
|
|
|
131276
133309
|
/* harmony default export */ var ex_date_picker = (ex_date_picker_component.exports);
|
|
131277
133310
|
// CONCATENATED MODULE: ./src/components/ex-date-picker/index.js
|
|
131278
|
-
|
|
133311
|
+
|
|
133312
|
+
|
|
133313
|
+
ex_date_picker.install = function (Vue) {
|
|
133314
|
+
Vue.component(ex_date_picker.name, ex_date_picker)
|
|
133315
|
+
}
|
|
133316
|
+
|
|
131279
133317
|
/* harmony default export */ var components_ex_date_picker = (ex_date_picker);
|
|
131280
|
-
|
|
133318
|
+
|
|
133319
|
+
|
|
133320
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-button/index.vue?vue&type=template&id=1b7e9238
|
|
131281
133321
|
var ex_buttonvue_type_template_id_1b7e9238_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-button',_vm._b({staticClass:"ex-button",class:_vm.buttonClasses,on:{"click":_vm.handleClick}},'el-button',_vm.$attrs,false),[_vm._t("default")],2)
|
|
131282
133322
|
}
|
|
131283
133323
|
var ex_buttonvue_type_template_id_1b7e9238_staticRenderFns = []
|
|
@@ -131366,9 +133406,16 @@ var ex_button_component = normalizeComponent(
|
|
|
131366
133406
|
|
|
131367
133407
|
/* harmony default export */ var ex_button = (ex_button_component.exports);
|
|
131368
133408
|
// CONCATENATED MODULE: ./src/components/ex-button/index.js
|
|
131369
|
-
|
|
133409
|
+
|
|
133410
|
+
|
|
133411
|
+
ex_button.install = function (Vue) {
|
|
133412
|
+
Vue.component(ex_button.name, ex_button)
|
|
133413
|
+
}
|
|
133414
|
+
|
|
131370
133415
|
/* harmony default export */ var components_ex_button = (ex_button);
|
|
131371
|
-
|
|
133416
|
+
|
|
133417
|
+
|
|
133418
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/index.vue?vue&type=template&id=9a31abde
|
|
131372
133419
|
var ex_chartvue_type_template_id_9a31abde_render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.type=='bar')?_c('ex-bar',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-bar',_vm.$attrs,false)):(_vm.type=='line')?_c('ex-line',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-line',_vm.$attrs,false)):(_vm.type=='pie')?_c('ex-pie',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-pie',_vm.$attrs,false)):(_vm.type=='multi')?_c('ex-multi',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-multi',_vm.$attrs,false)):_vm._e()
|
|
131373
133420
|
}
|
|
131374
133421
|
var ex_chartvue_type_template_id_9a31abde_staticRenderFns = []
|
|
@@ -131376,7 +133423,7 @@ var ex_chartvue_type_template_id_9a31abde_staticRenderFns = []
|
|
|
131376
133423
|
|
|
131377
133424
|
// CONCATENATED MODULE: ./src/components/ex-chart/index.vue?vue&type=template&id=9a31abde
|
|
131378
133425
|
|
|
131379
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
133426
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/ExBar.vue?vue&type=template&id=06ad80ef&scoped=true
|
|
131380
133427
|
var ExBarvue_type_template_id_06ad80ef_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"barchart",staticClass:"bar-box"})
|
|
131381
133428
|
}
|
|
131382
133429
|
var ExBarvue_type_template_id_06ad80ef_scoped_true_staticRenderFns = []
|
|
@@ -131613,7 +133660,7 @@ var ExBar_component = normalizeComponent(
|
|
|
131613
133660
|
)
|
|
131614
133661
|
|
|
131615
133662
|
/* harmony default export */ var ExBar = (ExBar_component.exports);
|
|
131616
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
133663
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/ExLine.vue?vue&type=template&id=358cb278&scoped=true
|
|
131617
133664
|
var ExLinevue_type_template_id_358cb278_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"linechart",staticClass:"line-box"})
|
|
131618
133665
|
}
|
|
131619
133666
|
var ExLinevue_type_template_id_358cb278_scoped_true_staticRenderFns = []
|
|
@@ -131796,7 +133843,7 @@ var ExLine_component = normalizeComponent(
|
|
|
131796
133843
|
)
|
|
131797
133844
|
|
|
131798
133845
|
/* harmony default export */ var ExLine = (ExLine_component.exports);
|
|
131799
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
133846
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/ExPie.vue?vue&type=template&id=ee1d466e&scoped=true
|
|
131800
133847
|
var ExPievue_type_template_id_ee1d466e_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"piechart",staticClass:"pie-box"})
|
|
131801
133848
|
}
|
|
131802
133849
|
var ExPievue_type_template_id_ee1d466e_scoped_true_staticRenderFns = []
|
|
@@ -131988,7 +134035,7 @@ var ExPie_component = normalizeComponent(
|
|
|
131988
134035
|
)
|
|
131989
134036
|
|
|
131990
134037
|
/* harmony default export */ var ExPie = (ExPie_component.exports);
|
|
131991
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
134038
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/ExMulti.vue?vue&type=template&id=6d9e7e44&scoped=true
|
|
131992
134039
|
var ExMultivue_type_template_id_6d9e7e44_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"multilinechart",staticClass:"multiline-box"})
|
|
131993
134040
|
}
|
|
131994
134041
|
var ExMultivue_type_template_id_6d9e7e44_scoped_true_staticRenderFns = []
|
|
@@ -132422,9 +134469,15 @@ var ex_chart_component = normalizeComponent(
|
|
|
132422
134469
|
/* harmony default export */ var ex_chart = (ex_chart_component.exports);
|
|
132423
134470
|
// CONCATENATED MODULE: ./src/components/ex-chart/index.js
|
|
132424
134471
|
|
|
134472
|
+
|
|
134473
|
+
ex_chart.install = function (Vue) {
|
|
134474
|
+
Vue.component(ex_chart.name, ex_chart)
|
|
134475
|
+
}
|
|
134476
|
+
|
|
132425
134477
|
/* harmony default export */ var components_ex_chart = (ex_chart);
|
|
134478
|
+
|
|
132426
134479
|
|
|
132427
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
134480
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-card/index.vue?vue&type=template&id=0d381618
|
|
132428
134481
|
var ex_cardvue_type_template_id_0d381618_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-card',_vm._b({staticClass:"ex-card",class:_vm.cardClasses,scopedSlots:_vm._u([(_vm.$slots.header || _vm.title)?{key:"header",fn:function(){return [_vm._t("header",function(){return [_vm._v(_vm._s(_vm.title))]})]},proxy:true}:null],null,true)},'el-card',_vm.$attrs,false),[_vm._t("default")],2)
|
|
132429
134482
|
}
|
|
132430
134483
|
var ex_cardvue_type_template_id_0d381618_staticRenderFns = []
|
|
@@ -132519,7 +134572,7 @@ ex_card.install = function (Vue) {
|
|
|
132519
134572
|
|
|
132520
134573
|
/* harmony default export */ var components_ex_card = (ex_card);
|
|
132521
134574
|
|
|
132522
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
134575
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-icon/index.vue?vue&type=template&id=01397354&scoped=true
|
|
132523
134576
|
var ex_iconvue_type_template_id_01397354_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c(_vm.tag,_vm._g({tag:"component",class:_vm.iconClasses,style:(_vm.iconStyle),on:{"click":_vm.handleClick}},_vm.$listeners),[(_vm.isSvgSprite)?_c('svg',{style:(_vm.svgStyle),attrs:{"aria-hidden":"true"}},[_c('use',{attrs:{"href":_vm.svgHref}})]):(_vm.hasDefaultSlot)?_vm._t("default"):_vm._e()],2)
|
|
132524
134577
|
}
|
|
132525
134578
|
var ex_iconvue_type_template_id_01397354_scoped_true_staticRenderFns = []
|
|
@@ -132690,9 +134743,15 @@ var ex_icon_component = normalizeComponent(
|
|
|
132690
134743
|
/* harmony default export */ var ex_icon = (ex_icon_component.exports);
|
|
132691
134744
|
// CONCATENATED MODULE: ./src/components/ex-icon/index.js
|
|
132692
134745
|
|
|
134746
|
+
|
|
134747
|
+
ex_icon.install = function (Vue) {
|
|
134748
|
+
Vue.component(ex_icon.name, ex_icon)
|
|
134749
|
+
}
|
|
134750
|
+
|
|
132693
134751
|
/* harmony default export */ var components_ex_icon = (ex_icon);
|
|
134752
|
+
|
|
132694
134753
|
|
|
132695
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
134754
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-table/index.vue?vue&type=template&id=1833f458&scoped=true
|
|
132696
134755
|
var ex_tablevue_type_template_id_1833f458_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"ex-table-wrapper"},[(_vm.title || _vm.$slots.toolbar)?_c('div',{staticClass:"ex-table-header"},[(_vm.title)?_c('span',{staticClass:"ex-table-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_c('div',{staticClass:"ex-table-toolbar"},[_vm._t("toolbar")],2)]):_vm._e(),_c('div',{staticClass:"ex-table-body"},[_c('VirtualElTable',_vm._g(_vm._b({ref:"table",staticClass:"ex-table",attrs:{"data":_vm.processedTableData,"height":_vm.computedHeight,"max-height":_vm.computedMaxHeight,"virtual-scroll":_vm.virtualScroll,"row-height":_vm.rowInitHeight,"buffer-size":_vm.bufferSize,"span-method":_vm.groupColumns.length ? _vm.handleSpanMethod : undefined,"row-class-name":_vm.getRowClassName},on:{"selection-change":_vm.handleSelectionChange,"sort-change":_vm.handleSortChange}},'VirtualElTable',_vm.$attrs,false),_vm.$listeners),[(_vm.selection)?_c('el-table-column',{attrs:{"type":"selection","width":"55","fixed":_vm.selectionFixed}}):_vm._e(),(_vm.showIndex)?_c('el-table-column',{attrs:{"type":"index","width":"60","label":"#","fixed":_vm.indexFixed,"index":_vm.indexMethod}}):_vm._e(),_vm._l((_vm.flattenedColumns),function(col){return [(col.children && col.children.length)?_c('el-table-column',_vm._b({key:col._key},'el-table-column',_vm.getColumnProps(col),false),[_vm._l((col.children),function(child){return [_c('el-table-column',_vm._b({key:child._key,scopedSlots:_vm._u([(child.render)?{key:"default",fn:function(scope){return [_vm._v(_vm._s(child.render(scope)))]}}:(child.formatter)?{key:"default",fn:function(scope){return [_c('ExTableCell',{attrs:{"row":scope.row,"index":scope.$index,"formatter":child.formatter,"column":child}})]}}:(child.slot)?{key:"default",fn:function(scope){return [_vm._t(child.slot,null,{"row":scope.row,"index":scope.$index,"column":child})]}}:null],null,true)},'el-table-column',_vm.getColumnProps(child),false))]})],2):_c('el-table-column',_vm._b({key:col._key,scopedSlots:_vm._u([(col.render)?{key:"default",fn:function(scope){return [_vm._v(_vm._s(col.render(scope)))]}}:(col.formatter)?{key:"default",fn:function(scope){return [_c('ExTableCell',{attrs:{"row":scope.row,"index":scope.$index,"formatter":col.formatter,"column":col}})]}}:(col.slot)?{key:"default",fn:function(scope){return [_vm._t(col.slot,null,{"row":scope.row,"index":scope.$index,"column":col})]}}:null],null,true)},'el-table-column',_vm.getColumnProps(col),false))]})],2)],1),(_vm.showPagination)?_c('div',{staticClass:"ex-table-footer"},[_c('el-pagination',{attrs:{"current-page":_vm.pagination.ppageNum,"page-size":_vm.pagination.pageSize,"total":_vm.total,"page-sizes":_vm.pagination.pageSizes || [10, 20, 50, 100],"layout":"total, sizes, prev, pager, next, jumper"},on:{"size-change":_vm.handleSizeChange,"current-change":_vm.handleCurrentChange}})],1):_vm._e()])
|
|
132697
134756
|
}
|
|
132698
134757
|
var ex_tablevue_type_template_id_1833f458_scoped_true_staticRenderFns = []
|
|
@@ -132746,7 +134805,7 @@ var ExTableCell_component = normalizeComponent(
|
|
|
132746
134805
|
)
|
|
132747
134806
|
|
|
132748
134807
|
/* harmony default export */ var ExTableCell = (ExTableCell_component.exports);
|
|
132749
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
134808
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7073014a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-table/VirtualElTable.vue?vue&type=template&id=5eb34e1c&scoped=true
|
|
132750
134809
|
var VirtualElTablevue_type_template_id_5eb34e1c_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-table',_vm._g(_vm._b({ref:"innerTable",attrs:{"data":_vm.renderList}},'el-table',_vm.$attrs,false),_vm.$listeners),[_vm._t("default")],2)
|
|
132751
134810
|
}
|
|
132752
134811
|
var VirtualElTablevue_type_template_id_5eb34e1c_scoped_true_staticRenderFns = []
|
|
@@ -133348,7 +135407,13 @@ var ex_table_component = normalizeComponent(
|
|
|
133348
135407
|
/* harmony default export */ var ex_table = (ex_table_component.exports);
|
|
133349
135408
|
// CONCATENATED MODULE: ./src/components/ex-table/index.js
|
|
133350
135409
|
|
|
135410
|
+
|
|
135411
|
+
ex_table.install = function (Vue) {
|
|
135412
|
+
Vue.component(ex_table.name, ex_table)
|
|
135413
|
+
}
|
|
135414
|
+
|
|
133351
135415
|
/* harmony default export */ var components_ex_table = (ex_table);
|
|
135416
|
+
|
|
133352
135417
|
|
|
133353
135418
|
// CONCATENATED MODULE: ./src/config/element-registry.js
|
|
133354
135419
|
/**
|
|
@@ -133557,6 +135622,8 @@ const { getConfig: src_getConfig, setConfig: src_setConfig, getTheme: src_getThe
|
|
|
133557
135622
|
|
|
133558
135623
|
|
|
133559
135624
|
|
|
135625
|
+
|
|
135626
|
+
|
|
133560
135627
|
// ExChart 组件(基于 ECharts 封装)
|
|
133561
135628
|
|
|
133562
135629
|
// ExIcon 组件(支持 el-icon / svg / 自定义字体)
|
|
@@ -133577,6 +135644,8 @@ const src_components = [
|
|
|
133577
135644
|
components_xt_time,
|
|
133578
135645
|
components_xt_step_price,
|
|
133579
135646
|
components_xt_step_price_item,
|
|
135647
|
+
components_xt_map,
|
|
135648
|
+
xt_map_provider,
|
|
133580
135649
|
components_xt_grid_box,
|
|
133581
135650
|
components_xt_grid_item,
|
|
133582
135651
|
components_ex_date_picker,
|
|
@@ -133657,6 +135726,8 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
133657
135726
|
XtTime: components_xt_time,
|
|
133658
135727
|
XtStepPrice: components_xt_step_price,
|
|
133659
135728
|
XtStepPriceItem: components_xt_step_price_item,
|
|
135729
|
+
XtMap: components_xt_map,
|
|
135730
|
+
XtMapProvider: xt_map_provider,
|
|
133660
135731
|
XtGridBox: components_xt_grid_box,
|
|
133661
135732
|
XtGridItem: components_xt_grid_item,
|
|
133662
135733
|
ExDatePicker: components_ex_date_picker,
|