xt-element-ui 2.1.61 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/components/base/xt-bar.md +5 -5
- package/docs/components/base/xt-chart.md +5 -5
- package/docs/components/base/xt-line.md +4 -4
- package/docs/components/base/xt-multi.md +5 -5
- package/docs/components/base/xt-pie.md +5 -5
- package/lib/index.common.js +503 -165
- package/lib/index.css +1 -1
- package/lib/index.umd.js +506 -168
- package/lib/index.umd.min.js +1 -1
- package/lib/xt-badge/demo.html +10 -0
- package/lib/xt-badge/index.js +1 -0
- package/lib/xt-badge/xt-badge.common.js +335 -0
- package/lib/xt-badge/xt-badge.css +1 -0
- package/lib/xt-badge/xt-badge.umd.js +345 -0
- package/lib/xt-badge/xt-badge.umd.min.js +1 -0
- package/lib/xt-button/demo.html +10 -0
- package/lib/xt-button/index.js +1 -0
- package/lib/xt-button/xt-button.common.js +331 -0
- package/lib/xt-button/xt-button.css +1 -0
- package/lib/xt-button/xt-button.umd.js +341 -0
- package/lib/xt-button/xt-button.umd.min.js +1 -0
- package/lib/xt-card/demo.html +10 -0
- package/lib/xt-card/index.js +1 -0
- package/lib/xt-card/xt-card.common.js +325 -0
- package/lib/xt-card/xt-card.css +1 -0
- package/lib/xt-card/xt-card.umd.js +335 -0
- package/lib/xt-card/xt-card.umd.min.js +1 -0
- package/lib/xt-card-item/demo.html +10 -0
- package/lib/xt-card-item/index.js +1 -0
- package/lib/xt-card-item/xt-card-item.common.js +291 -0
- package/lib/xt-card-item/xt-card-item.css +1 -0
- package/lib/xt-card-item/xt-card-item.umd.js +301 -0
- package/lib/xt-card-item/xt-card-item.umd.min.js +1 -0
- package/lib/xt-chart/demo.html +10 -0
- package/lib/xt-chart/index.js +1 -0
- package/lib/xt-chart/xt-chart.common.js +109203 -0
- package/lib/xt-chart/xt-chart.css +1 -0
- package/lib/xt-chart/xt-chart.umd.js +109213 -0
- package/lib/xt-chart/xt-chart.umd.min.js +1 -0
- package/lib/xt-config-provider/demo.html +10 -0
- package/lib/xt-config-provider/index.js +1 -0
- package/lib/xt-config-provider/xt-config-provider.common.js +108388 -0
- package/lib/xt-config-provider/xt-config-provider.css +1 -0
- package/lib/xt-config-provider/xt-config-provider.umd.js +108398 -0
- package/lib/xt-config-provider/xt-config-provider.umd.min.js +1 -0
- package/lib/xt-date-picker/demo.html +10 -0
- package/lib/xt-date-picker/index.js +1 -0
- package/lib/xt-date-picker/xt-date-picker.common.js +768 -0
- package/lib/xt-date-picker/xt-date-picker.css +1 -0
- package/lib/xt-date-picker/xt-date-picker.umd.js +778 -0
- package/lib/xt-date-picker/xt-date-picker.umd.min.js +1 -0
- package/lib/xt-flex-box/demo.html +10 -0
- package/lib/xt-flex-box/index.js +1 -0
- package/lib/xt-flex-box/xt-flex-box.common.js +303 -0
- package/lib/xt-flex-box/xt-flex-box.css +1 -0
- package/lib/xt-flex-box/xt-flex-box.umd.js +313 -0
- package/lib/xt-flex-box/xt-flex-box.umd.min.js +1 -0
- package/lib/xt-form-schema/demo.html +10 -0
- package/lib/xt-form-schema/index.js +1 -0
- package/lib/xt-form-schema/xt-form-schema.common.js +510 -0
- package/lib/xt-form-schema/xt-form-schema.css +1 -0
- package/lib/xt-form-schema/xt-form-schema.umd.js +520 -0
- package/lib/xt-form-schema/xt-form-schema.umd.min.js +1 -0
- package/lib/xt-grid-box/demo.html +10 -0
- package/lib/xt-grid-box/index.js +1 -0
- package/lib/xt-grid-box/xt-grid-box.common.js +404 -0
- package/lib/xt-grid-box/xt-grid-box.css +1 -0
- package/lib/xt-grid-box/xt-grid-box.umd.js +414 -0
- package/lib/xt-grid-box/xt-grid-box.umd.min.js +1 -0
- package/lib/xt-grid-item/demo.html +10 -0
- package/lib/xt-grid-item/index.js +1 -0
- package/lib/xt-grid-item/xt-grid-item.common.js +381 -0
- package/lib/xt-grid-item/xt-grid-item.css +1 -0
- package/lib/xt-grid-item/xt-grid-item.umd.js +391 -0
- package/lib/xt-grid-item/xt-grid-item.umd.min.js +1 -0
- package/lib/xt-icon/demo.html +10 -0
- package/lib/xt-icon/index.js +1 -0
- package/lib/xt-icon/xt-icon.common.js +430 -0
- package/lib/xt-icon/xt-icon.css +1 -0
- package/lib/xt-icon/xt-icon.umd.js +440 -0
- package/lib/xt-icon/xt-icon.umd.min.js +1 -0
- package/lib/xt-input/demo.html +10 -0
- package/lib/xt-input/index.js +1 -0
- package/lib/xt-input/xt-input.common.js +584 -0
- package/lib/xt-input/xt-input.css +1 -0
- package/lib/xt-input/xt-input.umd.js +594 -0
- package/lib/xt-input/xt-input.umd.min.js +1 -0
- package/lib/xt-list/demo.html +10 -0
- package/lib/xt-list/index.js +1 -0
- package/lib/xt-list/xt-list.common.js +714 -0
- package/lib/xt-list/xt-list.css +1 -0
- package/lib/xt-list/xt-list.umd.js +724 -0
- package/lib/xt-list/xt-list.umd.min.js +1 -0
- package/lib/xt-map/demo.html +10 -0
- package/lib/xt-map/index.js +1 -0
- package/lib/xt-map/xt-map.common.js +1951 -0
- package/lib/xt-map/xt-map.css +1 -0
- package/lib/xt-map/xt-map.umd.js +1961 -0
- package/lib/xt-map/xt-map.umd.min.js +1 -0
- package/lib/xt-map-provider/demo.html +10 -0
- package/lib/xt-map-provider/index.js +1 -0
- package/lib/xt-map-provider/xt-map-provider.common.js +644 -0
- package/lib/xt-map-provider/xt-map-provider.css +1 -0
- package/lib/xt-map-provider/xt-map-provider.umd.js +654 -0
- package/lib/xt-map-provider/xt-map-provider.umd.min.js +1 -0
- package/lib/xt-page/demo.html +10 -0
- package/lib/xt-page/index.js +1 -0
- package/lib/xt-page/xt-page.common.js +353 -0
- package/lib/xt-page/xt-page.css +1 -0
- package/lib/xt-page/xt-page.umd.js +363 -0
- package/lib/xt-page/xt-page.umd.min.js +1 -0
- package/lib/xt-progress/demo.html +10 -0
- package/lib/xt-progress/index.js +1 -0
- package/lib/xt-progress/xt-progress.common.js +327 -0
- package/lib/xt-progress/xt-progress.css +1 -0
- package/lib/xt-progress/xt-progress.umd.js +337 -0
- package/lib/xt-progress/xt-progress.umd.min.js +1 -0
- package/lib/xt-scroll-arrow/demo.html +10 -0
- package/lib/xt-scroll-arrow/index.js +1 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.common.js +495 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.css +1 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.js +505 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.min.js +1 -0
- package/lib/xt-select-tree/demo.html +10 -0
- package/lib/xt-select-tree/index.js +1 -0
- package/lib/xt-select-tree/xt-select-tree.common.js +1791 -0
- package/lib/xt-select-tree/xt-select-tree.css +1 -0
- package/lib/xt-select-tree/xt-select-tree.umd.js +1801 -0
- package/lib/xt-select-tree/xt-select-tree.umd.min.js +1 -0
- package/lib/xt-step-price/demo.html +10 -0
- package/lib/xt-step-price/index.js +1 -0
- package/lib/xt-step-price/xt-step-price.common.js +800 -0
- package/lib/xt-step-price/xt-step-price.css +1 -0
- package/lib/xt-step-price/xt-step-price.umd.js +810 -0
- package/lib/xt-step-price/xt-step-price.umd.min.js +1 -0
- package/lib/xt-step-price-item/demo.html +10 -0
- package/lib/xt-step-price-item/index.js +1 -0
- package/lib/xt-step-price-item/xt-step-price-item.common.js +417 -0
- package/lib/xt-step-price-item/xt-step-price-item.umd.js +427 -0
- package/lib/xt-step-price-item/xt-step-price-item.umd.min.js +1 -0
- package/lib/xt-tab-pane/demo.html +10 -0
- package/lib/xt-tab-pane/index.js +1 -0
- package/lib/xt-tab-pane/xt-tab-pane.common.js +309 -0
- package/lib/xt-tab-pane/xt-tab-pane.umd.js +319 -0
- package/lib/xt-tab-pane/xt-tab-pane.umd.min.js +1 -0
- package/lib/xt-table/demo.html +10 -0
- package/lib/xt-table/index.js +1 -0
- package/lib/xt-table/xt-table.common.js +1027 -0
- package/lib/xt-table/xt-table.css +1 -0
- package/lib/xt-table/xt-table.umd.js +1037 -0
- package/lib/xt-table/xt-table.umd.min.js +1 -0
- package/lib/xt-tabs/demo.html +10 -0
- package/lib/xt-tabs/index.js +1 -0
- package/lib/xt-tabs/xt-tabs.common.js +463 -0
- package/lib/xt-tabs/xt-tabs.css +1 -0
- package/lib/xt-tabs/xt-tabs.umd.js +473 -0
- package/lib/xt-tabs/xt-tabs.umd.min.js +1 -0
- package/lib/xt-text/demo.html +10 -0
- package/lib/xt-text/index.js +1 -0
- package/lib/xt-text/xt-text.common.js +536 -0
- package/lib/xt-text/xt-text.css +1 -0
- package/lib/xt-text/xt-text.umd.js +546 -0
- package/lib/xt-text/xt-text.umd.min.js +1 -0
- package/lib/xt-time/demo.html +10 -0
- package/lib/xt-time/index.js +1 -0
- package/lib/xt-time/xt-time.common.js +555 -0
- package/lib/xt-time/xt-time.css +1 -0
- package/lib/xt-time/xt-time.umd.js +565 -0
- package/lib/xt-time/xt-time.umd.min.js +1 -0
- package/lib/xt-transfer-tree/demo.html +10 -0
- package/lib/xt-transfer-tree/index.js +1 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.common.js +594 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.css +1 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.js +604 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.min.js +1 -0
- package/lib/xt-upload/demo.html +10 -0
- package/lib/xt-upload/index.js +1 -0
- package/lib/xt-upload/xt-upload.common.js +1292 -0
- package/lib/xt-upload/xt-upload.css +1 -0
- package/lib/xt-upload/xt-upload.umd.js +1302 -0
- package/lib/xt-upload/xt-upload.umd.min.js +1 -0
- package/package.json +10 -7
- package/src/components/xt-badge/index.js +8 -7
- package/src/components/xt-button/index.js +1 -0
- package/src/components/xt-card/index.js +1 -0
- package/src/components/xt-card-item/index.js +1 -0
- package/src/components/xt-config-provider/index.js +1 -0
- package/src/components/xt-flex-box/index.js +1 -0
- package/src/components/xt-grid-box/index.js +1 -0
- package/src/components/xt-icon/index.js +1 -0
- package/src/components/xt-input/index.js +1 -0
- package/src/components/xt-map/index.js +1 -0
- package/src/components/xt-progress/index.js +8 -7
- package/src/components/xt-scroll-arrow/index.js +8 -7
- package/src/components/xt-step-price/index.js +1 -0
- package/src/components/xt-tab-pane/index.js +10 -0
- package/src/components/{xt-tabs/TabPane.vue → xt-tab-pane/index.vue} +14 -1
- package/src/components/xt-tabs/index.js +9 -10
- package/src/components/xt-tabs/index.vue +303 -44
- package/src/components/xt-text/index.js +1 -0
- package/src/components/xt-time/index.js +1 -0
- package/src/index.js +34 -2
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
+
/******/ // The module cache
|
|
4
|
+
/******/ var installedModules = {};
|
|
5
|
+
/******/
|
|
6
|
+
/******/ // The require function
|
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
|
8
|
+
/******/
|
|
9
|
+
/******/ // Check if module is in cache
|
|
10
|
+
/******/ if(installedModules[moduleId]) {
|
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
|
12
|
+
/******/ }
|
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
|
15
|
+
/******/ i: moduleId,
|
|
16
|
+
/******/ l: false,
|
|
17
|
+
/******/ exports: {}
|
|
18
|
+
/******/ };
|
|
19
|
+
/******/
|
|
20
|
+
/******/ // Execute the module function
|
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
+
/******/
|
|
23
|
+
/******/ // Flag the module as loaded
|
|
24
|
+
/******/ module.l = true;
|
|
25
|
+
/******/
|
|
26
|
+
/******/ // Return the exports of the module
|
|
27
|
+
/******/ return module.exports;
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
+
/******/ __webpack_require__.m = modules;
|
|
33
|
+
/******/
|
|
34
|
+
/******/ // expose the module cache
|
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
|
36
|
+
/******/
|
|
37
|
+
/******/ // define getter function for harmony exports
|
|
38
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // define __esModule on exports
|
|
45
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
/******/ }
|
|
49
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // create a fake namespace object
|
|
53
|
+
/******/ // mode & 1: value is a module id, require it
|
|
54
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
+
/******/ // mode & 4: return value when already ns object
|
|
56
|
+
/******/ // mode & 8|1: behave like require
|
|
57
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
+
/******/ if(mode & 8) return value;
|
|
60
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
+
/******/ var ns = Object.create(null);
|
|
62
|
+
/******/ __webpack_require__.r(ns);
|
|
63
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
+
/******/ return ns;
|
|
66
|
+
/******/ };
|
|
67
|
+
/******/
|
|
68
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
+
/******/ __webpack_require__.n = function(module) {
|
|
70
|
+
/******/ var getter = module && module.__esModule ?
|
|
71
|
+
/******/ function getDefault() { return module['default']; } :
|
|
72
|
+
/******/ function getModuleExports() { return module; };
|
|
73
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
+
/******/ return getter;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
+
/******/
|
|
80
|
+
/******/ // __webpack_public_path__
|
|
81
|
+
/******/ __webpack_require__.p = "";
|
|
82
|
+
/******/
|
|
83
|
+
/******/
|
|
84
|
+
/******/ // Load entry module and return exports
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ "3cef":
|
|
91
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
|
+
|
|
93
|
+
"use strict";
|
|
94
|
+
/* 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_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__("69c5");
|
|
95
|
+
/* 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_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_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__);
|
|
96
|
+
/* unused harmony reexport * */
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/***/ }),
|
|
100
|
+
|
|
101
|
+
/***/ "69c5":
|
|
102
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
103
|
+
|
|
104
|
+
// extracted by mini-css-extract-plugin
|
|
105
|
+
|
|
106
|
+
/***/ }),
|
|
107
|
+
|
|
108
|
+
/***/ "fb15":
|
|
109
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
110
|
+
|
|
111
|
+
"use strict";
|
|
112
|
+
// ESM COMPAT FLAG
|
|
113
|
+
__webpack_require__.r(__webpack_exports__);
|
|
114
|
+
|
|
115
|
+
// EXPORTS
|
|
116
|
+
__webpack_require__.d(__webpack_exports__, "XtMapProvider", function() { return /* reexport */ provider; });
|
|
117
|
+
|
|
118
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
119
|
+
// This file is imported into lib/wc client bundles.
|
|
120
|
+
|
|
121
|
+
if (typeof window !== 'undefined') {
|
|
122
|
+
var currentScript = window.document.currentScript
|
|
123
|
+
if (false) { var getCurrentScript; }
|
|
124
|
+
|
|
125
|
+
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
126
|
+
if (src) {
|
|
127
|
+
__webpack_require__.p = src[1] // eslint-disable-line
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Indicate to webpack that this file can be concatenated
|
|
132
|
+
/* harmony default export */ var setPublicPath = (null);
|
|
133
|
+
|
|
134
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b8cd9b04-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./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
|
|
135
|
+
var 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)
|
|
136
|
+
}
|
|
137
|
+
var staticRenderFns = []
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
// CONCATENATED MODULE: ./src/components/xt-map/provider.vue?vue&type=template&id=16f243b0&scoped=true
|
|
141
|
+
|
|
142
|
+
// CONCATENATED MODULE: ./src/components/xt-map/config/xt-map-config.js
|
|
143
|
+
/**
|
|
144
|
+
* XtMap 全局配置管理
|
|
145
|
+
* 支持通过 Vue.use 配置或运行时动态设置地图提供商、密钥、URL、主题等
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
// 支持的地图提供商
|
|
149
|
+
const MAP_PROVIDERS = ['amap', 'tianditu', 'baidu']
|
|
150
|
+
|
|
151
|
+
// 支持的地图类型(统一枚举,各适配器会转成对应引擎的类型)
|
|
152
|
+
const MAP_TYPES = ['standard', 'satellite', 'hybrid', 'traffic']
|
|
153
|
+
|
|
154
|
+
// 支持的主题
|
|
155
|
+
const MAP_THEMES = ['light', 'dark']
|
|
156
|
+
|
|
157
|
+
// 默认配置 - 以高德地图为基准
|
|
158
|
+
const defaultConfig = {
|
|
159
|
+
provider: 'amap',
|
|
160
|
+
apiKey: '',
|
|
161
|
+
apiUrl: null,
|
|
162
|
+
mapType: 'standard',
|
|
163
|
+
theme: 'light',
|
|
164
|
+
center: [116.397428, 39.90923],
|
|
165
|
+
zoom: 11,
|
|
166
|
+
plugins: [],
|
|
167
|
+
securityJsCode: null,
|
|
168
|
+
// 天地图专用:图层类型(vec:矢量, img:影像, ter:地形)
|
|
169
|
+
tiandituLayerType: 'vec',
|
|
170
|
+
// 百度地图专用:坐标系(bd09ll:百度经纬度, bd09mc:百度墨卡托)
|
|
171
|
+
baiduCoordType: 'bd09ll'
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// 当前配置
|
|
175
|
+
let currentConfig = { ...defaultConfig }
|
|
176
|
+
|
|
177
|
+
// 配置变更监听器
|
|
178
|
+
const configChangeListeners = []
|
|
179
|
+
|
|
180
|
+
const emitConfigChange = (key, value) => {
|
|
181
|
+
configChangeListeners.forEach(listener => {
|
|
182
|
+
try {
|
|
183
|
+
listener(key, value)
|
|
184
|
+
} catch (e) {
|
|
185
|
+
console.warn('[XtMap] 配置变更监听异常:', e)
|
|
186
|
+
}
|
|
187
|
+
})
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// 获取完整配置
|
|
191
|
+
const getMapConfig = () => ({ ...currentConfig })
|
|
192
|
+
|
|
193
|
+
// 设置完整配置
|
|
194
|
+
const setMapConfig = (config) => {
|
|
195
|
+
if (typeof config !== 'object' || config === null) {
|
|
196
|
+
console.warn('[XtMap] setMapConfig 必须传入对象参数')
|
|
197
|
+
return
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
if (config.provider !== undefined) setMapProvider(config.provider)
|
|
201
|
+
if (config.apiKey !== undefined) setMapApiKey(config.apiKey)
|
|
202
|
+
if (config.apiUrl !== undefined) setMapApiUrl(config.apiUrl)
|
|
203
|
+
if (config.mapType !== undefined) setMapType(config.mapType)
|
|
204
|
+
if (config.theme !== undefined) setMapTheme(config.theme)
|
|
205
|
+
if (config.center !== undefined) setMapCenter(config.center)
|
|
206
|
+
if (config.zoom !== undefined) setMapZoom(config.zoom)
|
|
207
|
+
if (config.plugins !== undefined) setMapPlugins(config.plugins)
|
|
208
|
+
if (config.securityJsCode !== undefined) setSecurityJsCode(config.securityJsCode)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const setMapProvider = (provider) => {
|
|
212
|
+
if (!MAP_PROVIDERS.includes(provider)) {
|
|
213
|
+
console.warn(`[XtMap] 无效的地图提供商: ${provider},可选: ${MAP_PROVIDERS.join(', ')}`)
|
|
214
|
+
return
|
|
215
|
+
}
|
|
216
|
+
currentConfig.provider = provider
|
|
217
|
+
emitConfigChange('provider', provider)
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const setMapApiKey = (key) => {
|
|
221
|
+
currentConfig.apiKey = key
|
|
222
|
+
emitConfigChange('apiKey', key)
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const setMapApiUrl = (url) => {
|
|
226
|
+
currentConfig.apiUrl = url
|
|
227
|
+
emitConfigChange('apiUrl', url)
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const setMapType = (type) => {
|
|
231
|
+
if (!MAP_TYPES.includes(type)) {
|
|
232
|
+
console.warn(`[XtMap] 无效的地图类型: ${type},可选: ${MAP_TYPES.join(', ')}`)
|
|
233
|
+
return
|
|
234
|
+
}
|
|
235
|
+
currentConfig.mapType = type
|
|
236
|
+
emitConfigChange('mapType', type)
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
const setMapTheme = (theme) => {
|
|
240
|
+
if (!MAP_THEMES.includes(theme)) {
|
|
241
|
+
console.warn(`[XtMap] 无效的主题: ${theme},可选: ${MAP_THEMES.join(', ')}`)
|
|
242
|
+
return
|
|
243
|
+
}
|
|
244
|
+
currentConfig.theme = theme
|
|
245
|
+
emitConfigChange('theme', theme)
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const setMapCenter = (center) => {
|
|
249
|
+
if (!Array.isArray(center) || center.length !== 2) {
|
|
250
|
+
console.warn('[XtMap] center 必须是 [lng, lat] 数组')
|
|
251
|
+
return
|
|
252
|
+
}
|
|
253
|
+
currentConfig.center = center
|
|
254
|
+
emitConfigChange('center', center)
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const setMapZoom = (zoom) => {
|
|
258
|
+
const z = Number(zoom)
|
|
259
|
+
if (isNaN(z)) {
|
|
260
|
+
console.warn('[XtMap] zoom 必须是数字')
|
|
261
|
+
return
|
|
262
|
+
}
|
|
263
|
+
currentConfig.zoom = z
|
|
264
|
+
emitConfigChange('zoom', z)
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
const setMapPlugins = (plugins) => {
|
|
268
|
+
if (!Array.isArray(plugins)) {
|
|
269
|
+
console.warn('[XtMap] plugins 必须是数组')
|
|
270
|
+
return
|
|
271
|
+
}
|
|
272
|
+
currentConfig.plugins = plugins
|
|
273
|
+
emitConfigChange('plugins', plugins)
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const setSecurityJsCode = (code) => {
|
|
277
|
+
currentConfig.securityJsCode = code
|
|
278
|
+
// 高德地图安全密钥:设置 window._AMapSecurityConfig
|
|
279
|
+
if (typeof window !== 'undefined' && code) {
|
|
280
|
+
window._AMapSecurityConfig = {
|
|
281
|
+
securityJsCode: code,
|
|
282
|
+
...(window._AMapSecurityConfig || {})
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
emitConfigChange('securityJsCode', code)
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// 获取当前配置的快捷方法
|
|
289
|
+
const getMapProvider = () => currentConfig.provider
|
|
290
|
+
const getMapApiKey = () => currentConfig.apiKey
|
|
291
|
+
const getMapApiUrl = () => currentConfig.apiUrl
|
|
292
|
+
const getMapType = () => currentConfig.mapType
|
|
293
|
+
const getMapTheme = () => currentConfig.theme
|
|
294
|
+
const getMapCenter = () => currentConfig.center
|
|
295
|
+
const getMapZoom = () => currentConfig.zoom
|
|
296
|
+
const getMapPlugins = () => currentConfig.plugins
|
|
297
|
+
|
|
298
|
+
// 监听配置变更
|
|
299
|
+
const onMapConfigChange = (listener) => {
|
|
300
|
+
if (typeof listener === 'function') {
|
|
301
|
+
configChangeListeners.push(listener)
|
|
302
|
+
return () => {
|
|
303
|
+
const index = configChangeListeners.indexOf(listener)
|
|
304
|
+
if (index > -1) configChangeListeners.splice(index, 1)
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// 重置为默认配置
|
|
310
|
+
const resetMapConfig = () => {
|
|
311
|
+
setMapConfig(defaultConfig)
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/* harmony default export */ var xt_map_config = ({
|
|
315
|
+
MAP_PROVIDERS,
|
|
316
|
+
MAP_TYPES,
|
|
317
|
+
MAP_THEMES,
|
|
318
|
+
getMapConfig,
|
|
319
|
+
setMapConfig,
|
|
320
|
+
setMapProvider,
|
|
321
|
+
setMapApiKey,
|
|
322
|
+
setMapApiUrl,
|
|
323
|
+
setMapType,
|
|
324
|
+
setMapTheme,
|
|
325
|
+
setMapCenter,
|
|
326
|
+
setMapZoom,
|
|
327
|
+
setMapPlugins,
|
|
328
|
+
setSecurityJsCode,
|
|
329
|
+
getMapProvider,
|
|
330
|
+
getMapApiKey,
|
|
331
|
+
getMapApiUrl,
|
|
332
|
+
getMapType,
|
|
333
|
+
getMapTheme,
|
|
334
|
+
getMapCenter,
|
|
335
|
+
getMapZoom,
|
|
336
|
+
getMapPlugins,
|
|
337
|
+
onMapConfigChange,
|
|
338
|
+
resetMapConfig
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
// CONCATENATED MODULE: ./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
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
/* harmony default export */ var providervue_type_script_lang_js = ({
|
|
346
|
+
name: 'XtMapProvider',
|
|
347
|
+
|
|
348
|
+
props: {
|
|
349
|
+
provider: {
|
|
350
|
+
type: String,
|
|
351
|
+
default: '',
|
|
352
|
+
validator: (val) => val === '' || MAP_PROVIDERS.includes(val)
|
|
353
|
+
},
|
|
354
|
+
apiKey: {
|
|
355
|
+
type: String,
|
|
356
|
+
default: ''
|
|
357
|
+
},
|
|
358
|
+
apiUrl: {
|
|
359
|
+
type: String,
|
|
360
|
+
default: ''
|
|
361
|
+
},
|
|
362
|
+
mapType: {
|
|
363
|
+
type: String,
|
|
364
|
+
default: '',
|
|
365
|
+
validator: (val) => val === '' || MAP_TYPES.includes(val)
|
|
366
|
+
},
|
|
367
|
+
theme: {
|
|
368
|
+
type: String,
|
|
369
|
+
default: '',
|
|
370
|
+
validator: (val) => val === '' || MAP_THEMES.includes(val)
|
|
371
|
+
},
|
|
372
|
+
center: {
|
|
373
|
+
type: Array,
|
|
374
|
+
default: () => null
|
|
375
|
+
},
|
|
376
|
+
zoom: {
|
|
377
|
+
type: Number,
|
|
378
|
+
default: null
|
|
379
|
+
},
|
|
380
|
+
plugins: {
|
|
381
|
+
type: Array,
|
|
382
|
+
default: () => []
|
|
383
|
+
},
|
|
384
|
+
securityJsCode: {
|
|
385
|
+
type: String,
|
|
386
|
+
default: ''
|
|
387
|
+
},
|
|
388
|
+
tag: {
|
|
389
|
+
type: String,
|
|
390
|
+
default: 'div'
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
|
|
394
|
+
data() {
|
|
395
|
+
return {
|
|
396
|
+
mergedTheme: this.theme || getMapTheme() || 'light'
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
|
|
400
|
+
computed: {
|
|
401
|
+
wrapperStyle() {
|
|
402
|
+
return {}
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
|
|
406
|
+
watch: {
|
|
407
|
+
provider: {
|
|
408
|
+
immediate: true,
|
|
409
|
+
handler(newVal) {
|
|
410
|
+
if (newVal) setMapProvider(newVal)
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
apiKey: {
|
|
414
|
+
immediate: true,
|
|
415
|
+
handler(newVal) {
|
|
416
|
+
if (newVal) setMapApiKey(newVal)
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
apiUrl: {
|
|
420
|
+
immediate: true,
|
|
421
|
+
handler(newVal) {
|
|
422
|
+
if (newVal) setMapApiUrl(newVal)
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
mapType: {
|
|
426
|
+
immediate: true,
|
|
427
|
+
handler(newVal) {
|
|
428
|
+
if (newVal) setMapType(newVal)
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
theme: {
|
|
432
|
+
immediate: true,
|
|
433
|
+
handler(newVal) {
|
|
434
|
+
if (newVal) {
|
|
435
|
+
setMapTheme(newVal)
|
|
436
|
+
this.mergedTheme = newVal
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
center: {
|
|
441
|
+
immediate: true,
|
|
442
|
+
handler(newVal) {
|
|
443
|
+
if (newVal) setMapCenter(newVal)
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
zoom: {
|
|
447
|
+
immediate: true,
|
|
448
|
+
handler(newVal) {
|
|
449
|
+
if (newVal !== null && newVal !== undefined) setMapZoom(newVal)
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
plugins: {
|
|
453
|
+
immediate: true,
|
|
454
|
+
handler(newVal) {
|
|
455
|
+
if (newVal && newVal.length > 0) setMapPlugins(newVal)
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
securityJsCode: {
|
|
459
|
+
immediate: true,
|
|
460
|
+
handler(newVal) {
|
|
461
|
+
if (newVal) setSecurityJsCode(newVal)
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
|
|
466
|
+
provide() {
|
|
467
|
+
return {
|
|
468
|
+
xtMapConfig: {
|
|
469
|
+
getProvider: () => this.provider || getMapProvider(),
|
|
470
|
+
getApiKey: () => this.apiKey || getMapApiKey(),
|
|
471
|
+
getApiUrl: () => this.apiUrl || getMapApiUrl(),
|
|
472
|
+
getMapType: () => this.mapType || getMapType(),
|
|
473
|
+
getTheme: () => this.theme || getMapTheme(),
|
|
474
|
+
getCenter: () => this.center || getMapCenter(),
|
|
475
|
+
getZoom: () => this.zoom !== null ? this.zoom : getMapZoom(),
|
|
476
|
+
getPlugins: () => this.plugins.length > 0 ? this.plugins : getMapPlugins(),
|
|
477
|
+
getConfig: () => ({
|
|
478
|
+
provider: this.provider || getMapProvider(),
|
|
479
|
+
apiKey: this.apiKey || getMapApiKey(),
|
|
480
|
+
apiUrl: this.apiUrl || getMapApiUrl(),
|
|
481
|
+
mapType: this.mapType || getMapType(),
|
|
482
|
+
theme: this.theme || getMapTheme(),
|
|
483
|
+
center: this.center || getMapCenter(),
|
|
484
|
+
zoom: this.zoom !== null ? this.zoom : getMapZoom()
|
|
485
|
+
})
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
|
|
490
|
+
created() {
|
|
491
|
+
this._unsubscribe = onMapConfigChange((key, value) => {
|
|
492
|
+
if (key === 'theme') this.mergedTheme = this.theme || value
|
|
493
|
+
})
|
|
494
|
+
},
|
|
495
|
+
|
|
496
|
+
beforeDestroy() {
|
|
497
|
+
if (this._unsubscribe) this._unsubscribe()
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
// CONCATENATED MODULE: ./src/components/xt-map/provider.vue?vue&type=script&lang=js
|
|
502
|
+
/* harmony default export */ var xt_map_providervue_type_script_lang_js = (providervue_type_script_lang_js);
|
|
503
|
+
// EXTERNAL MODULE: ./src/components/xt-map/provider.vue?vue&type=style&index=0&id=16f243b0&prod&scoped=true&lang=css
|
|
504
|
+
var providervue_type_style_index_0_id_16f243b0_prod_scoped_true_lang_css = __webpack_require__("3cef");
|
|
505
|
+
|
|
506
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
507
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
508
|
+
|
|
509
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
510
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
511
|
+
// be included in the final webpack user bundle.
|
|
512
|
+
|
|
513
|
+
function normalizeComponent(
|
|
514
|
+
scriptExports,
|
|
515
|
+
render,
|
|
516
|
+
staticRenderFns,
|
|
517
|
+
functionalTemplate,
|
|
518
|
+
injectStyles,
|
|
519
|
+
scopeId,
|
|
520
|
+
moduleIdentifier /* server only */,
|
|
521
|
+
shadowMode /* vue-cli only */
|
|
522
|
+
) {
|
|
523
|
+
// Vue.extend constructor export interop
|
|
524
|
+
var options =
|
|
525
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
526
|
+
|
|
527
|
+
// render functions
|
|
528
|
+
if (render) {
|
|
529
|
+
options.render = render
|
|
530
|
+
options.staticRenderFns = staticRenderFns
|
|
531
|
+
options._compiled = true
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
// functional template
|
|
535
|
+
if (functionalTemplate) {
|
|
536
|
+
options.functional = true
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
// scopedId
|
|
540
|
+
if (scopeId) {
|
|
541
|
+
options._scopeId = 'data-v-' + scopeId
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
var hook
|
|
545
|
+
if (moduleIdentifier) {
|
|
546
|
+
// server build
|
|
547
|
+
hook = function (context) {
|
|
548
|
+
// 2.3 injection
|
|
549
|
+
context =
|
|
550
|
+
context || // cached call
|
|
551
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
552
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
553
|
+
// 2.2 with runInNewContext: true
|
|
554
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
555
|
+
context = __VUE_SSR_CONTEXT__
|
|
556
|
+
}
|
|
557
|
+
// inject component styles
|
|
558
|
+
if (injectStyles) {
|
|
559
|
+
injectStyles.call(this, context)
|
|
560
|
+
}
|
|
561
|
+
// register component module identifier for async chunk inferrence
|
|
562
|
+
if (context && context._registeredComponents) {
|
|
563
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
// used by ssr in case component is cached and beforeCreate
|
|
567
|
+
// never gets called
|
|
568
|
+
options._ssrRegister = hook
|
|
569
|
+
} else if (injectStyles) {
|
|
570
|
+
hook = shadowMode
|
|
571
|
+
? function () {
|
|
572
|
+
injectStyles.call(
|
|
573
|
+
this,
|
|
574
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
575
|
+
)
|
|
576
|
+
}
|
|
577
|
+
: injectStyles
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
if (hook) {
|
|
581
|
+
if (options.functional) {
|
|
582
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
583
|
+
// go through the normalizer
|
|
584
|
+
options._injectStyles = hook
|
|
585
|
+
// register for functional component in vue file
|
|
586
|
+
var originalRender = options.render
|
|
587
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
588
|
+
hook.call(context)
|
|
589
|
+
return originalRender(h, context)
|
|
590
|
+
}
|
|
591
|
+
} else {
|
|
592
|
+
// inject component registration as beforeCreate hook
|
|
593
|
+
var existing = options.beforeCreate
|
|
594
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
return {
|
|
599
|
+
exports: scriptExports,
|
|
600
|
+
options: options
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
// CONCATENATED MODULE: ./src/components/xt-map/provider.vue
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
/* normalize component */
|
|
612
|
+
|
|
613
|
+
var component = normalizeComponent(
|
|
614
|
+
xt_map_providervue_type_script_lang_js,
|
|
615
|
+
render,
|
|
616
|
+
staticRenderFns,
|
|
617
|
+
false,
|
|
618
|
+
null,
|
|
619
|
+
"16f243b0",
|
|
620
|
+
null
|
|
621
|
+
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
/* harmony default export */ var provider = (component.exports);
|
|
625
|
+
// CONCATENATED MODULE: ./src/components/xt-map-provider/index.js
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
provider.install = function (Vue) {
|
|
629
|
+
Vue.component(provider.name, provider)
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
/* harmony default export */ var xt_map_provider = (provider);
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (xt_map_provider);
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
/***/ })
|
|
643
|
+
|
|
644
|
+
/******/ });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.xt-map-provider[data-v-16f243b0]{width:100%;height:100%}.xt-map-provider--dark[data-v-16f243b0]{background-color:transparent}
|