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.common.js
CHANGED
|
@@ -115,6 +115,13 @@ function isThisHour (dirtyDate) {
|
|
|
115
115
|
module.exports = isThisHour
|
|
116
116
|
|
|
117
117
|
|
|
118
|
+
/***/ }),
|
|
119
|
+
|
|
120
|
+
/***/ "033d":
|
|
121
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
122
|
+
|
|
123
|
+
// extracted by mini-css-extract-plugin
|
|
124
|
+
|
|
118
125
|
/***/ }),
|
|
119
126
|
|
|
120
127
|
/***/ "0918":
|
|
@@ -121233,6 +121240,17 @@ function startOfToday () {
|
|
|
121233
121240
|
module.exports = startOfToday
|
|
121234
121241
|
|
|
121235
121242
|
|
|
121243
|
+
/***/ }),
|
|
121244
|
+
|
|
121245
|
+
/***/ "3cef":
|
|
121246
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
121247
|
+
|
|
121248
|
+
"use strict";
|
|
121249
|
+
/* 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");
|
|
121250
|
+
/* 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__);
|
|
121251
|
+
/* unused harmony reexport * */
|
|
121252
|
+
|
|
121253
|
+
|
|
121236
121254
|
/***/ }),
|
|
121237
121255
|
|
|
121238
121256
|
/***/ "3eee":
|
|
@@ -126155,6 +126173,13 @@ function isSameSecond (dirtyDateLeft, dirtyDateRight) {
|
|
|
126155
126173
|
module.exports = isSameSecond
|
|
126156
126174
|
|
|
126157
126175
|
|
|
126176
|
+
/***/ }),
|
|
126177
|
+
|
|
126178
|
+
/***/ "c759":
|
|
126179
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
126180
|
+
|
|
126181
|
+
// extracted by mini-css-extract-plugin
|
|
126182
|
+
|
|
126158
126183
|
/***/ }),
|
|
126159
126184
|
|
|
126160
126185
|
/***/ "c7ce":
|
|
@@ -128922,7 +128947,7 @@ const onConfigChange = function(listener) {
|
|
|
128922
128947
|
onConfigChange
|
|
128923
128948
|
});
|
|
128924
128949
|
|
|
128925
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
128950
|
+
// 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
|
|
128926
128951
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('button',{staticClass:"xt-button",class:[
|
|
128927
128952
|
_vm.type ? 'xt-button--' + _vm.type : '',
|
|
128928
128953
|
_vm.size ? 'xt-button--' + _vm.size : '',
|
|
@@ -129134,9 +129159,16 @@ var component = normalizeComponent(
|
|
|
129134
129159
|
|
|
129135
129160
|
/* harmony default export */ var xt_button = (component.exports);
|
|
129136
129161
|
// CONCATENATED MODULE: ./src/components/xt-button/index.js
|
|
129137
|
-
|
|
129162
|
+
|
|
129163
|
+
|
|
129164
|
+
xt_button.install = function (Vue) {
|
|
129165
|
+
Vue.component(xt_button.name, xt_button)
|
|
129166
|
+
}
|
|
129167
|
+
|
|
129138
129168
|
/* harmony default export */ var components_xt_button = (xt_button);
|
|
129139
|
-
|
|
129169
|
+
|
|
129170
|
+
|
|
129171
|
+
// 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
|
|
129140
129172
|
var xt_inputvue_type_template_id_69bd5491_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-input",class:[
|
|
129141
129173
|
_vm.size ? 'xt-input--' + _vm.size : '',
|
|
129142
129174
|
{ 'is-disabled': _vm.disabled }
|
|
@@ -129213,9 +129245,16 @@ var xt_input_component = normalizeComponent(
|
|
|
129213
129245
|
|
|
129214
129246
|
/* harmony default export */ var xt_input = (xt_input_component.exports);
|
|
129215
129247
|
// CONCATENATED MODULE: ./src/components/xt-input/index.js
|
|
129216
|
-
|
|
129248
|
+
|
|
129249
|
+
|
|
129250
|
+
xt_input.install = function (Vue) {
|
|
129251
|
+
Vue.component(xt_input.name, xt_input)
|
|
129252
|
+
}
|
|
129253
|
+
|
|
129217
129254
|
/* harmony default export */ var components_xt_input = (xt_input);
|
|
129218
|
-
|
|
129255
|
+
|
|
129256
|
+
|
|
129257
|
+
// 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
|
|
129219
129258
|
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)
|
|
129220
129259
|
}
|
|
129221
129260
|
var xt_flex_boxvue_type_template_id_21429280_staticRenderFns = []
|
|
@@ -129275,9 +129314,16 @@ var xt_flex_box_component = normalizeComponent(
|
|
|
129275
129314
|
|
|
129276
129315
|
/* harmony default export */ var xt_flex_box = (xt_flex_box_component.exports);
|
|
129277
129316
|
// CONCATENATED MODULE: ./src/components/xt-flex-box/index.js
|
|
129278
|
-
|
|
129317
|
+
|
|
129318
|
+
|
|
129319
|
+
xt_flex_box.install = function (Vue) {
|
|
129320
|
+
Vue.component(xt_flex_box.name, xt_flex_box)
|
|
129321
|
+
}
|
|
129322
|
+
|
|
129279
129323
|
/* harmony default export */ var components_xt_flex_box = (xt_flex_box);
|
|
129280
|
-
|
|
129324
|
+
|
|
129325
|
+
|
|
129326
|
+
// 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
|
|
129281
129327
|
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)])
|
|
129282
129328
|
}
|
|
129283
129329
|
var xt_cardvue_type_template_id_bc9ed1fa_staticRenderFns = []
|
|
@@ -129323,9 +129369,16 @@ var xt_card_component = normalizeComponent(
|
|
|
129323
129369
|
|
|
129324
129370
|
/* harmony default export */ var xt_card = (xt_card_component.exports);
|
|
129325
129371
|
// CONCATENATED MODULE: ./src/components/xt-card/index.js
|
|
129326
|
-
|
|
129372
|
+
|
|
129373
|
+
|
|
129374
|
+
xt_card.install = function (Vue) {
|
|
129375
|
+
Vue.component(xt_card.name, xt_card)
|
|
129376
|
+
}
|
|
129377
|
+
|
|
129327
129378
|
/* harmony default export */ var components_xt_card = (xt_card);
|
|
129328
|
-
|
|
129379
|
+
|
|
129380
|
+
|
|
129381
|
+
// 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
|
|
129329
129382
|
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)
|
|
129330
129383
|
}
|
|
129331
129384
|
var xt_card_itemvue_type_template_id_1e46df45_staticRenderFns = []
|
|
@@ -129373,8 +129426,15 @@ var xt_card_item_component = normalizeComponent(
|
|
|
129373
129426
|
|
|
129374
129427
|
/* harmony default export */ var xt_card_item = (xt_card_item_component.exports);
|
|
129375
129428
|
// CONCATENATED MODULE: ./src/components/xt-card-item/index.js
|
|
129376
|
-
|
|
129429
|
+
|
|
129430
|
+
|
|
129431
|
+
xt_card_item.install = function (Vue) {
|
|
129432
|
+
Vue.component(xt_card_item.name, xt_card_item)
|
|
129433
|
+
}
|
|
129434
|
+
|
|
129377
129435
|
/* harmony default export */ var components_xt_card_item = (xt_card_item);
|
|
129436
|
+
|
|
129437
|
+
|
|
129378
129438
|
// 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
|
|
129379
129439
|
|
|
129380
129440
|
|
|
@@ -129758,9 +129818,15 @@ var xt_config_provider_component = normalizeComponent(
|
|
|
129758
129818
|
/* harmony default export */ var xt_config_provider = (xt_config_provider_component.exports);
|
|
129759
129819
|
// CONCATENATED MODULE: ./src/components/xt-config-provider/index.js
|
|
129760
129820
|
|
|
129821
|
+
|
|
129822
|
+
xt_config_provider.install = function (Vue) {
|
|
129823
|
+
Vue.component(xt_config_provider.name, xt_config_provider)
|
|
129824
|
+
}
|
|
129825
|
+
|
|
129761
129826
|
/* harmony default export */ var components_xt_config_provider = (xt_config_provider);
|
|
129827
|
+
|
|
129762
129828
|
|
|
129763
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
129829
|
+
// 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
|
|
129764
129830
|
var xt_textvue_type_template_id_7df75bea_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-text",class:[
|
|
129765
129831
|
_vm.type ? 'xt-text--' + _vm.type : '',
|
|
129766
129832
|
'xt-text--' + _vm.size,
|
|
@@ -129932,9 +129998,16 @@ var xt_text_component = normalizeComponent(
|
|
|
129932
129998
|
|
|
129933
129999
|
/* harmony default export */ var xt_text = (xt_text_component.exports);
|
|
129934
130000
|
// CONCATENATED MODULE: ./src/components/xt-text/index.js
|
|
129935
|
-
|
|
130001
|
+
|
|
130002
|
+
|
|
130003
|
+
xt_text.install = function (Vue) {
|
|
130004
|
+
Vue.component(xt_text.name, xt_text)
|
|
130005
|
+
}
|
|
130006
|
+
|
|
129936
130007
|
/* harmony default export */ var components_xt_text = (xt_text);
|
|
129937
|
-
|
|
130008
|
+
|
|
130009
|
+
|
|
130010
|
+
// 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
|
|
129938
130011
|
var xt_timevue_type_template_id_d29acf2c_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-time",class:[
|
|
129939
130012
|
_vm.typeColor ? 'xt-time--' + _vm.typeColor : '',
|
|
129940
130013
|
'xt-time--' + _vm.size,
|
|
@@ -130247,9 +130320,15 @@ var xt_time_component = normalizeComponent(
|
|
|
130247
130320
|
/* harmony default export */ var xt_time = (xt_time_component.exports);
|
|
130248
130321
|
// CONCATENATED MODULE: ./src/components/xt-time/index.js
|
|
130249
130322
|
|
|
130323
|
+
|
|
130324
|
+
xt_time.install = function (Vue) {
|
|
130325
|
+
Vue.component(xt_time.name, xt_time)
|
|
130326
|
+
}
|
|
130327
|
+
|
|
130250
130328
|
/* harmony default export */ var components_xt_time = (xt_time);
|
|
130329
|
+
|
|
130251
130330
|
|
|
130252
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
130331
|
+
// 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
|
|
130253
130332
|
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()])
|
|
130254
130333
|
}
|
|
130255
130334
|
var xt_step_pricevue_type_template_id_1fb68540_staticRenderFns = []
|
|
@@ -130257,13 +130336,13 @@ var xt_step_pricevue_type_template_id_1fb68540_staticRenderFns = []
|
|
|
130257
130336
|
|
|
130258
130337
|
// CONCATENATED MODULE: ./src/components/xt-step-price/index.vue?vue&type=template&id=1fb68540
|
|
130259
130338
|
|
|
130260
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
130261
|
-
var
|
|
130339
|
+
// 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
|
|
130340
|
+
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)
|
|
130262
130341
|
}
|
|
130263
|
-
var
|
|
130342
|
+
var xt_step_price_itemvue_type_template_id_0606a780_staticRenderFns = []
|
|
130264
130343
|
|
|
130265
130344
|
|
|
130266
|
-
// CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=template&id=
|
|
130345
|
+
// CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=template&id=0606a780
|
|
130267
130346
|
|
|
130268
130347
|
// 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
|
|
130269
130348
|
|
|
@@ -130304,7 +130383,7 @@ var xt_step_price_itemvue_type_template_id_ad5d83ae_staticRenderFns = []
|
|
|
130304
130383
|
keyPrice() { return (this.fieldKeys && this.fieldKeys.price) || 'price' },
|
|
130305
130384
|
finalRightBracket() {
|
|
130306
130385
|
if (this.rightBracket !== null && this.rightBracket !== undefined && this.rightBracket !== '') return this.rightBracket
|
|
130307
|
-
return this.
|
|
130386
|
+
return this.isLast ? ']' : ')'
|
|
130308
130387
|
},
|
|
130309
130388
|
finalLeftBracket() {
|
|
130310
130389
|
return (this.leftBracket === null || this.leftBracket === undefined) ? '[' : this.leftBracket
|
|
@@ -130415,8 +130494,8 @@ var xt_step_price_itemvue_type_template_id_ad5d83ae_staticRenderFns = []
|
|
|
130415
130494
|
|
|
130416
130495
|
var xt_step_price_item_component = normalizeComponent(
|
|
130417
130496
|
components_xt_step_price_itemvue_type_script_lang_js,
|
|
130418
|
-
|
|
130419
|
-
|
|
130497
|
+
xt_step_price_itemvue_type_template_id_0606a780_render,
|
|
130498
|
+
xt_step_price_itemvue_type_template_id_0606a780_staticRenderFns,
|
|
130420
130499
|
false,
|
|
130421
130500
|
null,
|
|
130422
130501
|
null,
|
|
@@ -130669,13 +130748,1954 @@ var xt_step_price_component = normalizeComponent(
|
|
|
130669
130748
|
/* harmony default export */ var xt_step_price = (xt_step_price_component.exports);
|
|
130670
130749
|
// CONCATENATED MODULE: ./src/components/xt-step-price/index.js
|
|
130671
130750
|
|
|
130751
|
+
|
|
130752
|
+
|
|
130753
|
+
xt_step_price.install = function (Vue) {
|
|
130754
|
+
Vue.component(xt_step_price.name, xt_step_price)
|
|
130755
|
+
Vue.component(xt_step_price_item.name, xt_step_price_item)
|
|
130756
|
+
}
|
|
130757
|
+
|
|
130758
|
+
// 同时导出组件和 install 方法,支持多种引入方式
|
|
130672
130759
|
/* harmony default export */ var components_xt_step_price = (xt_step_price);
|
|
130673
130760
|
|
|
130674
130761
|
// CONCATENATED MODULE: ./src/components/xt-step-price-item/index.js
|
|
130675
130762
|
|
|
130763
|
+
|
|
130764
|
+
xt_step_price_item.install = function (Vue) {
|
|
130765
|
+
Vue.component(xt_step_price_item.name, xt_step_price_item)
|
|
130766
|
+
}
|
|
130767
|
+
|
|
130676
130768
|
/* harmony default export */ var components_xt_step_price_item = (xt_step_price_item);
|
|
130677
130769
|
|
|
130678
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
130770
|
+
// 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
|
|
130771
|
+
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)
|
|
130772
|
+
}
|
|
130773
|
+
var xt_mapvue_type_template_id_0c15823e_staticRenderFns = []
|
|
130774
|
+
|
|
130775
|
+
|
|
130776
|
+
// CONCATENATED MODULE: ./src/components/xt-map/index.vue?vue&type=template&id=0c15823e
|
|
130777
|
+
|
|
130778
|
+
// CONCATENATED MODULE: ./src/components/xt-map/loaders/script-loader.js
|
|
130779
|
+
/**
|
|
130780
|
+
* 动态脚本加载器
|
|
130781
|
+
* 负责动态注入地图 SDK <script> 标签,并返回 Promise
|
|
130782
|
+
* 同一 URL 只会加载一次,缓存已加载的结果
|
|
130783
|
+
*/
|
|
130784
|
+
|
|
130785
|
+
const loadedScripts = new Map() // URL -> Promise
|
|
130786
|
+
const loadingScripts = new Map() // URL -> Promise (正在加载中)
|
|
130787
|
+
|
|
130788
|
+
/**
|
|
130789
|
+
* 动态加载单个脚本
|
|
130790
|
+
* @param {string} url - 脚本 URL
|
|
130791
|
+
* @param {object} options - 配置
|
|
130792
|
+
* @param {string} options.charset - 字符集,默认 'utf-8'
|
|
130793
|
+
* @param {boolean} options.async - 是否异步,默认 true
|
|
130794
|
+
* @param {number} options.timeout - 超时时间(ms),默认 30000
|
|
130795
|
+
* @returns {Promise<HTMLScriptElement>}
|
|
130796
|
+
*/
|
|
130797
|
+
const loadScript = (url, options = {}) => {
|
|
130798
|
+
if (typeof window === 'undefined') {
|
|
130799
|
+
return Promise.reject(new Error('[XtMap] 非浏览器环境'))
|
|
130800
|
+
}
|
|
130801
|
+
|
|
130802
|
+
const { charset = 'utf-8', async = true, timeout = 30000 } = options
|
|
130803
|
+
|
|
130804
|
+
if (loadedScripts.has(url)) {
|
|
130805
|
+
return loadedScripts.get(url)
|
|
130806
|
+
}
|
|
130807
|
+
|
|
130808
|
+
if (loadingScripts.has(url)) {
|
|
130809
|
+
return loadingScripts.get(url)
|
|
130810
|
+
}
|
|
130811
|
+
|
|
130812
|
+
const promise = new Promise((resolve, reject) => {
|
|
130813
|
+
const script = document.createElement('script')
|
|
130814
|
+
script.type = 'text/javascript'
|
|
130815
|
+
script.src = url
|
|
130816
|
+
script.charset = charset
|
|
130817
|
+
script.async = async
|
|
130818
|
+
|
|
130819
|
+
let timer = null
|
|
130820
|
+
let done = false
|
|
130821
|
+
|
|
130822
|
+
const cleanup = () => {
|
|
130823
|
+
done = true
|
|
130824
|
+
if (timer) clearTimeout(timer)
|
|
130825
|
+
script.onload = null
|
|
130826
|
+
script.onerror = null
|
|
130827
|
+
}
|
|
130828
|
+
|
|
130829
|
+
script.onload = () => {
|
|
130830
|
+
if (done) return
|
|
130831
|
+
cleanup()
|
|
130832
|
+
loadingScripts.delete(url)
|
|
130833
|
+
loadedScripts.set(url, Promise.resolve(script))
|
|
130834
|
+
resolve(script)
|
|
130835
|
+
}
|
|
130836
|
+
|
|
130837
|
+
script.onerror = (err) => {
|
|
130838
|
+
if (done) return
|
|
130839
|
+
cleanup()
|
|
130840
|
+
loadingScripts.delete(url)
|
|
130841
|
+
reject(new Error(`[XtMap] 脚本加载失败: ${url}`))
|
|
130842
|
+
}
|
|
130843
|
+
|
|
130844
|
+
if (timeout > 0) {
|
|
130845
|
+
timer = setTimeout(() => {
|
|
130846
|
+
if (done) return
|
|
130847
|
+
cleanup()
|
|
130848
|
+
loadingScripts.delete(url)
|
|
130849
|
+
reject(new Error(`[XtMap] 脚本加载超时: ${url}`))
|
|
130850
|
+
}, timeout)
|
|
130851
|
+
}
|
|
130852
|
+
|
|
130853
|
+
document.head.appendChild(script)
|
|
130854
|
+
})
|
|
130855
|
+
|
|
130856
|
+
loadingScripts.set(url, promise)
|
|
130857
|
+
return promise
|
|
130858
|
+
}
|
|
130859
|
+
|
|
130860
|
+
/**
|
|
130861
|
+
* 批量加载脚本(按顺序)
|
|
130862
|
+
* @param {string[]} urls
|
|
130863
|
+
* @param {object} options
|
|
130864
|
+
*/
|
|
130865
|
+
const loadScripts = async (urls, options = {}) => {
|
|
130866
|
+
for (const url of urls) {
|
|
130867
|
+
await loadScript(url, options)
|
|
130868
|
+
}
|
|
130869
|
+
}
|
|
130870
|
+
|
|
130871
|
+
/**
|
|
130872
|
+
* 清除加载缓存(切换密钥等场景使用)
|
|
130873
|
+
*/
|
|
130874
|
+
const clearScriptCache = () => {
|
|
130875
|
+
loadedScripts.clear()
|
|
130876
|
+
loadingScripts.clear()
|
|
130877
|
+
}
|
|
130878
|
+
|
|
130879
|
+
/**
|
|
130880
|
+
* 检查全局对象是否存在
|
|
130881
|
+
*/
|
|
130882
|
+
const hasGlobal = (name) => {
|
|
130883
|
+
if (typeof window === 'undefined') return false
|
|
130884
|
+
return window[name] !== undefined
|
|
130885
|
+
}
|
|
130886
|
+
|
|
130887
|
+
/* harmony default export */ var script_loader = ({
|
|
130888
|
+
loadScript,
|
|
130889
|
+
loadScripts,
|
|
130890
|
+
clearScriptCache,
|
|
130891
|
+
hasGlobal
|
|
130892
|
+
});
|
|
130893
|
+
|
|
130894
|
+
// CONCATENATED MODULE: ./src/components/xt-map/adapters/base.js
|
|
130895
|
+
/**
|
|
130896
|
+
* 地图适配器基类
|
|
130897
|
+
* 定义统一的 API 接口,各地图引擎(高德/天地图/百度)通过继承/实现该接口完成适配
|
|
130898
|
+
*
|
|
130899
|
+
* 统一坐标系统:WGS84 (lng, lat) 作为输入输出标准,各适配器内部处理转换
|
|
130900
|
+
* 统一地图类型:standard | satellite | hybrid | traffic
|
|
130901
|
+
* 统一主题:light | dark
|
|
130902
|
+
*/
|
|
130903
|
+
|
|
130904
|
+
|
|
130905
|
+
|
|
130906
|
+
// 地图类型 -> 内部常量(各适配器可覆盖转换)
|
|
130907
|
+
const DEFAULT_MAP_TYPE_MAP = {
|
|
130908
|
+
standard: 'standard',
|
|
130909
|
+
satellite: 'satellite',
|
|
130910
|
+
hybrid: 'hybrid',
|
|
130911
|
+
traffic: 'traffic'
|
|
130912
|
+
}
|
|
130913
|
+
|
|
130914
|
+
class base_MapAdapterBase {
|
|
130915
|
+
constructor(container, options = {}) {
|
|
130916
|
+
this.container = container
|
|
130917
|
+
this.options = options
|
|
130918
|
+
this.mapInstance = null
|
|
130919
|
+
this.mapType = options.mapType || 'standard'
|
|
130920
|
+
this.theme = options.theme || 'light'
|
|
130921
|
+
this.center = options.center || [116.397428, 39.90923]
|
|
130922
|
+
this.zoom = options.zoom || 11
|
|
130923
|
+
this.apiKey = options.apiKey || ''
|
|
130924
|
+
this.apiUrl = options.apiUrl || null
|
|
130925
|
+
this.plugins = options.plugins || []
|
|
130926
|
+
this.eventHandlers = new Map()
|
|
130927
|
+
this.ready = false
|
|
130928
|
+
this._mapTypeMap = { ...DEFAULT_MAP_TYPE_MAP }
|
|
130929
|
+
}
|
|
130930
|
+
|
|
130931
|
+
/**
|
|
130932
|
+
* 获取 SDK 脚本 URL(各适配器必须实现)
|
|
130933
|
+
* @returns {string}
|
|
130934
|
+
*/
|
|
130935
|
+
getScriptUrl() {
|
|
130936
|
+
throw new Error('[XtMap] 子类必须实现 getScriptUrl()')
|
|
130937
|
+
}
|
|
130938
|
+
|
|
130939
|
+
/**
|
|
130940
|
+
* 检查 SDK 是否已加载
|
|
130941
|
+
*/
|
|
130942
|
+
isSdkLoaded() {
|
|
130943
|
+
throw new Error('[XtMap] 子类必须实现 isSdkLoaded()')
|
|
130944
|
+
}
|
|
130945
|
+
|
|
130946
|
+
/**
|
|
130947
|
+
* 在脚本加载前执行(可选覆盖)
|
|
130948
|
+
* 用于设置 securityJsCode、注册全局 callback 等前置准备
|
|
130949
|
+
*/
|
|
130950
|
+
beforeLoadScript() {
|
|
130951
|
+
// 可选实现 - 各适配器可覆盖
|
|
130952
|
+
}
|
|
130953
|
+
|
|
130954
|
+
/**
|
|
130955
|
+
* 创建地图实例(各适配器必须实现)
|
|
130956
|
+
*/
|
|
130957
|
+
async createMap() {
|
|
130958
|
+
throw new Error('[XtMap] 子类必须实现 createMap()')
|
|
130959
|
+
}
|
|
130960
|
+
|
|
130961
|
+
/**
|
|
130962
|
+
* 加载 SDK 并初始化地图
|
|
130963
|
+
*/
|
|
130964
|
+
async init() {
|
|
130965
|
+
if (!this.container) {
|
|
130966
|
+
throw new Error('[XtMap] 缺少容器元素')
|
|
130967
|
+
}
|
|
130968
|
+
|
|
130969
|
+
if (!this.isSdkLoaded()) {
|
|
130970
|
+
// 1. 脚本加载前执行钩子(设置安全密钥等)
|
|
130971
|
+
this.beforeLoadScript()
|
|
130972
|
+
|
|
130973
|
+
// 2. 获取脚本 URL
|
|
130974
|
+
const url = this.getScriptUrl()
|
|
130975
|
+
if (!url) {
|
|
130976
|
+
throw new Error('[XtMap] 缺少 API URL,请配置 apiKey 或 apiUrl')
|
|
130977
|
+
}
|
|
130978
|
+
|
|
130979
|
+
// 3. 动态加载脚本
|
|
130980
|
+
await loadScript(url)
|
|
130981
|
+
|
|
130982
|
+
// 4. 等待 SDK 初始化全局对象(部分 SDK 需要等待 callback 或脚本内部初始化完成)
|
|
130983
|
+
await this._waitForSdkReady()
|
|
130984
|
+
}
|
|
130985
|
+
|
|
130986
|
+
// 5. 创建地图实例
|
|
130987
|
+
await this.createMap()
|
|
130988
|
+
this.ready = true
|
|
130989
|
+
return this.mapInstance
|
|
130990
|
+
}
|
|
130991
|
+
|
|
130992
|
+
/**
|
|
130993
|
+
* 等待 SDK 准备好(部分地图 SDK 需要等待 callback 执行)
|
|
130994
|
+
*/
|
|
130995
|
+
async _waitForSdkReady() {
|
|
130996
|
+
return new Promise((resolve) => {
|
|
130997
|
+
let attempts = 0
|
|
130998
|
+
const maxAttempts = 100
|
|
130999
|
+
const check = () => {
|
|
131000
|
+
if (this.isSdkLoaded() || attempts >= maxAttempts) {
|
|
131001
|
+
resolve()
|
|
131002
|
+
} else {
|
|
131003
|
+
attempts++
|
|
131004
|
+
setTimeout(check, 100)
|
|
131005
|
+
}
|
|
131006
|
+
}
|
|
131007
|
+
check()
|
|
131008
|
+
})
|
|
131009
|
+
}
|
|
131010
|
+
|
|
131011
|
+
/**
|
|
131012
|
+
* 统一地图类型转换:xt-map 枚举 -> 引擎内部值
|
|
131013
|
+
*/
|
|
131014
|
+
getNativeMapType(xtType) {
|
|
131015
|
+
return this._mapTypeMap[xtType] || this._mapTypeMap.standard
|
|
131016
|
+
}
|
|
131017
|
+
|
|
131018
|
+
/**
|
|
131019
|
+
* 设置地图类型
|
|
131020
|
+
*/
|
|
131021
|
+
setMapType(type) {
|
|
131022
|
+
this.mapType = type
|
|
131023
|
+
if (this.ready && this.mapInstance) {
|
|
131024
|
+
this._applyMapType(type)
|
|
131025
|
+
}
|
|
131026
|
+
}
|
|
131027
|
+
|
|
131028
|
+
/**
|
|
131029
|
+
* 应用地图类型到引擎(各适配器实现)
|
|
131030
|
+
*/
|
|
131031
|
+
_applyMapType(type) {
|
|
131032
|
+
// 可选实现
|
|
131033
|
+
}
|
|
131034
|
+
|
|
131035
|
+
/**
|
|
131036
|
+
* 设置主题
|
|
131037
|
+
*/
|
|
131038
|
+
setTheme(theme) {
|
|
131039
|
+
this.theme = theme
|
|
131040
|
+
if (this.ready && this.mapInstance) {
|
|
131041
|
+
this._applyTheme(theme)
|
|
131042
|
+
}
|
|
131043
|
+
}
|
|
131044
|
+
|
|
131045
|
+
/**
|
|
131046
|
+
* 应用主题到引擎(各适配器实现)
|
|
131047
|
+
*/
|
|
131048
|
+
_applyTheme(theme) {
|
|
131049
|
+
// 可选实现
|
|
131050
|
+
}
|
|
131051
|
+
|
|
131052
|
+
/**
|
|
131053
|
+
* 设置中心坐标 [lng, lat]
|
|
131054
|
+
*/
|
|
131055
|
+
setCenter(center) {
|
|
131056
|
+
this.center = center
|
|
131057
|
+
if (this.ready && this.mapInstance) {
|
|
131058
|
+
this._applyCenter(center)
|
|
131059
|
+
}
|
|
131060
|
+
}
|
|
131061
|
+
|
|
131062
|
+
_applyCenter(center) {
|
|
131063
|
+
// 各适配器实现
|
|
131064
|
+
}
|
|
131065
|
+
|
|
131066
|
+
/**
|
|
131067
|
+
* 设置缩放级别
|
|
131068
|
+
*/
|
|
131069
|
+
setZoom(zoom) {
|
|
131070
|
+
this.zoom = zoom
|
|
131071
|
+
if (this.ready && this.mapInstance) {
|
|
131072
|
+
this._applyZoom(zoom)
|
|
131073
|
+
}
|
|
131074
|
+
}
|
|
131075
|
+
|
|
131076
|
+
_applyZoom(zoom) {
|
|
131077
|
+
// 各适配器实现
|
|
131078
|
+
}
|
|
131079
|
+
|
|
131080
|
+
/**
|
|
131081
|
+
* 获取当前中心坐标
|
|
131082
|
+
*/
|
|
131083
|
+
getCenter() {
|
|
131084
|
+
return this.center
|
|
131085
|
+
}
|
|
131086
|
+
|
|
131087
|
+
/**
|
|
131088
|
+
* 获取当前缩放级别
|
|
131089
|
+
*/
|
|
131090
|
+
getZoom() {
|
|
131091
|
+
return this.zoom
|
|
131092
|
+
}
|
|
131093
|
+
|
|
131094
|
+
/**
|
|
131095
|
+
* 获取原始地图实例(用于高级自定义操作)
|
|
131096
|
+
*/
|
|
131097
|
+
getNativeMap() {
|
|
131098
|
+
return this.mapInstance
|
|
131099
|
+
}
|
|
131100
|
+
|
|
131101
|
+
/**
|
|
131102
|
+
* 绑定事件(统一事件名:click, moveend, zoomend, ready 等)
|
|
131103
|
+
*/
|
|
131104
|
+
on(eventName, handler) {
|
|
131105
|
+
if (typeof handler !== 'function') return
|
|
131106
|
+
this.eventHandlers.set(eventName, handler)
|
|
131107
|
+
if (this.ready && this.mapInstance) {
|
|
131108
|
+
this._bindEvent(eventName, handler)
|
|
131109
|
+
}
|
|
131110
|
+
}
|
|
131111
|
+
|
|
131112
|
+
_bindEvent(eventName, handler) {
|
|
131113
|
+
// 各适配器实现具体事件绑定
|
|
131114
|
+
}
|
|
131115
|
+
|
|
131116
|
+
/**
|
|
131117
|
+
* 解绑事件
|
|
131118
|
+
*/
|
|
131119
|
+
off(eventName) {
|
|
131120
|
+
const handler = this.eventHandlers.get(eventName)
|
|
131121
|
+
if (handler && this.ready && this.mapInstance) {
|
|
131122
|
+
this._unbindEvent(eventName, handler)
|
|
131123
|
+
}
|
|
131124
|
+
this.eventHandlers.delete(eventName)
|
|
131125
|
+
}
|
|
131126
|
+
|
|
131127
|
+
_unbindEvent(eventName, handler) {
|
|
131128
|
+
// 各适配器实现
|
|
131129
|
+
}
|
|
131130
|
+
|
|
131131
|
+
/**
|
|
131132
|
+
* 调整地图大小(容器尺寸变化后调用)
|
|
131133
|
+
*/
|
|
131134
|
+
resize() {
|
|
131135
|
+
if (this.ready && this.mapInstance) {
|
|
131136
|
+
this._applyResize()
|
|
131137
|
+
}
|
|
131138
|
+
}
|
|
131139
|
+
|
|
131140
|
+
_applyResize() {
|
|
131141
|
+
// 各适配器实现
|
|
131142
|
+
}
|
|
131143
|
+
|
|
131144
|
+
/**
|
|
131145
|
+
* 销毁地图
|
|
131146
|
+
*/
|
|
131147
|
+
destroy() {
|
|
131148
|
+
this.eventHandlers.clear()
|
|
131149
|
+
if (this.mapInstance && typeof this.mapInstance.destroy === 'function') {
|
|
131150
|
+
try {
|
|
131151
|
+
this.mapInstance.destroy()
|
|
131152
|
+
} catch (e) {
|
|
131153
|
+
// 忽略销毁错误
|
|
131154
|
+
}
|
|
131155
|
+
}
|
|
131156
|
+
this.mapInstance = null
|
|
131157
|
+
this.ready = false
|
|
131158
|
+
}
|
|
131159
|
+
}
|
|
131160
|
+
|
|
131161
|
+
/* harmony default export */ var base = (base_MapAdapterBase);
|
|
131162
|
+
|
|
131163
|
+
// CONCATENATED MODULE: ./src/components/xt-map/adapters/amap.js
|
|
131164
|
+
/**
|
|
131165
|
+
* 高德地图适配器 (AMap)
|
|
131166
|
+
* 以高德为基准,所有 xt-map 枚举直接映射
|
|
131167
|
+
*/
|
|
131168
|
+
|
|
131169
|
+
|
|
131170
|
+
|
|
131171
|
+
|
|
131172
|
+
const A_MAP_MAP_TYPES = {
|
|
131173
|
+
standard: 'amap', // 标准/矢量
|
|
131174
|
+
satellite: 'satellite', // 卫星
|
|
131175
|
+
hybrid: 'satellite', // 混合(卫星+路网,用卫星+路网图层组合实现)
|
|
131176
|
+
traffic: 'traffic' // 实时路况(叠加在 standard 上)
|
|
131177
|
+
}
|
|
131178
|
+
|
|
131179
|
+
// 高德地图样式 ID(主题映射)
|
|
131180
|
+
const A_MAP_STYLES = {
|
|
131181
|
+
light: 'amap://styles/normal',
|
|
131182
|
+
dark: 'amap://styles/dark'
|
|
131183
|
+
}
|
|
131184
|
+
|
|
131185
|
+
class amap_AMapAdapter extends base_MapAdapterBase {
|
|
131186
|
+
constructor(container, options = {}) {
|
|
131187
|
+
super(container, options)
|
|
131188
|
+
this._mapTypeMap = { ...A_MAP_MAP_TYPES }
|
|
131189
|
+
this._trafficLayer = null // 路况图层引用
|
|
131190
|
+
this._satelliteLayer = null // 卫星图层
|
|
131191
|
+
this._roadnetLayer = null // 路网图层(用于 hybrid)
|
|
131192
|
+
this._currentLayers = [] // 当前叠加图层
|
|
131193
|
+
}
|
|
131194
|
+
|
|
131195
|
+
getScriptUrl() {
|
|
131196
|
+
if (this.apiUrl) return this.apiUrl
|
|
131197
|
+
if (!this.apiKey) {
|
|
131198
|
+
console.warn('[XtMap] 高德地图需要配置 apiKey')
|
|
131199
|
+
return ''
|
|
131200
|
+
}
|
|
131201
|
+
// 高德 2.0 Web API
|
|
131202
|
+
return `https://webapi.amap.com/maps?v=2.0&key=${encodeURIComponent(this.apiKey)}&plugin=AMap.Scale,AMap.ToolBar`
|
|
131203
|
+
}
|
|
131204
|
+
|
|
131205
|
+
/**
|
|
131206
|
+
* 脚本加载前设置高德 2.0 安全密钥
|
|
131207
|
+
*/
|
|
131208
|
+
beforeLoadScript() {
|
|
131209
|
+
const securityJsCode = this.options.securityJsCode || (typeof window !== 'undefined' && window._AMapSecurityConfig && window._AMapSecurityConfig.securityJsCode) || ''
|
|
131210
|
+
if (securityJsCode && typeof window !== 'undefined') {
|
|
131211
|
+
window._AMapSecurityConfig = {
|
|
131212
|
+
securityJsCode: securityJsCode
|
|
131213
|
+
}
|
|
131214
|
+
}
|
|
131215
|
+
}
|
|
131216
|
+
|
|
131217
|
+
isSdkLoaded() {
|
|
131218
|
+
return hasGlobal('AMap') && typeof window.AMap === 'function'
|
|
131219
|
+
}
|
|
131220
|
+
|
|
131221
|
+
async createMap() {
|
|
131222
|
+
const AMap = window.AMap
|
|
131223
|
+
if (!AMap) throw new Error('[XtMap] 高德地图 SDK 未加载')
|
|
131224
|
+
|
|
131225
|
+
const mapOptions = {
|
|
131226
|
+
center: this.center,
|
|
131227
|
+
zoom: this.zoom,
|
|
131228
|
+
mapStyle: A_MAP_STYLES[this.theme] || A_MAP_STYLES.light,
|
|
131229
|
+
viewMode: '2D',
|
|
131230
|
+
resizeEnable: true
|
|
131231
|
+
}
|
|
131232
|
+
|
|
131233
|
+
this.mapInstance = new AMap.Map(this.container, mapOptions)
|
|
131234
|
+
|
|
131235
|
+
// 应用地图类型
|
|
131236
|
+
this._applyMapType(this.mapType)
|
|
131237
|
+
|
|
131238
|
+
// 绑定事件(延迟到地图就绪后)
|
|
131239
|
+
await new Promise((resolve) => {
|
|
131240
|
+
this.mapInstance.on('complete', () => resolve())
|
|
131241
|
+
// 兜底:1秒后强制 resolve
|
|
131242
|
+
setTimeout(resolve, 1500)
|
|
131243
|
+
})
|
|
131244
|
+
|
|
131245
|
+
// 重新绑定已注册事件
|
|
131246
|
+
for (const [eventName, handler] of this.eventHandlers.entries()) {
|
|
131247
|
+
this._bindEvent(eventName, handler)
|
|
131248
|
+
}
|
|
131249
|
+
}
|
|
131250
|
+
|
|
131251
|
+
_applyMapType(type) {
|
|
131252
|
+
if (!this.mapInstance) return
|
|
131253
|
+
const AMap = window.AMap
|
|
131254
|
+
if (!AMap) return
|
|
131255
|
+
|
|
131256
|
+
// 清除所有叠加图层
|
|
131257
|
+
this._clearLayers()
|
|
131258
|
+
|
|
131259
|
+
try {
|
|
131260
|
+
// 设置底图样式
|
|
131261
|
+
this.mapInstance.setMapStyle(A_MAP_STYLES[this.theme] || A_MAP_STYLES.light)
|
|
131262
|
+
|
|
131263
|
+
if (type === 'satellite') {
|
|
131264
|
+
this._satelliteLayer = new AMap.TileLayer.Satellite()
|
|
131265
|
+
this.mapInstance.add(this._satelliteLayer)
|
|
131266
|
+
this._currentLayers.push(this._satelliteLayer)
|
|
131267
|
+
} else if (type === 'hybrid') {
|
|
131268
|
+
// 卫星 + 路网
|
|
131269
|
+
this._satelliteLayer = new AMap.TileLayer.Satellite()
|
|
131270
|
+
this._roadnetLayer = new AMap.TileLayer.RoadNet()
|
|
131271
|
+
this.mapInstance.add([this._satelliteLayer, this._roadnetLayer])
|
|
131272
|
+
this._currentLayers.push(this._satelliteLayer, this._roadnetLayer)
|
|
131273
|
+
} else if (type === 'traffic') {
|
|
131274
|
+
// 路况图层叠加在 standard 上
|
|
131275
|
+
this._trafficLayer = new AMap.TileLayer.Traffic({
|
|
131276
|
+
autoRefresh: true,
|
|
131277
|
+
interval: 180
|
|
131278
|
+
})
|
|
131279
|
+
this.mapInstance.add(this._trafficLayer)
|
|
131280
|
+
this._currentLayers.push(this._trafficLayer)
|
|
131281
|
+
}
|
|
131282
|
+
} catch (e) {
|
|
131283
|
+
console.warn('[XtMap] 设置地图类型失败:', e)
|
|
131284
|
+
}
|
|
131285
|
+
}
|
|
131286
|
+
|
|
131287
|
+
_clearLayers() {
|
|
131288
|
+
if (!this.mapInstance) return
|
|
131289
|
+
try {
|
|
131290
|
+
if (this._currentLayers.length > 0) {
|
|
131291
|
+
this.mapInstance.remove(this._currentLayers)
|
|
131292
|
+
}
|
|
131293
|
+
} catch (e) {
|
|
131294
|
+
// 忽略
|
|
131295
|
+
}
|
|
131296
|
+
this._currentLayers = []
|
|
131297
|
+
this._trafficLayer = null
|
|
131298
|
+
this._satelliteLayer = null
|
|
131299
|
+
this._roadnetLayer = null
|
|
131300
|
+
}
|
|
131301
|
+
|
|
131302
|
+
_applyTheme(theme) {
|
|
131303
|
+
if (!this.mapInstance) return
|
|
131304
|
+
try {
|
|
131305
|
+
this.mapInstance.setMapStyle(A_MAP_STYLES[theme] || A_MAP_STYLES.light)
|
|
131306
|
+
// 主题变更可能影响图层显示,重新应用地图类型
|
|
131307
|
+
this._applyMapType(this.mapType)
|
|
131308
|
+
} catch (e) {
|
|
131309
|
+
console.warn('[XtMap] 设置主题失败:', e)
|
|
131310
|
+
}
|
|
131311
|
+
}
|
|
131312
|
+
|
|
131313
|
+
_applyCenter(center) {
|
|
131314
|
+
if (!this.mapInstance) return
|
|
131315
|
+
try {
|
|
131316
|
+
this.mapInstance.setCenter(center)
|
|
131317
|
+
} catch (e) {
|
|
131318
|
+
// 忽略
|
|
131319
|
+
}
|
|
131320
|
+
}
|
|
131321
|
+
|
|
131322
|
+
_applyZoom(zoom) {
|
|
131323
|
+
if (!this.mapInstance) return
|
|
131324
|
+
try {
|
|
131325
|
+
this.mapInstance.setZoom(zoom)
|
|
131326
|
+
} catch (e) {
|
|
131327
|
+
// 忽略
|
|
131328
|
+
}
|
|
131329
|
+
}
|
|
131330
|
+
|
|
131331
|
+
getCenter() {
|
|
131332
|
+
if (this.mapInstance && this.mapInstance.getCenter) {
|
|
131333
|
+
const c = this.mapInstance.getCenter()
|
|
131334
|
+
return [c.lng, c.lat]
|
|
131335
|
+
}
|
|
131336
|
+
return this.center
|
|
131337
|
+
}
|
|
131338
|
+
|
|
131339
|
+
getZoom() {
|
|
131340
|
+
if (this.mapInstance && this.mapInstance.getZoom) {
|
|
131341
|
+
return this.mapInstance.getZoom()
|
|
131342
|
+
}
|
|
131343
|
+
return this.zoom
|
|
131344
|
+
}
|
|
131345
|
+
|
|
131346
|
+
_bindEvent(eventName, handler) {
|
|
131347
|
+
if (!this.mapInstance) return
|
|
131348
|
+
try {
|
|
131349
|
+
// 统一事件名映射
|
|
131350
|
+
const eventMap = {
|
|
131351
|
+
click: 'click',
|
|
131352
|
+
moveend: 'moveend',
|
|
131353
|
+
zoomend: 'zoomend',
|
|
131354
|
+
zoomchange: 'zoomchange',
|
|
131355
|
+
mapmove: 'mapmove',
|
|
131356
|
+
complete: 'complete',
|
|
131357
|
+
resize: 'resize'
|
|
131358
|
+
}
|
|
131359
|
+
const nativeEvent = eventMap[eventName] || eventName
|
|
131360
|
+
this.mapInstance.on(nativeEvent, (e) => {
|
|
131361
|
+
// 统一事件参数格式
|
|
131362
|
+
const normalized = {
|
|
131363
|
+
originalEvent: e,
|
|
131364
|
+
lnglat: e && e.lnglat ? [e.lnglat.lng, e.lnglat.lat] : null
|
|
131365
|
+
}
|
|
131366
|
+
handler(normalized)
|
|
131367
|
+
})
|
|
131368
|
+
} catch (err) {
|
|
131369
|
+
console.warn('[XtMap] 事件绑定失败:', eventName, err)
|
|
131370
|
+
}
|
|
131371
|
+
}
|
|
131372
|
+
|
|
131373
|
+
_unbindEvent(eventName, handler) {
|
|
131374
|
+
if (!this.mapInstance) return
|
|
131375
|
+
try {
|
|
131376
|
+
this.mapInstance.off(eventName, handler)
|
|
131377
|
+
} catch (e) {
|
|
131378
|
+
// 忽略
|
|
131379
|
+
}
|
|
131380
|
+
}
|
|
131381
|
+
|
|
131382
|
+
_applyResize() {
|
|
131383
|
+
if (this.mapInstance && this.mapInstance.resize) {
|
|
131384
|
+
try {
|
|
131385
|
+
this.mapInstance.resize()
|
|
131386
|
+
} catch (e) {
|
|
131387
|
+
// 忽略
|
|
131388
|
+
}
|
|
131389
|
+
}
|
|
131390
|
+
}
|
|
131391
|
+
|
|
131392
|
+
destroy() {
|
|
131393
|
+
this._clearLayers()
|
|
131394
|
+
super.destroy()
|
|
131395
|
+
}
|
|
131396
|
+
}
|
|
131397
|
+
|
|
131398
|
+
/* harmony default export */ var amap = (amap_AMapAdapter);
|
|
131399
|
+
|
|
131400
|
+
// CONCATENATED MODULE: ./src/components/xt-map/adapters/tianditu.js
|
|
131401
|
+
/**
|
|
131402
|
+
* 天地图适配器 (Tianditu)
|
|
131403
|
+
* 天地图使用 WMTS 切片服务,不支持原生主题切换,
|
|
131404
|
+
* dark/light 通过图层样式参数模拟(部分图层可调整色调)
|
|
131405
|
+
*/
|
|
131406
|
+
|
|
131407
|
+
|
|
131408
|
+
|
|
131409
|
+
|
|
131410
|
+
// 天地图地图类型映射
|
|
131411
|
+
const TIANDITU_MAP_TYPES = {
|
|
131412
|
+
standard: 'vec', // 矢量地图
|
|
131413
|
+
satellite: 'img', // 影像地图
|
|
131414
|
+
hybrid: 'img', // 混合(影像 + 注记)
|
|
131415
|
+
traffic: 'vec' // 天地图不支持原生路况,降级为矢量
|
|
131416
|
+
}
|
|
131417
|
+
|
|
131418
|
+
// 天地图主题色模拟:通过调整图层透明度/色调CSS滤镜
|
|
131419
|
+
const TIANDITU_THEME_FILTER = {
|
|
131420
|
+
light: 'none',
|
|
131421
|
+
dark: 'invert(1) hue-rotate(180deg) saturate(1.2) brightness(0.95)'
|
|
131422
|
+
}
|
|
131423
|
+
|
|
131424
|
+
class tianditu_TiandituAdapter extends base_MapAdapterBase {
|
|
131425
|
+
constructor(container, options = {}) {
|
|
131426
|
+
super(container, options)
|
|
131427
|
+
this._mapTypeMap = { ...TIANDITU_MAP_TYPES }
|
|
131428
|
+
this._layerType = options.tiandituLayerType || 'vec'
|
|
131429
|
+
this._currentLayer = null
|
|
131430
|
+
this._annotationLayer = null
|
|
131431
|
+
}
|
|
131432
|
+
|
|
131433
|
+
getScriptUrl() {
|
|
131434
|
+
if (this.apiUrl) return this.apiUrl
|
|
131435
|
+
if (!this.apiKey) {
|
|
131436
|
+
console.warn('[XtMap] 天地图需要配置 apiKey (tk)')
|
|
131437
|
+
return ''
|
|
131438
|
+
}
|
|
131439
|
+
return `https://api.tianditu.gov.cn/api?v=4.0&tk=${encodeURIComponent(this.apiKey)}`
|
|
131440
|
+
}
|
|
131441
|
+
|
|
131442
|
+
isSdkLoaded() {
|
|
131443
|
+
return hasGlobal('T') && typeof window.T === 'object' && window.T.Map
|
|
131444
|
+
}
|
|
131445
|
+
|
|
131446
|
+
async createMap() {
|
|
131447
|
+
const T = window.T
|
|
131448
|
+
if (!T || !T.Map) throw new Error('[XtMap] 天地图 SDK 未加载')
|
|
131449
|
+
|
|
131450
|
+
const mapOptions = {
|
|
131451
|
+
center: new T.LngLat(this.center[0], this.center[1]),
|
|
131452
|
+
zoom: this.zoom
|
|
131453
|
+
}
|
|
131454
|
+
|
|
131455
|
+
this.mapInstance = new T.Map(this.container, mapOptions)
|
|
131456
|
+
|
|
131457
|
+
// 应用地图类型
|
|
131458
|
+
this._applyMapType(this.mapType)
|
|
131459
|
+
|
|
131460
|
+
// 应用主题
|
|
131461
|
+
this._applyTheme(this.theme)
|
|
131462
|
+
|
|
131463
|
+
// 等待地图就绪
|
|
131464
|
+
await new Promise((resolve) => {
|
|
131465
|
+
setTimeout(resolve, 500)
|
|
131466
|
+
})
|
|
131467
|
+
|
|
131468
|
+
// 绑定事件
|
|
131469
|
+
for (const [eventName, handler] of this.eventHandlers.entries()) {
|
|
131470
|
+
this._bindEvent(eventName, handler)
|
|
131471
|
+
}
|
|
131472
|
+
}
|
|
131473
|
+
|
|
131474
|
+
_applyMapType(type) {
|
|
131475
|
+
if (!this.mapInstance) return
|
|
131476
|
+
const T = window.T
|
|
131477
|
+
if (!T) return
|
|
131478
|
+
|
|
131479
|
+
try {
|
|
131480
|
+
// 天地图通过 switchTo 方法切换图层
|
|
131481
|
+
const layerType = this._mapTypeMap[type] || 'vec'
|
|
131482
|
+
|
|
131483
|
+
if (type === 'standard') {
|
|
131484
|
+
// 矢量地图
|
|
131485
|
+
this.mapInstance.setMapType(window.TMAP_NORMAL_MAP || 1)
|
|
131486
|
+
} else if (type === 'satellite') {
|
|
131487
|
+
// 影像地图
|
|
131488
|
+
this.mapInstance.setMapType(window.TMAP_SATELLITE_MAP || 2)
|
|
131489
|
+
} else if (type === 'hybrid') {
|
|
131490
|
+
// 混合(影像+注记)
|
|
131491
|
+
this.mapInstance.setMapType(window.TMAP_HYBRID_MAP || 3)
|
|
131492
|
+
} else {
|
|
131493
|
+
// 路况等特殊类型,天地图无原生支持
|
|
131494
|
+
this.mapInstance.setMapType(window.TMAP_NORMAL_MAP || 1)
|
|
131495
|
+
}
|
|
131496
|
+
} catch (e) {
|
|
131497
|
+
console.warn('[XtMap] 天地图切换地图类型失败:', e)
|
|
131498
|
+
}
|
|
131499
|
+
}
|
|
131500
|
+
|
|
131501
|
+
_applyTheme(theme) {
|
|
131502
|
+
if (!this.container) return
|
|
131503
|
+
// 天地图不支持原生 dark 主题,通过 CSS 滤镜模拟
|
|
131504
|
+
const filter = TIANDITU_THEME_FILTER[theme] || 'none'
|
|
131505
|
+
const imgElements = this.container.querySelectorAll('img')
|
|
131506
|
+
imgElements.forEach((img) => {
|
|
131507
|
+
img.style.filter = filter
|
|
131508
|
+
img.style.webkitFilter = filter
|
|
131509
|
+
})
|
|
131510
|
+
// 同时设置容器级 CSS 变量,方便样式覆盖
|
|
131511
|
+
this.container.setAttribute('data-map-theme', theme)
|
|
131512
|
+
// 监听后续新增的 tile 图片(通过 MutationObserver)
|
|
131513
|
+
this._setupThemeObserver(theme)
|
|
131514
|
+
}
|
|
131515
|
+
|
|
131516
|
+
_setupThemeObserver(theme) {
|
|
131517
|
+
if (this._themeObserver) {
|
|
131518
|
+
this._themeObserver.disconnect()
|
|
131519
|
+
}
|
|
131520
|
+
if (theme !== 'dark') return
|
|
131521
|
+
const filter = TIANDITU_THEME_FILTER[theme]
|
|
131522
|
+
this._themeObserver = new MutationObserver((mutations) => {
|
|
131523
|
+
mutations.forEach((mutation) => {
|
|
131524
|
+
mutation.addedNodes.forEach((node) => {
|
|
131525
|
+
if (node.nodeType === 1) {
|
|
131526
|
+
if (node.tagName === 'IMG') {
|
|
131527
|
+
node.style.filter = filter
|
|
131528
|
+
node.style.webkitFilter = filter
|
|
131529
|
+
} else if (node.querySelectorAll) {
|
|
131530
|
+
const imgs = node.querySelectorAll('img')
|
|
131531
|
+
imgs.forEach((img) => {
|
|
131532
|
+
img.style.filter = filter
|
|
131533
|
+
img.style.webkitFilter = filter
|
|
131534
|
+
})
|
|
131535
|
+
}
|
|
131536
|
+
}
|
|
131537
|
+
})
|
|
131538
|
+
})
|
|
131539
|
+
})
|
|
131540
|
+
try {
|
|
131541
|
+
this._themeObserver.observe(this.container, {
|
|
131542
|
+
childList: true,
|
|
131543
|
+
subtree: true
|
|
131544
|
+
})
|
|
131545
|
+
} catch (e) {
|
|
131546
|
+
// 忽略
|
|
131547
|
+
}
|
|
131548
|
+
}
|
|
131549
|
+
|
|
131550
|
+
_applyCenter(center) {
|
|
131551
|
+
if (!this.mapInstance || !window.T) return
|
|
131552
|
+
try {
|
|
131553
|
+
this.mapInstance.centerAndZoom(new window.T.LngLat(center[0], center[1]), this.zoom)
|
|
131554
|
+
} catch (e) {
|
|
131555
|
+
// 忽略
|
|
131556
|
+
}
|
|
131557
|
+
}
|
|
131558
|
+
|
|
131559
|
+
_applyZoom(zoom) {
|
|
131560
|
+
if (!this.mapInstance) return
|
|
131561
|
+
try {
|
|
131562
|
+
this.mapInstance.setZoom(zoom)
|
|
131563
|
+
} catch (e) {
|
|
131564
|
+
// 忽略
|
|
131565
|
+
}
|
|
131566
|
+
}
|
|
131567
|
+
|
|
131568
|
+
getCenter() {
|
|
131569
|
+
if (this.mapInstance && this.mapInstance.getCenter) {
|
|
131570
|
+
const c = this.mapInstance.getCenter()
|
|
131571
|
+
if (c && c.getLng !== undefined) {
|
|
131572
|
+
return [c.getLng(), c.getLat()]
|
|
131573
|
+
}
|
|
131574
|
+
}
|
|
131575
|
+
return this.center
|
|
131576
|
+
}
|
|
131577
|
+
|
|
131578
|
+
getZoom() {
|
|
131579
|
+
if (this.mapInstance && this.mapInstance.getZoom) {
|
|
131580
|
+
return this.mapInstance.getZoom()
|
|
131581
|
+
}
|
|
131582
|
+
return this.zoom
|
|
131583
|
+
}
|
|
131584
|
+
|
|
131585
|
+
_bindEvent(eventName, handler) {
|
|
131586
|
+
if (!this.mapInstance) return
|
|
131587
|
+
try {
|
|
131588
|
+
const eventMap = {
|
|
131589
|
+
click: 'click',
|
|
131590
|
+
moveend: 'moveend',
|
|
131591
|
+
zoomend: 'zoomend',
|
|
131592
|
+
zoomchange: 'zoomend'
|
|
131593
|
+
}
|
|
131594
|
+
const nativeEvent = eventMap[eventName] || eventName
|
|
131595
|
+
this.mapInstance.addEventListener(nativeEvent, (e) => {
|
|
131596
|
+
const normalized = {
|
|
131597
|
+
originalEvent: e,
|
|
131598
|
+
lnglat: e && e.lnglat ? [e.lnglat.getLng(), e.lnglat.getLat()] : null
|
|
131599
|
+
}
|
|
131600
|
+
handler(normalized)
|
|
131601
|
+
})
|
|
131602
|
+
} catch (err) {
|
|
131603
|
+
console.warn('[XtMap] 天地图事件绑定失败:', eventName, err)
|
|
131604
|
+
}
|
|
131605
|
+
}
|
|
131606
|
+
|
|
131607
|
+
_unbindEvent(eventName, handler) {
|
|
131608
|
+
if (!this.mapInstance) return
|
|
131609
|
+
try {
|
|
131610
|
+
this.mapInstance.removeEventListener(eventName, handler)
|
|
131611
|
+
} catch (e) {
|
|
131612
|
+
// 忽略
|
|
131613
|
+
}
|
|
131614
|
+
}
|
|
131615
|
+
|
|
131616
|
+
_applyResize() {
|
|
131617
|
+
if (this.mapInstance && this.mapInstance.checkResize) {
|
|
131618
|
+
try {
|
|
131619
|
+
this.mapInstance.checkResize()
|
|
131620
|
+
} catch (e) {
|
|
131621
|
+
// 忽略
|
|
131622
|
+
}
|
|
131623
|
+
}
|
|
131624
|
+
}
|
|
131625
|
+
|
|
131626
|
+
destroy() {
|
|
131627
|
+
if (this._themeObserver) {
|
|
131628
|
+
this._themeObserver.disconnect()
|
|
131629
|
+
this._themeObserver = null
|
|
131630
|
+
}
|
|
131631
|
+
if (this.mapInstance && typeof this.mapInstance.clearOverLays === 'function') {
|
|
131632
|
+
try {
|
|
131633
|
+
this.mapInstance.clearOverLays()
|
|
131634
|
+
} catch (e) {
|
|
131635
|
+
// 忽略
|
|
131636
|
+
}
|
|
131637
|
+
}
|
|
131638
|
+
super.destroy()
|
|
131639
|
+
}
|
|
131640
|
+
}
|
|
131641
|
+
|
|
131642
|
+
/* harmony default export */ var tianditu = (tianditu_TiandituAdapter);
|
|
131643
|
+
|
|
131644
|
+
// CONCATENATED MODULE: ./src/components/xt-map/adapters/baidu.js
|
|
131645
|
+
/**
|
|
131646
|
+
* 百度地图适配器 (BMap / Baidu)
|
|
131647
|
+
* 百度地图 JS API 3.0 支持自定义样式
|
|
131648
|
+
*/
|
|
131649
|
+
|
|
131650
|
+
|
|
131651
|
+
|
|
131652
|
+
|
|
131653
|
+
// 百度地图类型映射
|
|
131654
|
+
const BAIDU_MAP_TYPES = {
|
|
131655
|
+
standard: 'BMAP_NORMAL_MAP',
|
|
131656
|
+
satellite: 'BMAP_SATELLITE_MAP',
|
|
131657
|
+
hybrid: 'BMAP_HYBRID_MAP',
|
|
131658
|
+
traffic: 'BMAP_NORMAL_MAP' // 路况通过图层叠加
|
|
131659
|
+
}
|
|
131660
|
+
|
|
131661
|
+
// 百度地图自定义样式 ID(主题)
|
|
131662
|
+
// light: 官方 normal 样式
|
|
131663
|
+
// dark: 午夜蓝 dark 样式
|
|
131664
|
+
const BAIDU_STYLES = {
|
|
131665
|
+
light: { style: 'normal' },
|
|
131666
|
+
dark: { style: 'dark' }
|
|
131667
|
+
}
|
|
131668
|
+
|
|
131669
|
+
class baidu_BaiduAdapter extends base_MapAdapterBase {
|
|
131670
|
+
constructor(container, options = {}) {
|
|
131671
|
+
super(container, options)
|
|
131672
|
+
this._mapTypeMap = { ...BAIDU_MAP_TYPES }
|
|
131673
|
+
this._coordType = options.baiduCoordType || 'bd09ll'
|
|
131674
|
+
this._trafficLayer = null
|
|
131675
|
+
this._callbackName = null
|
|
131676
|
+
}
|
|
131677
|
+
|
|
131678
|
+
getScriptUrl() {
|
|
131679
|
+
if (this.apiUrl) return this.apiUrl
|
|
131680
|
+
if (!this.apiKey) {
|
|
131681
|
+
console.warn('[XtMap] 百度地图需要配置 apiKey (ak)')
|
|
131682
|
+
return ''
|
|
131683
|
+
}
|
|
131684
|
+
// 注意:_callbackName 在 beforeLoadScript 中已注册
|
|
131685
|
+
return `https://api.map.baidu.com/api?v=3.0&ak=${encodeURIComponent(this.apiKey)}&callback=${this._callbackName}`
|
|
131686
|
+
}
|
|
131687
|
+
|
|
131688
|
+
/**
|
|
131689
|
+
* 脚本加载前注册百度 SDK 回调函数
|
|
131690
|
+
*/
|
|
131691
|
+
beforeLoadScript() {
|
|
131692
|
+
// 生成唯一 callback 名称,支持多实例
|
|
131693
|
+
this._callbackName = `__xt_map_baidu_${Date.now()}_${Math.floor(Math.random() * 100000)}`
|
|
131694
|
+
// 注册全局 callback(百度地图 SDK 加载完成后调用)
|
|
131695
|
+
if (typeof window !== 'undefined') {
|
|
131696
|
+
window[this._callbackName] = () => {
|
|
131697
|
+
// 空实现,仅用于触发 Promise resolve
|
|
131698
|
+
}
|
|
131699
|
+
}
|
|
131700
|
+
}
|
|
131701
|
+
|
|
131702
|
+
isSdkLoaded() {
|
|
131703
|
+
return hasGlobal('BMap') && typeof window.BMap === 'function'
|
|
131704
|
+
}
|
|
131705
|
+
|
|
131706
|
+
async createMap() {
|
|
131707
|
+
const BMap = window.BMap
|
|
131708
|
+
if (!BMap) throw new Error('[XtMap] 百度地图 SDK 未加载')
|
|
131709
|
+
|
|
131710
|
+
const mapOptions = {
|
|
131711
|
+
enableMapClick: false
|
|
131712
|
+
}
|
|
131713
|
+
|
|
131714
|
+
this.mapInstance = new BMap.Map(this.container, mapOptions)
|
|
131715
|
+
this.mapInstance.centerAndZoom(new BMap.Point(this.center[0], this.center[1]), this.zoom)
|
|
131716
|
+
this.mapInstance.enableScrollWheelZoom(true)
|
|
131717
|
+
|
|
131718
|
+
// 应用地图类型
|
|
131719
|
+
this._applyMapType(this.mapType)
|
|
131720
|
+
|
|
131721
|
+
// 应用主题
|
|
131722
|
+
this._applyTheme(this.theme)
|
|
131723
|
+
|
|
131724
|
+
// 等待地图就绪
|
|
131725
|
+
await new Promise((resolve) => setTimeout(resolve, 500))
|
|
131726
|
+
|
|
131727
|
+
for (const [eventName, handler] of this.eventHandlers.entries()) {
|
|
131728
|
+
this._bindEvent(eventName, handler)
|
|
131729
|
+
}
|
|
131730
|
+
}
|
|
131731
|
+
|
|
131732
|
+
_applyMapType(type) {
|
|
131733
|
+
if (!this.mapInstance || !window.BMap) return
|
|
131734
|
+
|
|
131735
|
+
try {
|
|
131736
|
+
// 清除路况图层
|
|
131737
|
+
if (this._trafficLayer) {
|
|
131738
|
+
try {
|
|
131739
|
+
this.mapInstance.removeTileLayer(this._trafficLayer)
|
|
131740
|
+
} catch (e) {}
|
|
131741
|
+
this._trafficLayer = null
|
|
131742
|
+
}
|
|
131743
|
+
|
|
131744
|
+
if (type === 'satellite') {
|
|
131745
|
+
this.mapInstance.setMapType(window.BMAP_SATELLITE_MAP || 1)
|
|
131746
|
+
} else if (type === 'hybrid') {
|
|
131747
|
+
this.mapInstance.setMapType(window.BMAP_HYBRID_MAP || 2)
|
|
131748
|
+
} else if (type === 'traffic') {
|
|
131749
|
+
this.mapInstance.setMapType(window.BMAP_NORMAL_MAP || 0)
|
|
131750
|
+
// 叠加路况图层
|
|
131751
|
+
try {
|
|
131752
|
+
const BMap = window.BMap
|
|
131753
|
+
this._trafficLayer = new BMap.TrafficLayer()
|
|
131754
|
+
this.mapInstance.addTileLayer(this._trafficLayer)
|
|
131755
|
+
} catch (e) {
|
|
131756
|
+
console.warn('[XtMap] 百度地图加载路况图层失败:', e)
|
|
131757
|
+
}
|
|
131758
|
+
} else {
|
|
131759
|
+
this.mapInstance.setMapType(window.BMAP_NORMAL_MAP || 0)
|
|
131760
|
+
}
|
|
131761
|
+
} catch (e) {
|
|
131762
|
+
console.warn('[XtMap] 百度地图切换地图类型失败:', e)
|
|
131763
|
+
}
|
|
131764
|
+
}
|
|
131765
|
+
|
|
131766
|
+
_applyTheme(theme) {
|
|
131767
|
+
if (!this.mapInstance || !window.BMap) return
|
|
131768
|
+
try {
|
|
131769
|
+
// 百度 3.0 通过 setMapStyle 设置主题样式
|
|
131770
|
+
const styleConfig = BAIDU_STYLES[theme] || BAIDU_STYLES.light
|
|
131771
|
+
if (this.mapInstance.setMapStyleV2) {
|
|
131772
|
+
// 新版 API
|
|
131773
|
+
this.mapInstance.setMapStyleV2({ styleId: styleConfig.style === 'dark' ? 'midnight' : '' })
|
|
131774
|
+
} else if (this.mapInstance.setMapStyle) {
|
|
131775
|
+
// 旧版 API
|
|
131776
|
+
const styleJson = theme === 'dark' ? this._getDarkStyleJson() : null
|
|
131777
|
+
if (styleJson) {
|
|
131778
|
+
this.mapInstance.setMapStyle({ styleJson: styleJson })
|
|
131779
|
+
}
|
|
131780
|
+
}
|
|
131781
|
+
} catch (e) {
|
|
131782
|
+
console.warn('[XtMap] 百度地图设置主题失败:', e)
|
|
131783
|
+
}
|
|
131784
|
+
}
|
|
131785
|
+
|
|
131786
|
+
/**
|
|
131787
|
+
* 简易百度地图 dark 样式 JSON 配置
|
|
131788
|
+
*/
|
|
131789
|
+
_getDarkStyleJson() {
|
|
131790
|
+
return [
|
|
131791
|
+
{ featureType: 'land', elementType: 'geometry', stylers: { color: '#1a1a1a' } },
|
|
131792
|
+
{ featureType: 'water', elementType: 'geometry', stylers: { color: '#0a1a2a' } },
|
|
131793
|
+
{ featureType: 'green', elementType: 'geometry', stylers: { color: '#0a2a1a' } },
|
|
131794
|
+
{ featureType: 'building', elementType: 'geometry', stylers: { color: '#2a2a2a' } },
|
|
131795
|
+
{ featureType: 'highway', elementType: 'geometry', stylers: { color: '#3a3a3a' } },
|
|
131796
|
+
{ featureType: 'highway', elementType: 'geometry.stroke', stylers: { color: '#4a4a4a' } },
|
|
131797
|
+
{ featureType: 'arterial', elementType: 'geometry', stylers: { color: '#333333' } },
|
|
131798
|
+
{ featureType: 'arterial', elementType: 'geometry.stroke', stylers: { color: '#3d3d3d' } },
|
|
131799
|
+
{ featureType: 'local', elementType: 'geometry', stylers: { color: '#2a2a2a' } },
|
|
131800
|
+
{ featureType: 'railway', elementType: 'geometry', stylers: { color: '#3a3a3a' } },
|
|
131801
|
+
{ featureType: 'subway', elementType: 'geometry', stylers: { color: '#3a3a3a' } },
|
|
131802
|
+
{ featureType: 'boundary', elementType: 'geometry', stylers: { color: '#666666' } },
|
|
131803
|
+
{ featureType: 'district', elementType: 'labels.text.fill', stylers: { color: '#888888' } },
|
|
131804
|
+
{ featureType: 'poi', elementType: 'labels', stylers: { visibility: 'off' } }
|
|
131805
|
+
]
|
|
131806
|
+
}
|
|
131807
|
+
|
|
131808
|
+
_applyCenter(center) {
|
|
131809
|
+
if (!this.mapInstance || !window.BMap) return
|
|
131810
|
+
try {
|
|
131811
|
+
this.mapInstance.centerAndZoom(new window.BMap.Point(center[0], center[1]), this.zoom)
|
|
131812
|
+
} catch (e) {
|
|
131813
|
+
// 忽略
|
|
131814
|
+
}
|
|
131815
|
+
}
|
|
131816
|
+
|
|
131817
|
+
_applyZoom(zoom) {
|
|
131818
|
+
if (!this.mapInstance) return
|
|
131819
|
+
try {
|
|
131820
|
+
this.mapInstance.setZoom(zoom)
|
|
131821
|
+
} catch (e) {
|
|
131822
|
+
// 忽略
|
|
131823
|
+
}
|
|
131824
|
+
}
|
|
131825
|
+
|
|
131826
|
+
getCenter() {
|
|
131827
|
+
if (this.mapInstance && this.mapInstance.getCenter) {
|
|
131828
|
+
const c = this.mapInstance.getCenter()
|
|
131829
|
+
if (c) return [c.lng, c.lat]
|
|
131830
|
+
}
|
|
131831
|
+
return this.center
|
|
131832
|
+
}
|
|
131833
|
+
|
|
131834
|
+
getZoom() {
|
|
131835
|
+
if (this.mapInstance && this.mapInstance.getZoom) {
|
|
131836
|
+
return this.mapInstance.getZoom()
|
|
131837
|
+
}
|
|
131838
|
+
return this.zoom
|
|
131839
|
+
}
|
|
131840
|
+
|
|
131841
|
+
_bindEvent(eventName, handler) {
|
|
131842
|
+
if (!this.mapInstance) return
|
|
131843
|
+
try {
|
|
131844
|
+
const eventMap = {
|
|
131845
|
+
click: 'click',
|
|
131846
|
+
moveend: 'moveend',
|
|
131847
|
+
zoomend: 'zoomend',
|
|
131848
|
+
zoomchange: 'zoomend',
|
|
131849
|
+
mapmove: 'movestart'
|
|
131850
|
+
}
|
|
131851
|
+
const nativeEvent = eventMap[eventName] || eventName
|
|
131852
|
+
this.mapInstance.addEventListener(nativeEvent, (e) => {
|
|
131853
|
+
const normalized = {
|
|
131854
|
+
originalEvent: e,
|
|
131855
|
+
lnglat: e && e.point ? [e.point.lng, e.point.lat] : null
|
|
131856
|
+
}
|
|
131857
|
+
handler(normalized)
|
|
131858
|
+
})
|
|
131859
|
+
} catch (err) {
|
|
131860
|
+
console.warn('[XtMap] 百度地图事件绑定失败:', eventName, err)
|
|
131861
|
+
}
|
|
131862
|
+
}
|
|
131863
|
+
|
|
131864
|
+
_unbindEvent(eventName, handler) {
|
|
131865
|
+
if (!this.mapInstance) return
|
|
131866
|
+
try {
|
|
131867
|
+
this.mapInstance.removeEventListener(eventName, handler)
|
|
131868
|
+
} catch (e) {
|
|
131869
|
+
// 忽略
|
|
131870
|
+
}
|
|
131871
|
+
}
|
|
131872
|
+
|
|
131873
|
+
_applyResize() {
|
|
131874
|
+
if (this.mapInstance && this.mapInstance.enableResize) {
|
|
131875
|
+
try {
|
|
131876
|
+
// 百度地图默认启用 resize,无需手动调用
|
|
131877
|
+
if (typeof this.mapInstance.checkResize === 'function') {
|
|
131878
|
+
this.mapInstance.checkResize()
|
|
131879
|
+
}
|
|
131880
|
+
} catch (e) {
|
|
131881
|
+
// 忽略
|
|
131882
|
+
}
|
|
131883
|
+
}
|
|
131884
|
+
}
|
|
131885
|
+
|
|
131886
|
+
destroy() {
|
|
131887
|
+
if (this._callbackName && typeof window !== 'undefined') {
|
|
131888
|
+
try {
|
|
131889
|
+
delete window[this._callbackName]
|
|
131890
|
+
} catch (e) {
|
|
131891
|
+
// 忽略
|
|
131892
|
+
}
|
|
131893
|
+
}
|
|
131894
|
+
super.destroy()
|
|
131895
|
+
}
|
|
131896
|
+
}
|
|
131897
|
+
|
|
131898
|
+
/* harmony default export */ var baidu = (baidu_BaiduAdapter);
|
|
131899
|
+
|
|
131900
|
+
// CONCATENATED MODULE: ./src/components/xt-map/adapters/index.js
|
|
131901
|
+
/**
|
|
131902
|
+
* 地图适配器索引
|
|
131903
|
+
* 根据 provider 字符串返回对应的适配器构造函数
|
|
131904
|
+
*/
|
|
131905
|
+
|
|
131906
|
+
|
|
131907
|
+
|
|
131908
|
+
|
|
131909
|
+
|
|
131910
|
+
const adapters = {
|
|
131911
|
+
amap: amap_AMapAdapter,
|
|
131912
|
+
tianditu: tianditu_TiandituAdapter,
|
|
131913
|
+
baidu: baidu_BaiduAdapter
|
|
131914
|
+
}
|
|
131915
|
+
|
|
131916
|
+
const getAdapterClass = (provider) => {
|
|
131917
|
+
return adapters[provider] || amap_AMapAdapter
|
|
131918
|
+
}
|
|
131919
|
+
|
|
131920
|
+
|
|
131921
|
+
|
|
131922
|
+
|
|
131923
|
+
/* harmony default export */ var xt_map_adapters = ({
|
|
131924
|
+
adapters,
|
|
131925
|
+
getAdapterClass,
|
|
131926
|
+
AMapAdapter: amap_AMapAdapter,
|
|
131927
|
+
TiandituAdapter: tianditu_TiandituAdapter,
|
|
131928
|
+
BaiduAdapter: baidu_BaiduAdapter
|
|
131929
|
+
});
|
|
131930
|
+
|
|
131931
|
+
// CONCATENATED MODULE: ./src/components/xt-map/config/xt-map-config.js
|
|
131932
|
+
/**
|
|
131933
|
+
* XtMap 全局配置管理
|
|
131934
|
+
* 支持通过 Vue.use 配置或运行时动态设置地图提供商、密钥、URL、主题等
|
|
131935
|
+
*/
|
|
131936
|
+
|
|
131937
|
+
// 支持的地图提供商
|
|
131938
|
+
const MAP_PROVIDERS = ['amap', 'tianditu', 'baidu']
|
|
131939
|
+
|
|
131940
|
+
// 支持的地图类型(统一枚举,各适配器会转成对应引擎的类型)
|
|
131941
|
+
const MAP_TYPES = ['standard', 'satellite', 'hybrid', 'traffic']
|
|
131942
|
+
|
|
131943
|
+
// 支持的主题
|
|
131944
|
+
const MAP_THEMES = ['light', 'dark']
|
|
131945
|
+
|
|
131946
|
+
// 默认配置 - 以高德地图为基准
|
|
131947
|
+
const xt_map_config_defaultConfig = {
|
|
131948
|
+
provider: 'amap',
|
|
131949
|
+
apiKey: '',
|
|
131950
|
+
apiUrl: null,
|
|
131951
|
+
mapType: 'standard',
|
|
131952
|
+
theme: 'light',
|
|
131953
|
+
center: [116.397428, 39.90923],
|
|
131954
|
+
zoom: 11,
|
|
131955
|
+
plugins: [],
|
|
131956
|
+
securityJsCode: null,
|
|
131957
|
+
// 天地图专用:图层类型(vec:矢量, img:影像, ter:地形)
|
|
131958
|
+
tiandituLayerType: 'vec',
|
|
131959
|
+
// 百度地图专用:坐标系(bd09ll:百度经纬度, bd09mc:百度墨卡托)
|
|
131960
|
+
baiduCoordType: 'bd09ll'
|
|
131961
|
+
}
|
|
131962
|
+
|
|
131963
|
+
// 当前配置
|
|
131964
|
+
let xt_map_config_currentConfig = { ...xt_map_config_defaultConfig }
|
|
131965
|
+
|
|
131966
|
+
// 配置变更监听器
|
|
131967
|
+
const xt_map_config_configChangeListeners = []
|
|
131968
|
+
|
|
131969
|
+
const xt_map_config_emitConfigChange = (key, value) => {
|
|
131970
|
+
xt_map_config_configChangeListeners.forEach(listener => {
|
|
131971
|
+
try {
|
|
131972
|
+
listener(key, value)
|
|
131973
|
+
} catch (e) {
|
|
131974
|
+
console.warn('[XtMap] 配置变更监听异常:', e)
|
|
131975
|
+
}
|
|
131976
|
+
})
|
|
131977
|
+
}
|
|
131978
|
+
|
|
131979
|
+
// 获取完整配置
|
|
131980
|
+
const getMapConfig = () => ({ ...xt_map_config_currentConfig })
|
|
131981
|
+
|
|
131982
|
+
// 设置完整配置
|
|
131983
|
+
const setMapConfig = (config) => {
|
|
131984
|
+
if (typeof config !== 'object' || config === null) {
|
|
131985
|
+
console.warn('[XtMap] setMapConfig 必须传入对象参数')
|
|
131986
|
+
return
|
|
131987
|
+
}
|
|
131988
|
+
|
|
131989
|
+
if (config.provider !== undefined) setMapProvider(config.provider)
|
|
131990
|
+
if (config.apiKey !== undefined) setMapApiKey(config.apiKey)
|
|
131991
|
+
if (config.apiUrl !== undefined) setMapApiUrl(config.apiUrl)
|
|
131992
|
+
if (config.mapType !== undefined) setMapType(config.mapType)
|
|
131993
|
+
if (config.theme !== undefined) setMapTheme(config.theme)
|
|
131994
|
+
if (config.center !== undefined) setMapCenter(config.center)
|
|
131995
|
+
if (config.zoom !== undefined) setMapZoom(config.zoom)
|
|
131996
|
+
if (config.plugins !== undefined) setMapPlugins(config.plugins)
|
|
131997
|
+
if (config.securityJsCode !== undefined) setSecurityJsCode(config.securityJsCode)
|
|
131998
|
+
}
|
|
131999
|
+
|
|
132000
|
+
const setMapProvider = (provider) => {
|
|
132001
|
+
if (!MAP_PROVIDERS.includes(provider)) {
|
|
132002
|
+
console.warn(`[XtMap] 无效的地图提供商: ${provider},可选: ${MAP_PROVIDERS.join(', ')}`)
|
|
132003
|
+
return
|
|
132004
|
+
}
|
|
132005
|
+
xt_map_config_currentConfig.provider = provider
|
|
132006
|
+
xt_map_config_emitConfigChange('provider', provider)
|
|
132007
|
+
}
|
|
132008
|
+
|
|
132009
|
+
const setMapApiKey = (key) => {
|
|
132010
|
+
xt_map_config_currentConfig.apiKey = key
|
|
132011
|
+
xt_map_config_emitConfigChange('apiKey', key)
|
|
132012
|
+
}
|
|
132013
|
+
|
|
132014
|
+
const setMapApiUrl = (url) => {
|
|
132015
|
+
xt_map_config_currentConfig.apiUrl = url
|
|
132016
|
+
xt_map_config_emitConfigChange('apiUrl', url)
|
|
132017
|
+
}
|
|
132018
|
+
|
|
132019
|
+
const setMapType = (type) => {
|
|
132020
|
+
if (!MAP_TYPES.includes(type)) {
|
|
132021
|
+
console.warn(`[XtMap] 无效的地图类型: ${type},可选: ${MAP_TYPES.join(', ')}`)
|
|
132022
|
+
return
|
|
132023
|
+
}
|
|
132024
|
+
xt_map_config_currentConfig.mapType = type
|
|
132025
|
+
xt_map_config_emitConfigChange('mapType', type)
|
|
132026
|
+
}
|
|
132027
|
+
|
|
132028
|
+
const setMapTheme = (theme) => {
|
|
132029
|
+
if (!MAP_THEMES.includes(theme)) {
|
|
132030
|
+
console.warn(`[XtMap] 无效的主题: ${theme},可选: ${MAP_THEMES.join(', ')}`)
|
|
132031
|
+
return
|
|
132032
|
+
}
|
|
132033
|
+
xt_map_config_currentConfig.theme = theme
|
|
132034
|
+
xt_map_config_emitConfigChange('theme', theme)
|
|
132035
|
+
}
|
|
132036
|
+
|
|
132037
|
+
const setMapCenter = (center) => {
|
|
132038
|
+
if (!Array.isArray(center) || center.length !== 2) {
|
|
132039
|
+
console.warn('[XtMap] center 必须是 [lng, lat] 数组')
|
|
132040
|
+
return
|
|
132041
|
+
}
|
|
132042
|
+
xt_map_config_currentConfig.center = center
|
|
132043
|
+
xt_map_config_emitConfigChange('center', center)
|
|
132044
|
+
}
|
|
132045
|
+
|
|
132046
|
+
const setMapZoom = (zoom) => {
|
|
132047
|
+
const z = Number(zoom)
|
|
132048
|
+
if (isNaN(z)) {
|
|
132049
|
+
console.warn('[XtMap] zoom 必须是数字')
|
|
132050
|
+
return
|
|
132051
|
+
}
|
|
132052
|
+
xt_map_config_currentConfig.zoom = z
|
|
132053
|
+
xt_map_config_emitConfigChange('zoom', z)
|
|
132054
|
+
}
|
|
132055
|
+
|
|
132056
|
+
const setMapPlugins = (plugins) => {
|
|
132057
|
+
if (!Array.isArray(plugins)) {
|
|
132058
|
+
console.warn('[XtMap] plugins 必须是数组')
|
|
132059
|
+
return
|
|
132060
|
+
}
|
|
132061
|
+
xt_map_config_currentConfig.plugins = plugins
|
|
132062
|
+
xt_map_config_emitConfigChange('plugins', plugins)
|
|
132063
|
+
}
|
|
132064
|
+
|
|
132065
|
+
const setSecurityJsCode = (code) => {
|
|
132066
|
+
xt_map_config_currentConfig.securityJsCode = code
|
|
132067
|
+
// 高德地图安全密钥:设置 window._AMapSecurityConfig
|
|
132068
|
+
if (typeof window !== 'undefined' && code) {
|
|
132069
|
+
window._AMapSecurityConfig = {
|
|
132070
|
+
securityJsCode: code,
|
|
132071
|
+
...(window._AMapSecurityConfig || {})
|
|
132072
|
+
}
|
|
132073
|
+
}
|
|
132074
|
+
xt_map_config_emitConfigChange('securityJsCode', code)
|
|
132075
|
+
}
|
|
132076
|
+
|
|
132077
|
+
// 获取当前配置的快捷方法
|
|
132078
|
+
const getMapProvider = () => xt_map_config_currentConfig.provider
|
|
132079
|
+
const getMapApiKey = () => xt_map_config_currentConfig.apiKey
|
|
132080
|
+
const getMapApiUrl = () => xt_map_config_currentConfig.apiUrl
|
|
132081
|
+
const getMapType = () => xt_map_config_currentConfig.mapType
|
|
132082
|
+
const getMapTheme = () => xt_map_config_currentConfig.theme
|
|
132083
|
+
const getMapCenter = () => xt_map_config_currentConfig.center
|
|
132084
|
+
const getMapZoom = () => xt_map_config_currentConfig.zoom
|
|
132085
|
+
const getMapPlugins = () => xt_map_config_currentConfig.plugins
|
|
132086
|
+
|
|
132087
|
+
// 监听配置变更
|
|
132088
|
+
const onMapConfigChange = (listener) => {
|
|
132089
|
+
if (typeof listener === 'function') {
|
|
132090
|
+
xt_map_config_configChangeListeners.push(listener)
|
|
132091
|
+
return () => {
|
|
132092
|
+
const index = xt_map_config_configChangeListeners.indexOf(listener)
|
|
132093
|
+
if (index > -1) xt_map_config_configChangeListeners.splice(index, 1)
|
|
132094
|
+
}
|
|
132095
|
+
}
|
|
132096
|
+
}
|
|
132097
|
+
|
|
132098
|
+
// 重置为默认配置
|
|
132099
|
+
const resetMapConfig = () => {
|
|
132100
|
+
setMapConfig(xt_map_config_defaultConfig)
|
|
132101
|
+
}
|
|
132102
|
+
|
|
132103
|
+
/* harmony default export */ var xt_map_config = ({
|
|
132104
|
+
MAP_PROVIDERS,
|
|
132105
|
+
MAP_TYPES,
|
|
132106
|
+
MAP_THEMES,
|
|
132107
|
+
getMapConfig,
|
|
132108
|
+
setMapConfig,
|
|
132109
|
+
setMapProvider,
|
|
132110
|
+
setMapApiKey,
|
|
132111
|
+
setMapApiUrl,
|
|
132112
|
+
setMapType,
|
|
132113
|
+
setMapTheme,
|
|
132114
|
+
setMapCenter,
|
|
132115
|
+
setMapZoom,
|
|
132116
|
+
setMapPlugins,
|
|
132117
|
+
setSecurityJsCode,
|
|
132118
|
+
getMapProvider,
|
|
132119
|
+
getMapApiKey,
|
|
132120
|
+
getMapApiUrl,
|
|
132121
|
+
getMapType,
|
|
132122
|
+
getMapTheme,
|
|
132123
|
+
getMapCenter,
|
|
132124
|
+
getMapZoom,
|
|
132125
|
+
getMapPlugins,
|
|
132126
|
+
onMapConfigChange,
|
|
132127
|
+
resetMapConfig
|
|
132128
|
+
});
|
|
132129
|
+
|
|
132130
|
+
// 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
|
|
132131
|
+
|
|
132132
|
+
|
|
132133
|
+
|
|
132134
|
+
|
|
132135
|
+
|
|
132136
|
+
/* harmony default export */ var xt_mapvue_type_script_lang_js = ({
|
|
132137
|
+
name: 'XtMap',
|
|
132138
|
+
|
|
132139
|
+
props: {
|
|
132140
|
+
provider: {
|
|
132141
|
+
type: String,
|
|
132142
|
+
default: '',
|
|
132143
|
+
validator: (val) => val === '' || MAP_PROVIDERS.includes(val)
|
|
132144
|
+
},
|
|
132145
|
+
apiKey: {
|
|
132146
|
+
type: String,
|
|
132147
|
+
default: ''
|
|
132148
|
+
},
|
|
132149
|
+
apiUrl: {
|
|
132150
|
+
type: String,
|
|
132151
|
+
default: ''
|
|
132152
|
+
},
|
|
132153
|
+
mapType: {
|
|
132154
|
+
type: String,
|
|
132155
|
+
default: '',
|
|
132156
|
+
validator: (val) => val === '' || MAP_TYPES.includes(val)
|
|
132157
|
+
},
|
|
132158
|
+
theme: {
|
|
132159
|
+
type: String,
|
|
132160
|
+
default: '',
|
|
132161
|
+
validator: (val) => val === '' || MAP_THEMES.includes(val)
|
|
132162
|
+
},
|
|
132163
|
+
center: {
|
|
132164
|
+
type: Array,
|
|
132165
|
+
default: () => null
|
|
132166
|
+
},
|
|
132167
|
+
zoom: {
|
|
132168
|
+
type: Number,
|
|
132169
|
+
default: null
|
|
132170
|
+
},
|
|
132171
|
+
plugins: {
|
|
132172
|
+
type: Array,
|
|
132173
|
+
default: () => []
|
|
132174
|
+
},
|
|
132175
|
+
width: {
|
|
132176
|
+
type: String,
|
|
132177
|
+
default: '100%'
|
|
132178
|
+
},
|
|
132179
|
+
height: {
|
|
132180
|
+
type: String,
|
|
132181
|
+
default: '400px'
|
|
132182
|
+
},
|
|
132183
|
+
securityJsCode: {
|
|
132184
|
+
type: String,
|
|
132185
|
+
default: ''
|
|
132186
|
+
},
|
|
132187
|
+
tiandituLayerType: {
|
|
132188
|
+
type: String,
|
|
132189
|
+
default: 'vec'
|
|
132190
|
+
},
|
|
132191
|
+
baiduCoordType: {
|
|
132192
|
+
type: String,
|
|
132193
|
+
default: 'bd09ll'
|
|
132194
|
+
}
|
|
132195
|
+
},
|
|
132196
|
+
|
|
132197
|
+
data() {
|
|
132198
|
+
return {
|
|
132199
|
+
loading: true,
|
|
132200
|
+
errorMessage: '',
|
|
132201
|
+
adapter: null,
|
|
132202
|
+
_unsubscribeConfig: null
|
|
132203
|
+
}
|
|
132204
|
+
},
|
|
132205
|
+
|
|
132206
|
+
computed: {
|
|
132207
|
+
mergedProvider() {
|
|
132208
|
+
return this.provider || getMapProvider() || 'amap'
|
|
132209
|
+
},
|
|
132210
|
+
mergedApiKey() {
|
|
132211
|
+
return this.apiKey || getMapApiKey() || ''
|
|
132212
|
+
},
|
|
132213
|
+
mergedApiUrl() {
|
|
132214
|
+
return this.apiUrl || getMapApiUrl() || ''
|
|
132215
|
+
},
|
|
132216
|
+
mergedMapType() {
|
|
132217
|
+
return this.mapType || getMapType() || 'standard'
|
|
132218
|
+
},
|
|
132219
|
+
mergedTheme() {
|
|
132220
|
+
return this.theme || getMapTheme() || 'light'
|
|
132221
|
+
},
|
|
132222
|
+
mergedCenter() {
|
|
132223
|
+
return this.center || getMapCenter() || [116.397428, 39.90923]
|
|
132224
|
+
},
|
|
132225
|
+
mergedZoom() {
|
|
132226
|
+
return this.zoom !== null ? this.zoom : getMapZoom()
|
|
132227
|
+
},
|
|
132228
|
+
mergedSecurityJsCode() {
|
|
132229
|
+
return this.securityJsCode || (getMapConfig().securityJsCode) || ''
|
|
132230
|
+
},
|
|
132231
|
+
mergedPlugins() {
|
|
132232
|
+
return this.plugins.length > 0 ? this.plugins : getMapConfig().plugins || []
|
|
132233
|
+
}
|
|
132234
|
+
},
|
|
132235
|
+
|
|
132236
|
+
watch: {
|
|
132237
|
+
mergedProvider: {
|
|
132238
|
+
handler() {
|
|
132239
|
+
this.$nextTick(() => this.rebuildMap())
|
|
132240
|
+
}
|
|
132241
|
+
},
|
|
132242
|
+
mergedApiKey: {
|
|
132243
|
+
handler() {
|
|
132244
|
+
this.$nextTick(() => this.rebuildMap())
|
|
132245
|
+
}
|
|
132246
|
+
},
|
|
132247
|
+
mergedMapType: {
|
|
132248
|
+
handler(newVal) {
|
|
132249
|
+
if (this.adapter) this.adapter.setMapType(newVal)
|
|
132250
|
+
}
|
|
132251
|
+
},
|
|
132252
|
+
mergedTheme: {
|
|
132253
|
+
handler(newVal) {
|
|
132254
|
+
if (this.adapter) this.adapter.setTheme(newVal)
|
|
132255
|
+
if (this.$refs.mapContainer) {
|
|
132256
|
+
this.$refs.mapContainer.setAttribute('data-theme', newVal)
|
|
132257
|
+
}
|
|
132258
|
+
}
|
|
132259
|
+
},
|
|
132260
|
+
mergedCenter: {
|
|
132261
|
+
handler(newVal) {
|
|
132262
|
+
if (this.adapter) this.adapter.setCenter(newVal)
|
|
132263
|
+
}
|
|
132264
|
+
},
|
|
132265
|
+
mergedZoom: {
|
|
132266
|
+
handler(newVal) {
|
|
132267
|
+
if (this.adapter) this.adapter.setZoom(newVal)
|
|
132268
|
+
}
|
|
132269
|
+
},
|
|
132270
|
+
width: {
|
|
132271
|
+
handler() {
|
|
132272
|
+
this.$nextTick(() => {
|
|
132273
|
+
if (this.adapter) this.adapter.resize()
|
|
132274
|
+
})
|
|
132275
|
+
}
|
|
132276
|
+
},
|
|
132277
|
+
height: {
|
|
132278
|
+
handler() {
|
|
132279
|
+
this.$nextTick(() => {
|
|
132280
|
+
if (this.adapter) this.adapter.resize()
|
|
132281
|
+
})
|
|
132282
|
+
}
|
|
132283
|
+
},
|
|
132284
|
+
securityJsCode: {
|
|
132285
|
+
handler(newVal) {
|
|
132286
|
+
if (newVal) {
|
|
132287
|
+
setSecurityJsCode(newVal)
|
|
132288
|
+
// 高德 2.0:SDK 已加载后再设置 securityJsCode 无效,需要重建地图
|
|
132289
|
+
if (this.mergedProvider === 'amap' && this.adapter && this.adapter.ready) {
|
|
132290
|
+
this.$nextTick(() => this.rebuildMap())
|
|
132291
|
+
}
|
|
132292
|
+
}
|
|
132293
|
+
}
|
|
132294
|
+
}
|
|
132295
|
+
},
|
|
132296
|
+
|
|
132297
|
+
mounted() {
|
|
132298
|
+
// 监听全局配置变更
|
|
132299
|
+
this._unsubscribeConfig = onMapConfigChange((key, value) => {
|
|
132300
|
+
if (!this.provider && (key === 'provider')) this.$nextTick(() => this.rebuildMap())
|
|
132301
|
+
if (!this.apiKey && (key === 'apiKey')) this.$nextTick(() => this.rebuildMap())
|
|
132302
|
+
if (!this.apiUrl && (key === 'apiUrl')) this.$nextTick(() => this.rebuildMap())
|
|
132303
|
+
if (!this.theme && key === 'theme' && this.adapter) this.adapter.setTheme(value)
|
|
132304
|
+
if (!this.mapType && key === 'mapType' && this.adapter) this.adapter.setMapType(value)
|
|
132305
|
+
if (!this.center && key === 'center' && this.adapter) this.adapter.setCenter(value)
|
|
132306
|
+
if (this.zoom === null && key === 'zoom' && this.adapter) this.adapter.setZoom(value)
|
|
132307
|
+
})
|
|
132308
|
+
|
|
132309
|
+
// 设置高德安全密钥
|
|
132310
|
+
if (this.securityJsCode) setSecurityJsCode(this.securityJsCode)
|
|
132311
|
+
|
|
132312
|
+
this.$nextTick(() => this.initMap())
|
|
132313
|
+
|
|
132314
|
+
// 监听窗口尺寸变化
|
|
132315
|
+
this._onWindowResize = () => {
|
|
132316
|
+
if (this.adapter) this.adapter.resize()
|
|
132317
|
+
}
|
|
132318
|
+
if (typeof window !== 'undefined') {
|
|
132319
|
+
window.addEventListener('resize', this._onWindowResize)
|
|
132320
|
+
}
|
|
132321
|
+
},
|
|
132322
|
+
|
|
132323
|
+
beforeDestroy() {
|
|
132324
|
+
this.destroyMap()
|
|
132325
|
+
if (this._unsubscribeConfig) this._unsubscribeConfig()
|
|
132326
|
+
if (this._onWindowResize && typeof window !== 'undefined') {
|
|
132327
|
+
window.removeEventListener('resize', this._onWindowResize)
|
|
132328
|
+
}
|
|
132329
|
+
},
|
|
132330
|
+
|
|
132331
|
+
methods: {
|
|
132332
|
+
async initMap() {
|
|
132333
|
+
const container = this.$refs.mapContainer
|
|
132334
|
+
if (!container) return
|
|
132335
|
+
|
|
132336
|
+
// 设置容器尺寸
|
|
132337
|
+
container.style.width = this.width
|
|
132338
|
+
container.style.height = this.height
|
|
132339
|
+
|
|
132340
|
+
// 设置安全密钥(高德需要)
|
|
132341
|
+
if (this.securityJsCode) setSecurityJsCode(this.securityJsCode)
|
|
132342
|
+
|
|
132343
|
+
this.loading = true
|
|
132344
|
+
this.errorMessage = ''
|
|
132345
|
+
|
|
132346
|
+
const AdapterClass = getAdapterClass(this.mergedProvider)
|
|
132347
|
+
|
|
132348
|
+
this.adapter = new AdapterClass(container, {
|
|
132349
|
+
apiKey: this.mergedApiKey,
|
|
132350
|
+
apiUrl: this.mergedApiUrl,
|
|
132351
|
+
mapType: this.mergedMapType,
|
|
132352
|
+
theme: this.mergedTheme,
|
|
132353
|
+
center: this.mergedCenter,
|
|
132354
|
+
zoom: this.mergedZoom,
|
|
132355
|
+
plugins: this.mergedPlugins,
|
|
132356
|
+
securityJsCode: this.mergedSecurityJsCode,
|
|
132357
|
+
tiandituLayerType: this.tiandituLayerType,
|
|
132358
|
+
baiduCoordType: this.baiduCoordType
|
|
132359
|
+
})
|
|
132360
|
+
|
|
132361
|
+
try {
|
|
132362
|
+
await this.adapter.init()
|
|
132363
|
+
this.loading = false
|
|
132364
|
+
|
|
132365
|
+
// 绑定事件
|
|
132366
|
+
this._bindAdapterEvents()
|
|
132367
|
+
|
|
132368
|
+
// 向父组件发出 ready 事件
|
|
132369
|
+
this.$emit('ready', {
|
|
132370
|
+
provider: this.mergedProvider,
|
|
132371
|
+
map: this.adapter.getNativeMap(),
|
|
132372
|
+
adapter: this.adapter
|
|
132373
|
+
})
|
|
132374
|
+
} catch (err) {
|
|
132375
|
+
this.loading = false
|
|
132376
|
+
this.errorMessage = err.message || '地图初始化失败'
|
|
132377
|
+
this.$emit('error', err)
|
|
132378
|
+
}
|
|
132379
|
+
},
|
|
132380
|
+
|
|
132381
|
+
rebuildMap() {
|
|
132382
|
+
this.destroyMap()
|
|
132383
|
+
// 清理脚本缓存,确保新配置能生效(例如切换密钥后重新加载)
|
|
132384
|
+
if (typeof clearScriptCache === 'function') {
|
|
132385
|
+
clearScriptCache()
|
|
132386
|
+
}
|
|
132387
|
+
this.$nextTick(() => this.initMap())
|
|
132388
|
+
},
|
|
132389
|
+
|
|
132390
|
+
destroyMap() {
|
|
132391
|
+
if (this.adapter) {
|
|
132392
|
+
this.adapter.destroy()
|
|
132393
|
+
this.adapter = null
|
|
132394
|
+
}
|
|
132395
|
+
},
|
|
132396
|
+
|
|
132397
|
+
_bindAdapterEvents() {
|
|
132398
|
+
if (!this.adapter) return
|
|
132399
|
+
|
|
132400
|
+
const events = ['click', 'moveend', 'zoomend', 'zoomchange', 'mapmove']
|
|
132401
|
+
events.forEach((evt) => {
|
|
132402
|
+
this.adapter.on(evt, (data) => {
|
|
132403
|
+
this.$emit(evt, data)
|
|
132404
|
+
})
|
|
132405
|
+
})
|
|
132406
|
+
},
|
|
132407
|
+
|
|
132408
|
+
// 对外暴露的统一 API
|
|
132409
|
+
setCenter(center) {
|
|
132410
|
+
if (this.adapter) this.adapter.setCenter(center)
|
|
132411
|
+
},
|
|
132412
|
+
|
|
132413
|
+
setZoom(zoom) {
|
|
132414
|
+
if (this.adapter) this.adapter.setZoom(zoom)
|
|
132415
|
+
},
|
|
132416
|
+
|
|
132417
|
+
setMapType(type) {
|
|
132418
|
+
if (this.adapter) this.adapter.setMapType(type)
|
|
132419
|
+
},
|
|
132420
|
+
|
|
132421
|
+
setTheme(theme) {
|
|
132422
|
+
if (this.adapter) this.adapter.setTheme(theme)
|
|
132423
|
+
},
|
|
132424
|
+
|
|
132425
|
+
getCenter() {
|
|
132426
|
+
return this.adapter ? this.adapter.getCenter() : this.mergedCenter
|
|
132427
|
+
},
|
|
132428
|
+
|
|
132429
|
+
getZoom() {
|
|
132430
|
+
return this.adapter ? this.adapter.getZoom() : this.mergedZoom
|
|
132431
|
+
},
|
|
132432
|
+
|
|
132433
|
+
getNativeMap() {
|
|
132434
|
+
return this.adapter ? this.adapter.getNativeMap() : null
|
|
132435
|
+
},
|
|
132436
|
+
|
|
132437
|
+
resize() {
|
|
132438
|
+
if (this.adapter) this.adapter.resize()
|
|
132439
|
+
},
|
|
132440
|
+
|
|
132441
|
+
on(eventName, handler) {
|
|
132442
|
+
if (this.adapter) this.adapter.on(eventName, handler)
|
|
132443
|
+
},
|
|
132444
|
+
|
|
132445
|
+
off(eventName) {
|
|
132446
|
+
if (this.adapter) this.adapter.off(eventName)
|
|
132447
|
+
},
|
|
132448
|
+
|
|
132449
|
+
rebuild() {
|
|
132450
|
+
this.rebuildMap()
|
|
132451
|
+
}
|
|
132452
|
+
}
|
|
132453
|
+
});
|
|
132454
|
+
|
|
132455
|
+
// CONCATENATED MODULE: ./src/components/xt-map/index.vue?vue&type=script&lang=js
|
|
132456
|
+
/* harmony default export */ var components_xt_mapvue_type_script_lang_js = (xt_mapvue_type_script_lang_js);
|
|
132457
|
+
// CONCATENATED MODULE: ./src/components/xt-map/index.vue
|
|
132458
|
+
|
|
132459
|
+
|
|
132460
|
+
|
|
132461
|
+
|
|
132462
|
+
|
|
132463
|
+
/* normalize component */
|
|
132464
|
+
|
|
132465
|
+
var xt_map_component = normalizeComponent(
|
|
132466
|
+
components_xt_mapvue_type_script_lang_js,
|
|
132467
|
+
xt_mapvue_type_template_id_0c15823e_render,
|
|
132468
|
+
xt_mapvue_type_template_id_0c15823e_staticRenderFns,
|
|
132469
|
+
false,
|
|
132470
|
+
null,
|
|
132471
|
+
null,
|
|
132472
|
+
null
|
|
132473
|
+
|
|
132474
|
+
)
|
|
132475
|
+
|
|
132476
|
+
/* harmony default export */ var xt_map = (xt_map_component.exports);
|
|
132477
|
+
// 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
|
|
132478
|
+
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)
|
|
132479
|
+
}
|
|
132480
|
+
var providervue_type_template_id_16f243b0_scoped_true_staticRenderFns = []
|
|
132481
|
+
|
|
132482
|
+
|
|
132483
|
+
// CONCATENATED MODULE: ./src/components/xt-map/provider.vue?vue&type=template&id=16f243b0&scoped=true
|
|
132484
|
+
|
|
132485
|
+
// 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
|
|
132486
|
+
|
|
132487
|
+
|
|
132488
|
+
|
|
132489
|
+
/* harmony default export */ var providervue_type_script_lang_js = ({
|
|
132490
|
+
name: 'XtMapProvider',
|
|
132491
|
+
|
|
132492
|
+
props: {
|
|
132493
|
+
provider: {
|
|
132494
|
+
type: String,
|
|
132495
|
+
default: '',
|
|
132496
|
+
validator: (val) => val === '' || MAP_PROVIDERS.includes(val)
|
|
132497
|
+
},
|
|
132498
|
+
apiKey: {
|
|
132499
|
+
type: String,
|
|
132500
|
+
default: ''
|
|
132501
|
+
},
|
|
132502
|
+
apiUrl: {
|
|
132503
|
+
type: String,
|
|
132504
|
+
default: ''
|
|
132505
|
+
},
|
|
132506
|
+
mapType: {
|
|
132507
|
+
type: String,
|
|
132508
|
+
default: '',
|
|
132509
|
+
validator: (val) => val === '' || MAP_TYPES.includes(val)
|
|
132510
|
+
},
|
|
132511
|
+
theme: {
|
|
132512
|
+
type: String,
|
|
132513
|
+
default: '',
|
|
132514
|
+
validator: (val) => val === '' || MAP_THEMES.includes(val)
|
|
132515
|
+
},
|
|
132516
|
+
center: {
|
|
132517
|
+
type: Array,
|
|
132518
|
+
default: () => null
|
|
132519
|
+
},
|
|
132520
|
+
zoom: {
|
|
132521
|
+
type: Number,
|
|
132522
|
+
default: null
|
|
132523
|
+
},
|
|
132524
|
+
plugins: {
|
|
132525
|
+
type: Array,
|
|
132526
|
+
default: () => []
|
|
132527
|
+
},
|
|
132528
|
+
securityJsCode: {
|
|
132529
|
+
type: String,
|
|
132530
|
+
default: ''
|
|
132531
|
+
},
|
|
132532
|
+
tag: {
|
|
132533
|
+
type: String,
|
|
132534
|
+
default: 'div'
|
|
132535
|
+
}
|
|
132536
|
+
},
|
|
132537
|
+
|
|
132538
|
+
data() {
|
|
132539
|
+
return {
|
|
132540
|
+
mergedTheme: this.theme || getMapTheme() || 'light'
|
|
132541
|
+
}
|
|
132542
|
+
},
|
|
132543
|
+
|
|
132544
|
+
computed: {
|
|
132545
|
+
wrapperStyle() {
|
|
132546
|
+
return {}
|
|
132547
|
+
}
|
|
132548
|
+
},
|
|
132549
|
+
|
|
132550
|
+
watch: {
|
|
132551
|
+
provider: {
|
|
132552
|
+
immediate: true,
|
|
132553
|
+
handler(newVal) {
|
|
132554
|
+
if (newVal) setMapProvider(newVal)
|
|
132555
|
+
}
|
|
132556
|
+
},
|
|
132557
|
+
apiKey: {
|
|
132558
|
+
immediate: true,
|
|
132559
|
+
handler(newVal) {
|
|
132560
|
+
if (newVal) setMapApiKey(newVal)
|
|
132561
|
+
}
|
|
132562
|
+
},
|
|
132563
|
+
apiUrl: {
|
|
132564
|
+
immediate: true,
|
|
132565
|
+
handler(newVal) {
|
|
132566
|
+
if (newVal) setMapApiUrl(newVal)
|
|
132567
|
+
}
|
|
132568
|
+
},
|
|
132569
|
+
mapType: {
|
|
132570
|
+
immediate: true,
|
|
132571
|
+
handler(newVal) {
|
|
132572
|
+
if (newVal) setMapType(newVal)
|
|
132573
|
+
}
|
|
132574
|
+
},
|
|
132575
|
+
theme: {
|
|
132576
|
+
immediate: true,
|
|
132577
|
+
handler(newVal) {
|
|
132578
|
+
if (newVal) {
|
|
132579
|
+
setMapTheme(newVal)
|
|
132580
|
+
this.mergedTheme = newVal
|
|
132581
|
+
}
|
|
132582
|
+
}
|
|
132583
|
+
},
|
|
132584
|
+
center: {
|
|
132585
|
+
immediate: true,
|
|
132586
|
+
handler(newVal) {
|
|
132587
|
+
if (newVal) setMapCenter(newVal)
|
|
132588
|
+
}
|
|
132589
|
+
},
|
|
132590
|
+
zoom: {
|
|
132591
|
+
immediate: true,
|
|
132592
|
+
handler(newVal) {
|
|
132593
|
+
if (newVal !== null && newVal !== undefined) setMapZoom(newVal)
|
|
132594
|
+
}
|
|
132595
|
+
},
|
|
132596
|
+
plugins: {
|
|
132597
|
+
immediate: true,
|
|
132598
|
+
handler(newVal) {
|
|
132599
|
+
if (newVal && newVal.length > 0) setMapPlugins(newVal)
|
|
132600
|
+
}
|
|
132601
|
+
},
|
|
132602
|
+
securityJsCode: {
|
|
132603
|
+
immediate: true,
|
|
132604
|
+
handler(newVal) {
|
|
132605
|
+
if (newVal) setSecurityJsCode(newVal)
|
|
132606
|
+
}
|
|
132607
|
+
}
|
|
132608
|
+
},
|
|
132609
|
+
|
|
132610
|
+
provide() {
|
|
132611
|
+
return {
|
|
132612
|
+
xtMapConfig: {
|
|
132613
|
+
getProvider: () => this.provider || getMapProvider(),
|
|
132614
|
+
getApiKey: () => this.apiKey || getMapApiKey(),
|
|
132615
|
+
getApiUrl: () => this.apiUrl || getMapApiUrl(),
|
|
132616
|
+
getMapType: () => this.mapType || getMapType(),
|
|
132617
|
+
getTheme: () => this.theme || getMapTheme(),
|
|
132618
|
+
getCenter: () => this.center || getMapCenter(),
|
|
132619
|
+
getZoom: () => this.zoom !== null ? this.zoom : getMapZoom(),
|
|
132620
|
+
getPlugins: () => this.plugins.length > 0 ? this.plugins : getMapPlugins(),
|
|
132621
|
+
getConfig: () => ({
|
|
132622
|
+
provider: this.provider || getMapProvider(),
|
|
132623
|
+
apiKey: this.apiKey || getMapApiKey(),
|
|
132624
|
+
apiUrl: this.apiUrl || getMapApiUrl(),
|
|
132625
|
+
mapType: this.mapType || getMapType(),
|
|
132626
|
+
theme: this.theme || getMapTheme(),
|
|
132627
|
+
center: this.center || getMapCenter(),
|
|
132628
|
+
zoom: this.zoom !== null ? this.zoom : getMapZoom()
|
|
132629
|
+
})
|
|
132630
|
+
}
|
|
132631
|
+
}
|
|
132632
|
+
},
|
|
132633
|
+
|
|
132634
|
+
created() {
|
|
132635
|
+
this._unsubscribe = onMapConfigChange((key, value) => {
|
|
132636
|
+
if (key === 'theme') this.mergedTheme = this.theme || value
|
|
132637
|
+
})
|
|
132638
|
+
},
|
|
132639
|
+
|
|
132640
|
+
beforeDestroy() {
|
|
132641
|
+
if (this._unsubscribe) this._unsubscribe()
|
|
132642
|
+
}
|
|
132643
|
+
});
|
|
132644
|
+
|
|
132645
|
+
// CONCATENATED MODULE: ./src/components/xt-map/provider.vue?vue&type=script&lang=js
|
|
132646
|
+
/* harmony default export */ var xt_map_providervue_type_script_lang_js = (providervue_type_script_lang_js);
|
|
132647
|
+
// EXTERNAL MODULE: ./src/components/xt-map/provider.vue?vue&type=style&index=0&id=16f243b0&prod&scoped=true&lang=css
|
|
132648
|
+
var providervue_type_style_index_0_id_16f243b0_prod_scoped_true_lang_css = __webpack_require__("3cef");
|
|
132649
|
+
|
|
132650
|
+
// CONCATENATED MODULE: ./src/components/xt-map/provider.vue
|
|
132651
|
+
|
|
132652
|
+
|
|
132653
|
+
|
|
132654
|
+
|
|
132655
|
+
|
|
132656
|
+
|
|
132657
|
+
/* normalize component */
|
|
132658
|
+
|
|
132659
|
+
var provider_component = normalizeComponent(
|
|
132660
|
+
xt_map_providervue_type_script_lang_js,
|
|
132661
|
+
providervue_type_template_id_16f243b0_scoped_true_render,
|
|
132662
|
+
providervue_type_template_id_16f243b0_scoped_true_staticRenderFns,
|
|
132663
|
+
false,
|
|
132664
|
+
null,
|
|
132665
|
+
"16f243b0",
|
|
132666
|
+
null
|
|
132667
|
+
|
|
132668
|
+
)
|
|
132669
|
+
|
|
132670
|
+
/* harmony default export */ var xt_map_provider = (provider_component.exports);
|
|
132671
|
+
// EXTERNAL MODULE: ./src/components/xt-map/style/index.scss
|
|
132672
|
+
var xt_map_style = __webpack_require__("c759");
|
|
132673
|
+
|
|
132674
|
+
// CONCATENATED MODULE: ./src/components/xt-map/index.js
|
|
132675
|
+
|
|
132676
|
+
|
|
132677
|
+
|
|
132678
|
+
|
|
132679
|
+
xt_map.install = function (Vue) {
|
|
132680
|
+
Vue.component(xt_map.name, xt_map)
|
|
132681
|
+
}
|
|
132682
|
+
|
|
132683
|
+
xt_map_provider.install = function (Vue) {
|
|
132684
|
+
Vue.component(xt_map_provider.name, xt_map_provider)
|
|
132685
|
+
}
|
|
132686
|
+
|
|
132687
|
+
|
|
132688
|
+
|
|
132689
|
+
/* harmony default export */ var components_xt_map = ({
|
|
132690
|
+
install(Vue) {
|
|
132691
|
+
Vue.component(xt_map.name, xt_map)
|
|
132692
|
+
Vue.component(xt_map_provider.name, xt_map_provider)
|
|
132693
|
+
},
|
|
132694
|
+
XtMap: xt_map,
|
|
132695
|
+
XtMapProvider: xt_map_provider
|
|
132696
|
+
});
|
|
132697
|
+
|
|
132698
|
+
// 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
|
|
130679
132699
|
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)
|
|
130680
132700
|
}
|
|
130681
132701
|
var xt_grid_boxvue_type_template_id_67e197c4_staticRenderFns = []
|
|
@@ -130836,10 +132856,16 @@ var xt_grid_box_component = normalizeComponent(
|
|
|
130836
132856
|
|
|
130837
132857
|
/* harmony default export */ var xt_grid_box = (xt_grid_box_component.exports);
|
|
130838
132858
|
// CONCATENATED MODULE: ./src/components/xt-grid-box/index.js
|
|
132859
|
+
|
|
132860
|
+
|
|
132861
|
+
xt_grid_box.install = function (Vue) {
|
|
132862
|
+
Vue.component(xt_grid_box.name, xt_grid_box)
|
|
132863
|
+
}
|
|
132864
|
+
|
|
132865
|
+
/* harmony default export */ var components_xt_grid_box = (xt_grid_box);
|
|
130839
132866
|
|
|
130840
|
-
/* harmony default export */ var components_xt_grid_box = (xt_grid_box);
|
|
130841
132867
|
|
|
130842
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
132868
|
+
// 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
|
|
130843
132869
|
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)
|
|
130844
132870
|
}
|
|
130845
132871
|
var xt_grid_itemvue_type_template_id_5318efc6_scoped_true_staticRenderFns = []
|
|
@@ -130971,8 +132997,15 @@ var xt_grid_item_component = normalizeComponent(
|
|
|
130971
132997
|
/* harmony default export */ var xt_grid_item = (xt_grid_item_component.exports);
|
|
130972
132998
|
// CONCATENATED MODULE: ./src/components/xt-grid-item/index.js
|
|
130973
132999
|
|
|
133000
|
+
|
|
133001
|
+
xt_grid_item.install = function (Vue) {
|
|
133002
|
+
Vue.component(xt_grid_item.name, xt_grid_item)
|
|
133003
|
+
}
|
|
133004
|
+
|
|
130974
133005
|
/* harmony default export */ var components_xt_grid_item = (xt_grid_item);
|
|
130975
|
-
|
|
133006
|
+
|
|
133007
|
+
|
|
133008
|
+
// 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
|
|
130976
133009
|
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)
|
|
130977
133010
|
}
|
|
130978
133011
|
var ex_date_pickervue_type_template_id_ff20c256_scoped_true_staticRenderFns = []
|
|
@@ -130980,7 +133013,7 @@ var ex_date_pickervue_type_template_id_ff20c256_scoped_true_staticRenderFns = []
|
|
|
130980
133013
|
|
|
130981
133014
|
// CONCATENATED MODULE: ./src/components/ex-date-picker/index.vue?vue&type=template&id=ff20c256&scoped=true
|
|
130982
133015
|
|
|
130983
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
133016
|
+
// 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
|
|
130984
133017
|
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)
|
|
130985
133018
|
}
|
|
130986
133019
|
var quartervue_type_template_id_39ae9f5e_staticRenderFns = []
|
|
@@ -131266,9 +133299,16 @@ var ex_date_picker_component = normalizeComponent(
|
|
|
131266
133299
|
|
|
131267
133300
|
/* harmony default export */ var ex_date_picker = (ex_date_picker_component.exports);
|
|
131268
133301
|
// CONCATENATED MODULE: ./src/components/ex-date-picker/index.js
|
|
131269
|
-
|
|
133302
|
+
|
|
133303
|
+
|
|
133304
|
+
ex_date_picker.install = function (Vue) {
|
|
133305
|
+
Vue.component(ex_date_picker.name, ex_date_picker)
|
|
133306
|
+
}
|
|
133307
|
+
|
|
131270
133308
|
/* harmony default export */ var components_ex_date_picker = (ex_date_picker);
|
|
131271
|
-
|
|
133309
|
+
|
|
133310
|
+
|
|
133311
|
+
// 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
|
|
131272
133312
|
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)
|
|
131273
133313
|
}
|
|
131274
133314
|
var ex_buttonvue_type_template_id_1b7e9238_staticRenderFns = []
|
|
@@ -131357,9 +133397,16 @@ var ex_button_component = normalizeComponent(
|
|
|
131357
133397
|
|
|
131358
133398
|
/* harmony default export */ var ex_button = (ex_button_component.exports);
|
|
131359
133399
|
// CONCATENATED MODULE: ./src/components/ex-button/index.js
|
|
131360
|
-
|
|
133400
|
+
|
|
133401
|
+
|
|
133402
|
+
ex_button.install = function (Vue) {
|
|
133403
|
+
Vue.component(ex_button.name, ex_button)
|
|
133404
|
+
}
|
|
133405
|
+
|
|
131361
133406
|
/* harmony default export */ var components_ex_button = (ex_button);
|
|
131362
|
-
|
|
133407
|
+
|
|
133408
|
+
|
|
133409
|
+
// 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
|
|
131363
133410
|
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()
|
|
131364
133411
|
}
|
|
131365
133412
|
var ex_chartvue_type_template_id_9a31abde_staticRenderFns = []
|
|
@@ -131367,7 +133414,7 @@ var ex_chartvue_type_template_id_9a31abde_staticRenderFns = []
|
|
|
131367
133414
|
|
|
131368
133415
|
// CONCATENATED MODULE: ./src/components/ex-chart/index.vue?vue&type=template&id=9a31abde
|
|
131369
133416
|
|
|
131370
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
133417
|
+
// 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
|
|
131371
133418
|
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"})
|
|
131372
133419
|
}
|
|
131373
133420
|
var ExBarvue_type_template_id_06ad80ef_scoped_true_staticRenderFns = []
|
|
@@ -131604,7 +133651,7 @@ var ExBar_component = normalizeComponent(
|
|
|
131604
133651
|
)
|
|
131605
133652
|
|
|
131606
133653
|
/* harmony default export */ var ExBar = (ExBar_component.exports);
|
|
131607
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
133654
|
+
// 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
|
|
131608
133655
|
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"})
|
|
131609
133656
|
}
|
|
131610
133657
|
var ExLinevue_type_template_id_358cb278_scoped_true_staticRenderFns = []
|
|
@@ -131787,7 +133834,7 @@ var ExLine_component = normalizeComponent(
|
|
|
131787
133834
|
)
|
|
131788
133835
|
|
|
131789
133836
|
/* harmony default export */ var ExLine = (ExLine_component.exports);
|
|
131790
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
133837
|
+
// 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
|
|
131791
133838
|
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"})
|
|
131792
133839
|
}
|
|
131793
133840
|
var ExPievue_type_template_id_ee1d466e_scoped_true_staticRenderFns = []
|
|
@@ -131979,7 +134026,7 @@ var ExPie_component = normalizeComponent(
|
|
|
131979
134026
|
)
|
|
131980
134027
|
|
|
131981
134028
|
/* harmony default export */ var ExPie = (ExPie_component.exports);
|
|
131982
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
134029
|
+
// 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
|
|
131983
134030
|
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"})
|
|
131984
134031
|
}
|
|
131985
134032
|
var ExMultivue_type_template_id_6d9e7e44_scoped_true_staticRenderFns = []
|
|
@@ -132413,9 +134460,15 @@ var ex_chart_component = normalizeComponent(
|
|
|
132413
134460
|
/* harmony default export */ var ex_chart = (ex_chart_component.exports);
|
|
132414
134461
|
// CONCATENATED MODULE: ./src/components/ex-chart/index.js
|
|
132415
134462
|
|
|
134463
|
+
|
|
134464
|
+
ex_chart.install = function (Vue) {
|
|
134465
|
+
Vue.component(ex_chart.name, ex_chart)
|
|
134466
|
+
}
|
|
134467
|
+
|
|
132416
134468
|
/* harmony default export */ var components_ex_chart = (ex_chart);
|
|
134469
|
+
|
|
132417
134470
|
|
|
132418
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
134471
|
+
// 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
|
|
132419
134472
|
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)
|
|
132420
134473
|
}
|
|
132421
134474
|
var ex_cardvue_type_template_id_0d381618_staticRenderFns = []
|
|
@@ -132510,7 +134563,7 @@ ex_card.install = function (Vue) {
|
|
|
132510
134563
|
|
|
132511
134564
|
/* harmony default export */ var components_ex_card = (ex_card);
|
|
132512
134565
|
|
|
132513
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
134566
|
+
// 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
|
|
132514
134567
|
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)
|
|
132515
134568
|
}
|
|
132516
134569
|
var ex_iconvue_type_template_id_01397354_scoped_true_staticRenderFns = []
|
|
@@ -132681,9 +134734,15 @@ var ex_icon_component = normalizeComponent(
|
|
|
132681
134734
|
/* harmony default export */ var ex_icon = (ex_icon_component.exports);
|
|
132682
134735
|
// CONCATENATED MODULE: ./src/components/ex-icon/index.js
|
|
132683
134736
|
|
|
134737
|
+
|
|
134738
|
+
ex_icon.install = function (Vue) {
|
|
134739
|
+
Vue.component(ex_icon.name, ex_icon)
|
|
134740
|
+
}
|
|
134741
|
+
|
|
132684
134742
|
/* harmony default export */ var components_ex_icon = (ex_icon);
|
|
134743
|
+
|
|
132685
134744
|
|
|
132686
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
134745
|
+
// 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
|
|
132687
134746
|
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()])
|
|
132688
134747
|
}
|
|
132689
134748
|
var ex_tablevue_type_template_id_1833f458_scoped_true_staticRenderFns = []
|
|
@@ -132737,7 +134796,7 @@ var ExTableCell_component = normalizeComponent(
|
|
|
132737
134796
|
)
|
|
132738
134797
|
|
|
132739
134798
|
/* harmony default export */ var ExTableCell = (ExTableCell_component.exports);
|
|
132740
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
134799
|
+
// 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
|
|
132741
134800
|
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)
|
|
132742
134801
|
}
|
|
132743
134802
|
var VirtualElTablevue_type_template_id_5eb34e1c_scoped_true_staticRenderFns = []
|
|
@@ -133339,7 +135398,13 @@ var ex_table_component = normalizeComponent(
|
|
|
133339
135398
|
/* harmony default export */ var ex_table = (ex_table_component.exports);
|
|
133340
135399
|
// CONCATENATED MODULE: ./src/components/ex-table/index.js
|
|
133341
135400
|
|
|
135401
|
+
|
|
135402
|
+
ex_table.install = function (Vue) {
|
|
135403
|
+
Vue.component(ex_table.name, ex_table)
|
|
135404
|
+
}
|
|
135405
|
+
|
|
133342
135406
|
/* harmony default export */ var components_ex_table = (ex_table);
|
|
135407
|
+
|
|
133343
135408
|
|
|
133344
135409
|
// CONCATENATED MODULE: ./src/config/element-registry.js
|
|
133345
135410
|
/**
|
|
@@ -133548,6 +135613,8 @@ const { getConfig: src_getConfig, setConfig: src_setConfig, getTheme: src_getThe
|
|
|
133548
135613
|
|
|
133549
135614
|
|
|
133550
135615
|
|
|
135616
|
+
|
|
135617
|
+
|
|
133551
135618
|
// ExChart 组件(基于 ECharts 封装)
|
|
133552
135619
|
|
|
133553
135620
|
// ExIcon 组件(支持 el-icon / svg / 自定义字体)
|
|
@@ -133568,6 +135635,8 @@ const src_components = [
|
|
|
133568
135635
|
components_xt_time,
|
|
133569
135636
|
components_xt_step_price,
|
|
133570
135637
|
components_xt_step_price_item,
|
|
135638
|
+
components_xt_map,
|
|
135639
|
+
xt_map_provider,
|
|
133571
135640
|
components_xt_grid_box,
|
|
133572
135641
|
components_xt_grid_item,
|
|
133573
135642
|
components_ex_date_picker,
|
|
@@ -133648,6 +135717,8 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
133648
135717
|
XtTime: components_xt_time,
|
|
133649
135718
|
XtStepPrice: components_xt_step_price,
|
|
133650
135719
|
XtStepPriceItem: components_xt_step_price_item,
|
|
135720
|
+
XtMap: components_xt_map,
|
|
135721
|
+
XtMapProvider: xt_map_provider,
|
|
133651
135722
|
XtGridBox: components_xt_grid_box,
|
|
133652
135723
|
XtGridItem: components_xt_grid_item,
|
|
133653
135724
|
ExDatePicker: components_ex_date_picker,
|