xt-element-ui 1.2.2 → 1.2.3
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/lib/index.common.js +1211 -1154
- package/lib/index.css +1 -1
- package/lib/index.umd.js +1216 -1159
- package/lib/index.umd.min.js +5 -5
- package/package.json +1 -1
- package/src/components/ex-button/index.vue +1 -1
- package/src/components/ex-button/style/index.scss +10 -4
- package/src/components/ex-chart/theme/dark.js +1 -1
- package/src/components/ex-chart/utils.js +1 -1
- package/src/components/ex-page/index.js +2 -0
- package/src/components/ex-select-tree/index.js +2 -0
- package/src/components/{xt-select-tree → ex-select-tree}/index.vue +1 -1
- package/src/components/ex-table/ExTableCell.vue +3 -2
- package/src/components/ex-table/VirtualElTable.vue +234 -0
- package/src/components/ex-table/index.vue +176 -445
- package/src/components/ex-upload/index.js +2 -0
- package/src/components/xt-config-provider/index.js +2 -2
- package/src/components/xt-config-provider/index.vue +7 -3
- package/src/components/xt-text/style/index.scss +13 -13
- package/src/styles/css-variables.scss +1 -1
- package/src/styles/element-theme.scss +1 -1
- package/src/utils/index.js +11 -2
- package/src/components/xt-page/index.js +0 -0
- package/src/components/xt-select-tree/index.js +0 -0
- package/src/components/xt-upload/index.js +0 -2
- /package/src/components/{xt-page → ex-page}/index.vue +0 -0
- /package/src/components/{xt-upload → ex-upload}/index.vue +0 -0
- /package/src/components/{xt-upload → ex-upload}/preview.vue +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(
|
|
3
|
+
module.exports = factory();
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define("xt-element-ui", [
|
|
5
|
+
define("xt-element-ui", [], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["xt-element-ui"] = factory(
|
|
7
|
+
exports["xt-element-ui"] = factory();
|
|
8
8
|
else
|
|
9
|
-
root["xt-element-ui"] = factory(
|
|
10
|
-
})((typeof self !== 'undefined' ? self : this), function(
|
|
9
|
+
root["xt-element-ui"] = factory();
|
|
10
|
+
})((typeof self !== 'undefined' ? self : this), function() {
|
|
11
11
|
return /******/ (function(modules) { // webpackBootstrap
|
|
12
12
|
/******/ // The module cache
|
|
13
13
|
/******/ var installedModules = {};
|
|
@@ -163,6 +163,13 @@ function startOfDay (dirtyDate) {
|
|
|
163
163
|
module.exports = startOfDay
|
|
164
164
|
|
|
165
165
|
|
|
166
|
+
/***/ }),
|
|
167
|
+
|
|
168
|
+
/***/ "0c1c":
|
|
169
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
170
|
+
|
|
171
|
+
// extracted by mini-css-extract-plugin
|
|
172
|
+
|
|
166
173
|
/***/ }),
|
|
167
174
|
|
|
168
175
|
/***/ "0d3e":
|
|
@@ -2596,6 +2603,17 @@ function getSeconds (dirtyDate) {
|
|
|
2596
2603
|
module.exports = getSeconds
|
|
2597
2604
|
|
|
2598
2605
|
|
|
2606
|
+
/***/ }),
|
|
2607
|
+
|
|
2608
|
+
/***/ "24a5":
|
|
2609
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2610
|
+
|
|
2611
|
+
"use strict";
|
|
2612
|
+
/* 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_index_vue_vue_type_style_index_0_id_314a5524_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0c1c");
|
|
2613
|
+
/* 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_index_vue_vue_type_style_index_0_id_314a5524_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_index_vue_vue_type_style_index_0_id_314a5524_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
2614
|
+
/* unused harmony reexport * */
|
|
2615
|
+
|
|
2616
|
+
|
|
2599
2617
|
/***/ }),
|
|
2600
2618
|
|
|
2601
2619
|
/***/ "2507":
|
|
@@ -121184,17 +121202,6 @@ function startOfToday () {
|
|
|
121184
121202
|
module.exports = startOfToday
|
|
121185
121203
|
|
|
121186
121204
|
|
|
121187
|
-
/***/ }),
|
|
121188
|
-
|
|
121189
|
-
/***/ "3cd7":
|
|
121190
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
121191
|
-
|
|
121192
|
-
"use strict";
|
|
121193
|
-
/* 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_index_vue_vue_type_style_index_0_id_279f5e29_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5ee4");
|
|
121194
|
-
/* 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_index_vue_vue_type_style_index_0_id_279f5e29_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_index_vue_vue_type_style_index_0_id_279f5e29_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
121195
|
-
/* unused harmony reexport * */
|
|
121196
|
-
|
|
121197
|
-
|
|
121198
121205
|
/***/ }),
|
|
121199
121206
|
|
|
121200
121207
|
/***/ "3eee":
|
|
@@ -121858,6 +121865,13 @@ function isSaturday (dirtyDate) {
|
|
|
121858
121865
|
module.exports = isSaturday
|
|
121859
121866
|
|
|
121860
121867
|
|
|
121868
|
+
/***/ }),
|
|
121869
|
+
|
|
121870
|
+
/***/ "493c":
|
|
121871
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
121872
|
+
|
|
121873
|
+
// extracted by mini-css-extract-plugin
|
|
121874
|
+
|
|
121861
121875
|
/***/ }),
|
|
121862
121876
|
|
|
121863
121877
|
/***/ "4f67":
|
|
@@ -122162,20 +122176,6 @@ function getHours (dirtyDate) {
|
|
|
122162
122176
|
module.exports = getHours
|
|
122163
122177
|
|
|
122164
122178
|
|
|
122165
|
-
/***/ }),
|
|
122166
|
-
|
|
122167
|
-
/***/ "5ee4":
|
|
122168
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
122169
|
-
|
|
122170
|
-
// extracted by mini-css-extract-plugin
|
|
122171
|
-
|
|
122172
|
-
/***/ }),
|
|
122173
|
-
|
|
122174
|
-
/***/ "5f72":
|
|
122175
|
-
/***/ (function(module, exports) {
|
|
122176
|
-
|
|
122177
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__5f72__;
|
|
122178
|
-
|
|
122179
122179
|
/***/ }),
|
|
122180
122180
|
|
|
122181
122181
|
/***/ "6254":
|
|
@@ -124811,17 +124811,6 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
124811
124811
|
}
|
|
124812
124812
|
|
|
124813
124813
|
|
|
124814
|
-
/***/ }),
|
|
124815
|
-
|
|
124816
|
-
/***/ "93f4":
|
|
124817
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
124818
|
-
|
|
124819
|
-
"use strict";
|
|
124820
|
-
/* 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_index_vue_vue_type_style_index_0_id_78d2b726_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b49a");
|
|
124821
|
-
/* 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_index_vue_vue_type_style_index_0_id_78d2b726_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_index_vue_vue_type_style_index_0_id_78d2b726_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
124822
|
-
/* unused harmony reexport * */
|
|
124823
|
-
|
|
124824
|
-
|
|
124825
124814
|
/***/ }),
|
|
124826
124815
|
|
|
124827
124816
|
/***/ "942b":
|
|
@@ -125175,6 +125164,17 @@ module.exports = isThisMonth
|
|
|
125175
125164
|
/* unused harmony reexport * */
|
|
125176
125165
|
|
|
125177
125166
|
|
|
125167
|
+
/***/ }),
|
|
125168
|
+
|
|
125169
|
+
/***/ "a0ef":
|
|
125170
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
125171
|
+
|
|
125172
|
+
"use strict";
|
|
125173
|
+
/* 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_index_vue_vue_type_style_index_0_id_f6bc1634_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d661");
|
|
125174
|
+
/* 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_index_vue_vue_type_style_index_0_id_f6bc1634_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_index_vue_vue_type_style_index_0_id_f6bc1634_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
125175
|
+
/* unused harmony reexport * */
|
|
125176
|
+
|
|
125177
|
+
|
|
125178
125178
|
/***/ }),
|
|
125179
125179
|
|
|
125180
125180
|
/***/ "a431":
|
|
@@ -125379,6 +125379,17 @@ function isEqual (dirtyLeftDate, dirtyRightDate) {
|
|
|
125379
125379
|
module.exports = isEqual
|
|
125380
125380
|
|
|
125381
125381
|
|
|
125382
|
+
/***/ }),
|
|
125383
|
+
|
|
125384
|
+
/***/ "ac06":
|
|
125385
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
125386
|
+
|
|
125387
|
+
"use strict";
|
|
125388
|
+
/* 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_VirtualElTable_vue_vue_type_style_index_0_id_5eb34e1c_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("493c");
|
|
125389
|
+
/* 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_VirtualElTable_vue_vue_type_style_index_0_id_5eb34e1c_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_VirtualElTable_vue_vue_type_style_index_0_id_5eb34e1c_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
125390
|
+
/* unused harmony reexport * */
|
|
125391
|
+
|
|
125392
|
+
|
|
125382
125393
|
/***/ }),
|
|
125383
125394
|
|
|
125384
125395
|
/***/ "acc4":
|
|
@@ -125537,13 +125548,6 @@ function differenceInISOYears (dirtyDateLeft, dirtyDateRight) {
|
|
|
125537
125548
|
module.exports = differenceInISOYears
|
|
125538
125549
|
|
|
125539
125550
|
|
|
125540
|
-
/***/ }),
|
|
125541
|
-
|
|
125542
|
-
/***/ "b49a":
|
|
125543
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
125544
|
-
|
|
125545
|
-
// extracted by mini-css-extract-plugin
|
|
125546
|
-
|
|
125547
125551
|
/***/ }),
|
|
125548
125552
|
|
|
125549
125553
|
/***/ "b4c7":
|
|
@@ -127050,6 +127054,13 @@ var LRU = (function () {
|
|
|
127050
127054
|
/* harmony default export */ __webpack_exports__["a"] = (LRU);
|
|
127051
127055
|
|
|
127052
127056
|
|
|
127057
|
+
/***/ }),
|
|
127058
|
+
|
|
127059
|
+
/***/ "d661":
|
|
127060
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
127061
|
+
|
|
127062
|
+
// extracted by mini-css-extract-plugin
|
|
127063
|
+
|
|
127053
127064
|
/***/ }),
|
|
127054
127065
|
|
|
127055
127066
|
/***/ "d67a":
|
|
@@ -128024,7 +128035,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
128024
128035
|
__webpack_require__.d(__webpack_exports__, "ExChart", function() { return /* reexport */ components_ex_chart; });
|
|
128025
128036
|
__webpack_require__.d(__webpack_exports__, "createVirtualScrollData", function() { return /* reexport */ createVirtualScrollData; });
|
|
128026
128037
|
__webpack_require__.d(__webpack_exports__, "virtualScrollColumns", function() { return /* reexport */ virtualScrollColumns; });
|
|
128027
|
-
__webpack_require__.d(__webpack_exports__, "utils", function() { return /* reexport */
|
|
128038
|
+
__webpack_require__.d(__webpack_exports__, "utils", function() { return /* reexport */ src_utils_0; });
|
|
128028
128039
|
__webpack_require__.d(__webpack_exports__, "variables", function() { return /* reexport */ variables_export_default.a; });
|
|
128029
128040
|
__webpack_require__.d(__webpack_exports__, "getConfig", function() { return /* reexport */ src_getConfig; });
|
|
128030
128041
|
__webpack_require__.d(__webpack_exports__, "setConfig", function() { return /* reexport */ src_setConfig; });
|
|
@@ -128063,7 +128074,811 @@ var components = __webpack_require__("d67a");
|
|
|
128063
128074
|
var variables_export = __webpack_require__("ad4d");
|
|
128064
128075
|
var variables_export_default = /*#__PURE__*/__webpack_require__.n(variables_export);
|
|
128065
128076
|
|
|
128077
|
+
// CONCATENATED MODULE: ./src/components/ex-chart/theme/white.js
|
|
128078
|
+
/* harmony default export */ var white = ({
|
|
128079
|
+
color: ["#1890ff", "#37c3a4", "#29c0ce", "#6480D7", "#8cce6f", "#3a5dca", "#ffb74d"],
|
|
128080
|
+
backgroundColor: "#ffffff",
|
|
128081
|
+
textStyle: {
|
|
128082
|
+
fontFamily: "Microsoft YaHei, sans-serif"
|
|
128083
|
+
},
|
|
128084
|
+
title: {
|
|
128085
|
+
textStyle: {
|
|
128086
|
+
color: "#333",
|
|
128087
|
+
fontSize: 16
|
|
128088
|
+
},
|
|
128089
|
+
subtextStyle: {
|
|
128090
|
+
color: "#666666",
|
|
128091
|
+
fontSize: 12
|
|
128092
|
+
}
|
|
128093
|
+
},
|
|
128094
|
+
line: {
|
|
128095
|
+
itemStyle: {
|
|
128096
|
+
},
|
|
128097
|
+
lineStyle: {
|
|
128098
|
+
width: 2
|
|
128099
|
+
}
|
|
128100
|
+
},
|
|
128101
|
+
bar: {
|
|
128102
|
+
itemStyle: {
|
|
128103
|
+
borderRadius: 4
|
|
128104
|
+
}
|
|
128105
|
+
},
|
|
128106
|
+
pie: {
|
|
128107
|
+
roseType: "radius",
|
|
128108
|
+
label: {
|
|
128109
|
+
color: "#333"
|
|
128110
|
+
}
|
|
128111
|
+
},
|
|
128112
|
+
radar: {
|
|
128113
|
+
indicator: {
|
|
128114
|
+
color: "#666666"
|
|
128115
|
+
}
|
|
128116
|
+
},
|
|
128117
|
+
map: {
|
|
128118
|
+
label: {
|
|
128119
|
+
color: "#333"
|
|
128120
|
+
},
|
|
128121
|
+
itemStyle: {
|
|
128122
|
+
borderColor: "#fff"
|
|
128123
|
+
}
|
|
128124
|
+
},
|
|
128125
|
+
gauge: {
|
|
128126
|
+
axisLine: {
|
|
128127
|
+
lineStyle: {
|
|
128128
|
+
color: [[1, "#5470c6"]]
|
|
128129
|
+
}
|
|
128130
|
+
}
|
|
128131
|
+
},
|
|
128132
|
+
toolbox: {
|
|
128133
|
+
iconStyle: {
|
|
128134
|
+
borderColor: "#666666"
|
|
128135
|
+
}
|
|
128136
|
+
},
|
|
128137
|
+
xAxis: {
|
|
128138
|
+
axisLine: {
|
|
128139
|
+
lineStyle: {
|
|
128140
|
+
color: "#DFE9EE"
|
|
128141
|
+
}
|
|
128142
|
+
},
|
|
128143
|
+
axisTick: {
|
|
128144
|
+
lineStyle: {
|
|
128145
|
+
color: "#DFE9EE"
|
|
128146
|
+
},
|
|
128147
|
+
show: false
|
|
128148
|
+
}
|
|
128149
|
+
},
|
|
128150
|
+
yAxis: {
|
|
128151
|
+
axisLine: {
|
|
128152
|
+
lineStyle: {
|
|
128153
|
+
color: "#DFE9EE"
|
|
128154
|
+
}
|
|
128155
|
+
},
|
|
128156
|
+
axisTick: {
|
|
128157
|
+
lineStyle: {
|
|
128158
|
+
color: "#DFE9EE"
|
|
128159
|
+
}
|
|
128160
|
+
},
|
|
128161
|
+
splitLine: {
|
|
128162
|
+
show: true,
|
|
128163
|
+
lineStyle: {
|
|
128164
|
+
type: "dashed",
|
|
128165
|
+
color: "#DFE9EE"
|
|
128166
|
+
}
|
|
128167
|
+
}
|
|
128168
|
+
},
|
|
128169
|
+
splitArea: {
|
|
128170
|
+
areaStyle: {
|
|
128171
|
+
color: ["#f7f8fa", "#ffffff"]
|
|
128172
|
+
}
|
|
128173
|
+
},
|
|
128174
|
+
legend: {
|
|
128175
|
+
textStyle: {
|
|
128176
|
+
color: "#333333"
|
|
128177
|
+
}
|
|
128178
|
+
},
|
|
128179
|
+
tooltip: {
|
|
128180
|
+
borderWidth: 1,
|
|
128181
|
+
backgroundColor: "#ffffff",
|
|
128182
|
+
textStyle: {
|
|
128183
|
+
color: "#333333"
|
|
128184
|
+
},
|
|
128185
|
+
trigger: "axis"
|
|
128186
|
+
}
|
|
128187
|
+
});
|
|
128188
|
+
|
|
128189
|
+
// CONCATENATED MODULE: ./src/components/ex-chart/theme/dark.js
|
|
128190
|
+
/* harmony default export */ var dark = ({
|
|
128191
|
+
color: ["#0de7ff", "#a782ff", "#fcdd60", "#0de7ff", "#ffc5a1", "#6291ae", "#13ce66"],
|
|
128192
|
+
backgroundColor: "#000",
|
|
128193
|
+
textStyle: {
|
|
128194
|
+
fontFamily: "Microsoft YaHei, sans-serif"
|
|
128195
|
+
},
|
|
128196
|
+
title: {
|
|
128197
|
+
textStyle: {
|
|
128198
|
+
color: "#333"
|
|
128199
|
+
},
|
|
128200
|
+
subtextStyle: {
|
|
128201
|
+
color: "#666666"
|
|
128202
|
+
}
|
|
128203
|
+
},
|
|
128204
|
+
line: {
|
|
128205
|
+
itemStyle: {
|
|
128206
|
+
},
|
|
128207
|
+
lineStyle: {
|
|
128208
|
+
width: 2
|
|
128209
|
+
}
|
|
128210
|
+
},
|
|
128211
|
+
bar: {
|
|
128212
|
+
itemStyle: {
|
|
128213
|
+
borderRadius: 4
|
|
128214
|
+
}
|
|
128215
|
+
},
|
|
128216
|
+
pie: {
|
|
128217
|
+
roseType: "radius",
|
|
128218
|
+
label: {
|
|
128219
|
+
color: "#333"
|
|
128220
|
+
}
|
|
128221
|
+
},
|
|
128222
|
+
radar: {
|
|
128223
|
+
indicator: {
|
|
128224
|
+
color: "#666666"
|
|
128225
|
+
}
|
|
128226
|
+
},
|
|
128227
|
+
map: {
|
|
128228
|
+
label: {
|
|
128229
|
+
color: "#333"
|
|
128230
|
+
},
|
|
128231
|
+
itemStyle: {
|
|
128232
|
+
borderColor: "#fff"
|
|
128233
|
+
}
|
|
128234
|
+
},
|
|
128235
|
+
gauge: {
|
|
128236
|
+
axisLine: {
|
|
128237
|
+
lineStyle: {
|
|
128238
|
+
color: [[1, "#5470c6"]]
|
|
128239
|
+
}
|
|
128240
|
+
}
|
|
128241
|
+
},
|
|
128242
|
+
toolbox: {
|
|
128243
|
+
iconStyle: {
|
|
128244
|
+
borderColor: "#666666"
|
|
128245
|
+
}
|
|
128246
|
+
},
|
|
128247
|
+
axisLine: {
|
|
128248
|
+
lineStyle: {
|
|
128249
|
+
color: "#DCDFE6"
|
|
128250
|
+
}
|
|
128251
|
+
},
|
|
128252
|
+
axisTick: {
|
|
128253
|
+
lineStyle: {
|
|
128254
|
+
color: "#DCDFE6"
|
|
128255
|
+
}
|
|
128256
|
+
},
|
|
128257
|
+
splitLine: {
|
|
128258
|
+
lineStyle: {
|
|
128259
|
+
color: "#ebeef5"
|
|
128260
|
+
}
|
|
128261
|
+
},
|
|
128262
|
+
splitArea: {
|
|
128263
|
+
areaStyle: {
|
|
128264
|
+
color: ["#f7f8fa", "#ffffff"]
|
|
128265
|
+
}
|
|
128266
|
+
},
|
|
128267
|
+
legend: {
|
|
128268
|
+
textStyle: {
|
|
128269
|
+
color: "#666"
|
|
128270
|
+
}
|
|
128271
|
+
},
|
|
128272
|
+
tooltip: {
|
|
128273
|
+
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
128274
|
+
borderColor: "#DCDFE6",
|
|
128275
|
+
borderWidth: 1,
|
|
128276
|
+
textStyle: {
|
|
128277
|
+
color: "#333"
|
|
128278
|
+
}
|
|
128279
|
+
}
|
|
128280
|
+
});
|
|
128281
|
+
|
|
128282
|
+
// CONCATENATED MODULE: ./src/components/ex-chart/theme/blue.js
|
|
128283
|
+
/* harmony default export */ var blue = ({
|
|
128284
|
+
color: ["#2CDEB3", "#A17EE6", "#E57E40", "#409EFF"],
|
|
128285
|
+
backgroundColor: "#ffffff",
|
|
128286
|
+
textStyle: {
|
|
128287
|
+
fontFamily: "Microsoft YaHei, sans-serif"
|
|
128288
|
+
},
|
|
128289
|
+
title: {
|
|
128290
|
+
textStyle: {
|
|
128291
|
+
color: "#333"
|
|
128292
|
+
},
|
|
128293
|
+
subtextStyle: {
|
|
128294
|
+
color: "#666666"
|
|
128295
|
+
}
|
|
128296
|
+
},
|
|
128297
|
+
line: {
|
|
128298
|
+
itemStyle: {
|
|
128299
|
+
},
|
|
128300
|
+
lineStyle: {
|
|
128301
|
+
width: 2
|
|
128302
|
+
}
|
|
128303
|
+
},
|
|
128304
|
+
bar: {
|
|
128305
|
+
itemStyle: {
|
|
128306
|
+
borderRadius: 4
|
|
128307
|
+
}
|
|
128308
|
+
},
|
|
128309
|
+
pie: {
|
|
128310
|
+
roseType: "radius",
|
|
128311
|
+
label: {
|
|
128312
|
+
color: "#333"
|
|
128313
|
+
}
|
|
128314
|
+
},
|
|
128315
|
+
radar: {
|
|
128316
|
+
indicator: {
|
|
128317
|
+
color: "#666666"
|
|
128318
|
+
}
|
|
128319
|
+
},
|
|
128320
|
+
map: {
|
|
128321
|
+
label: {
|
|
128322
|
+
color: "#333"
|
|
128323
|
+
},
|
|
128324
|
+
itemStyle: {
|
|
128325
|
+
borderColor: "#fff"
|
|
128326
|
+
}
|
|
128327
|
+
},
|
|
128328
|
+
gauge: {
|
|
128329
|
+
axisLine: {
|
|
128330
|
+
lineStyle: {
|
|
128331
|
+
color: [[1, "#5470c6"]]
|
|
128332
|
+
}
|
|
128333
|
+
}
|
|
128334
|
+
},
|
|
128335
|
+
toolbox: {
|
|
128336
|
+
iconStyle: {
|
|
128337
|
+
borderColor: "#666666"
|
|
128338
|
+
}
|
|
128339
|
+
},
|
|
128340
|
+
axisLine: {
|
|
128341
|
+
lineStyle: {
|
|
128342
|
+
color: "#DCDFE6"
|
|
128343
|
+
}
|
|
128344
|
+
},
|
|
128345
|
+
axisTick: {
|
|
128346
|
+
lineStyle: {
|
|
128347
|
+
color: "#DCDFE6"
|
|
128348
|
+
}
|
|
128349
|
+
},
|
|
128350
|
+
splitLine: {
|
|
128351
|
+
lineStyle: {
|
|
128352
|
+
color: "#ebeef5"
|
|
128353
|
+
}
|
|
128354
|
+
},
|
|
128355
|
+
splitArea: {
|
|
128356
|
+
areaStyle: {
|
|
128357
|
+
color: ["#f7f8fa", "#ffffff"]
|
|
128358
|
+
}
|
|
128359
|
+
},
|
|
128360
|
+
legend: {
|
|
128361
|
+
textStyle: {
|
|
128362
|
+
color: "#666"
|
|
128363
|
+
}
|
|
128364
|
+
},
|
|
128365
|
+
tooltip: {
|
|
128366
|
+
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
128367
|
+
borderColor: "#DCDFE6",
|
|
128368
|
+
borderWidth: 1,
|
|
128369
|
+
textStyle: {
|
|
128370
|
+
color: "#333"
|
|
128371
|
+
}
|
|
128372
|
+
}
|
|
128373
|
+
});
|
|
128374
|
+
|
|
128375
|
+
// CONCATENATED MODULE: ./src/components/ex-chart/theme/starry.js
|
|
128376
|
+
/* harmony default export */ var starry = ({
|
|
128377
|
+
color: [
|
|
128378
|
+
"#1685a9", // 石青
|
|
128379
|
+
"#21a675", // 松柏绿
|
|
128380
|
+
"#1bd1a5", // 飞燕草蓝
|
|
128381
|
+
"#8c4356", // 绛紫
|
|
128382
|
+
"#0dafc6", // 孔雀蓝
|
|
128383
|
+
"#4b5cc4", // 宝蓝
|
|
128384
|
+
"#758a99", // 墨灰
|
|
128385
|
+
"#cca4e3", // 丁香色
|
|
128386
|
+
"#205277", // 靛青色
|
|
128387
|
+
"#d9b611", // 秋香色
|
|
128388
|
+
"#ff8c31", // 杏红
|
|
128389
|
+
"#9d2933", // 胭脂
|
|
128390
|
+
"#0288c5", // 浅靛青蓝
|
|
128391
|
+
"#44cef6" // 天蓝色
|
|
128392
|
+
],
|
|
128393
|
+
backgroundColor: "#ffffff",
|
|
128394
|
+
textStyle: {
|
|
128395
|
+
fontFamily: "Microsoft YaHei, sans-serif"
|
|
128396
|
+
},
|
|
128397
|
+
title: {
|
|
128398
|
+
textStyle: {
|
|
128399
|
+
color: "#333"
|
|
128400
|
+
},
|
|
128401
|
+
subtextStyle: {
|
|
128402
|
+
color: "#666666"
|
|
128403
|
+
}
|
|
128404
|
+
},
|
|
128405
|
+
line: {
|
|
128406
|
+
itemStyle: {
|
|
128407
|
+
},
|
|
128408
|
+
lineStyle: {
|
|
128409
|
+
width: 2
|
|
128410
|
+
}
|
|
128411
|
+
},
|
|
128412
|
+
bar: {
|
|
128413
|
+
itemStyle: {
|
|
128414
|
+
borderRadius: 4
|
|
128415
|
+
}
|
|
128416
|
+
},
|
|
128417
|
+
pie: {
|
|
128418
|
+
roseType: "radius",
|
|
128419
|
+
label: {
|
|
128420
|
+
color: "#333"
|
|
128421
|
+
}
|
|
128422
|
+
},
|
|
128423
|
+
radar: {
|
|
128424
|
+
indicator: {
|
|
128425
|
+
color: "#666666"
|
|
128426
|
+
}
|
|
128427
|
+
},
|
|
128428
|
+
map: {
|
|
128429
|
+
label: {
|
|
128430
|
+
color: "#333"
|
|
128431
|
+
},
|
|
128432
|
+
itemStyle: {
|
|
128433
|
+
borderColor: "#fff"
|
|
128434
|
+
}
|
|
128435
|
+
},
|
|
128436
|
+
gauge: {
|
|
128437
|
+
axisLine: {
|
|
128438
|
+
lineStyle: {
|
|
128439
|
+
color: [[1, "#5470c6"]]
|
|
128440
|
+
}
|
|
128441
|
+
}
|
|
128442
|
+
},
|
|
128443
|
+
toolbox: {
|
|
128444
|
+
iconStyle: {
|
|
128445
|
+
borderColor: "#666666"
|
|
128446
|
+
}
|
|
128447
|
+
},
|
|
128448
|
+
axisLine: {
|
|
128449
|
+
lineStyle: {
|
|
128450
|
+
color: "#DCDFE6"
|
|
128451
|
+
}
|
|
128452
|
+
},
|
|
128453
|
+
axisTick: {
|
|
128454
|
+
lineStyle: {
|
|
128455
|
+
color: "#DCDFE6"
|
|
128456
|
+
}
|
|
128457
|
+
},
|
|
128458
|
+
splitLine: {
|
|
128459
|
+
lineStyle: {
|
|
128460
|
+
color: "#ebeef5"
|
|
128461
|
+
}
|
|
128462
|
+
},
|
|
128463
|
+
splitArea: {
|
|
128464
|
+
areaStyle: {
|
|
128465
|
+
color: ["#f7f8fa", "#ffffff"]
|
|
128466
|
+
}
|
|
128467
|
+
},
|
|
128468
|
+
legend: {
|
|
128469
|
+
textStyle: {
|
|
128470
|
+
color: "#666"
|
|
128471
|
+
}
|
|
128472
|
+
},
|
|
128473
|
+
tooltip: {
|
|
128474
|
+
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
128475
|
+
borderColor: "#DCDFE6",
|
|
128476
|
+
borderWidth: 1,
|
|
128477
|
+
textStyle: {
|
|
128478
|
+
color: "#333"
|
|
128479
|
+
}
|
|
128480
|
+
}
|
|
128481
|
+
});
|
|
128482
|
+
|
|
128483
|
+
// CONCATENATED MODULE: ./src/components/ex-chart/theme/orange.js
|
|
128484
|
+
/* harmony default export */ var orange = ({
|
|
128485
|
+
color: ["#e69419", "#A5b4da", "#F8792C", "#97bfb4", "#de747b", "#d6bac0", "#e62737", "#f35969", "#f1ccb0", "#b7394e", "#fe9c1c2"],
|
|
128486
|
+
backgroundColor: "#ffffff",
|
|
128487
|
+
textStyle: {
|
|
128488
|
+
fontFamily: "Microsoft YaHei, sans-serif"
|
|
128489
|
+
},
|
|
128490
|
+
title: {
|
|
128491
|
+
textStyle: {
|
|
128492
|
+
color: "#333"
|
|
128493
|
+
},
|
|
128494
|
+
subtextStyle: {
|
|
128495
|
+
color: "#666666"
|
|
128496
|
+
}
|
|
128497
|
+
},
|
|
128498
|
+
line: {
|
|
128499
|
+
itemStyle: {
|
|
128500
|
+
color: "#e69419"
|
|
128501
|
+
},
|
|
128502
|
+
lineStyle: {
|
|
128503
|
+
width: 2
|
|
128504
|
+
}
|
|
128505
|
+
},
|
|
128506
|
+
bar: {
|
|
128507
|
+
itemStyle: {
|
|
128508
|
+
borderRadius: 4
|
|
128509
|
+
}
|
|
128510
|
+
},
|
|
128511
|
+
pie: {
|
|
128512
|
+
roseType: "radius",
|
|
128513
|
+
label: {
|
|
128514
|
+
color: "#333"
|
|
128515
|
+
}
|
|
128516
|
+
},
|
|
128517
|
+
radar: {
|
|
128518
|
+
indicator: {
|
|
128519
|
+
color: "#666666"
|
|
128520
|
+
}
|
|
128521
|
+
},
|
|
128522
|
+
map: {
|
|
128523
|
+
label: {
|
|
128524
|
+
color: "#333"
|
|
128525
|
+
},
|
|
128526
|
+
itemStyle: {
|
|
128527
|
+
borderColor: "#fff"
|
|
128528
|
+
}
|
|
128529
|
+
},
|
|
128530
|
+
gauge: {
|
|
128531
|
+
axisLine: {
|
|
128532
|
+
lineStyle: {
|
|
128533
|
+
color: [[1, "#5470c6"]]
|
|
128534
|
+
}
|
|
128535
|
+
}
|
|
128536
|
+
},
|
|
128537
|
+
toolbox: {
|
|
128538
|
+
iconStyle: {
|
|
128539
|
+
borderColor: "#666666"
|
|
128540
|
+
}
|
|
128541
|
+
},
|
|
128542
|
+
axisLine: {
|
|
128543
|
+
lineStyle: {
|
|
128544
|
+
color: "#DCDFE6"
|
|
128545
|
+
}
|
|
128546
|
+
},
|
|
128547
|
+
axisTick: {
|
|
128548
|
+
lineStyle: {
|
|
128549
|
+
color: "#DCDFE6"
|
|
128550
|
+
}
|
|
128551
|
+
},
|
|
128552
|
+
splitLine: {
|
|
128553
|
+
lineStyle: {
|
|
128554
|
+
color: "#ebeef5"
|
|
128555
|
+
}
|
|
128556
|
+
},
|
|
128557
|
+
splitArea: {
|
|
128558
|
+
areaStyle: {
|
|
128559
|
+
color: ["#f7f8fa", "#ffffff"]
|
|
128560
|
+
}
|
|
128561
|
+
},
|
|
128562
|
+
legend: {
|
|
128563
|
+
textStyle: {
|
|
128564
|
+
color: "#666"
|
|
128565
|
+
}
|
|
128566
|
+
},
|
|
128567
|
+
tooltip: {
|
|
128568
|
+
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
128569
|
+
borderColor: "#DCDFE6",
|
|
128570
|
+
borderWidth: 1,
|
|
128571
|
+
textStyle: {
|
|
128572
|
+
color: "#333"
|
|
128573
|
+
}
|
|
128574
|
+
}
|
|
128575
|
+
});
|
|
128576
|
+
|
|
128577
|
+
// CONCATENATED MODULE: ./src/components/ex-chart/utils.js
|
|
128578
|
+
|
|
128579
|
+
|
|
128580
|
+
|
|
128581
|
+
|
|
128582
|
+
|
|
128583
|
+
|
|
128584
|
+
const themeKeys = {
|
|
128585
|
+
"default": white,
|
|
128586
|
+
"white": white,
|
|
128587
|
+
"dark": dark,
|
|
128588
|
+
"blue": blue,
|
|
128589
|
+
"starry": starry,
|
|
128590
|
+
"orange": orange
|
|
128591
|
+
};
|
|
128592
|
+
|
|
128593
|
+
// echarts 仅在客户端加载,避免 SSR 编译/渲染报错
|
|
128594
|
+
let echarts = null;
|
|
128595
|
+
|
|
128596
|
+
function getEcharts() {
|
|
128597
|
+
if (!echarts && typeof window !== 'undefined') {
|
|
128598
|
+
try {
|
|
128599
|
+
echarts = __webpack_require__("313e");
|
|
128600
|
+
// 注册所有主题
|
|
128601
|
+
for (const key in themeKeys) {
|
|
128602
|
+
echarts.registerTheme(key, themeKeys[key]);
|
|
128603
|
+
}
|
|
128604
|
+
} catch (e) {
|
|
128605
|
+
console.warn('[ExChart] echarts 加载失败:', e.message);
|
|
128606
|
+
}
|
|
128607
|
+
}
|
|
128608
|
+
return echarts;
|
|
128609
|
+
}
|
|
128610
|
+
|
|
128611
|
+
// 字体大小配置
|
|
128612
|
+
const fontSizeMap = {
|
|
128613
|
+
small: {
|
|
128614
|
+
title: 14,
|
|
128615
|
+
subtitle: 11,
|
|
128616
|
+
legend: 11,
|
|
128617
|
+
axisLabel: 10,
|
|
128618
|
+
tooltip: 11,
|
|
128619
|
+
label: 11
|
|
128620
|
+
},
|
|
128621
|
+
medium: {
|
|
128622
|
+
title: 16,
|
|
128623
|
+
subtitle: 12,
|
|
128624
|
+
legend: 12,
|
|
128625
|
+
axisLabel: 12,
|
|
128626
|
+
tooltip: 12,
|
|
128627
|
+
label: 12
|
|
128628
|
+
},
|
|
128629
|
+
large: {
|
|
128630
|
+
title: 18,
|
|
128631
|
+
subtitle: 14,
|
|
128632
|
+
legend: 14,
|
|
128633
|
+
axisLabel: 14,
|
|
128634
|
+
tooltip: 14,
|
|
128635
|
+
label: 14
|
|
128636
|
+
}
|
|
128637
|
+
};
|
|
128638
|
+
|
|
128639
|
+
function EchartsUtil() {}
|
|
128640
|
+
|
|
128641
|
+
EchartsUtil.currentTheme = "default";
|
|
128642
|
+
EchartsUtil.currentSize = "medium";
|
|
128643
|
+
EchartsUtil.inverse = false;
|
|
128644
|
+
|
|
128645
|
+
EchartsUtil.EchartsUtil = {
|
|
128646
|
+
backgroundColor: "transparent",
|
|
128647
|
+
tooltip: {
|
|
128648
|
+
trigger: "axis",
|
|
128649
|
+
borderWidth: 1
|
|
128650
|
+
},
|
|
128651
|
+
legend: {
|
|
128652
|
+
right: 20,
|
|
128653
|
+
top: 0,
|
|
128654
|
+
show: true,
|
|
128655
|
+
textStyle: {
|
|
128656
|
+
fontSize: 12
|
|
128657
|
+
}
|
|
128658
|
+
},
|
|
128659
|
+
grid: {
|
|
128660
|
+
top: "25%",
|
|
128661
|
+
left: "40",
|
|
128662
|
+
right: "15",
|
|
128663
|
+
bottom: "40"
|
|
128664
|
+
},
|
|
128665
|
+
xAxis: {
|
|
128666
|
+
type: "category",
|
|
128667
|
+
boundaryGap: false,
|
|
128668
|
+
axisTick: {
|
|
128669
|
+
show: true,
|
|
128670
|
+
length: 4
|
|
128671
|
+
},
|
|
128672
|
+
axisLabel: {
|
|
128673
|
+
fontSize: 12,
|
|
128674
|
+
interval: 0,
|
|
128675
|
+
formatter: function(value) {
|
|
128676
|
+
return !this.reverse && this.longLable ? value.replace(new RegExp(`(.{${this.longLableSplitNum}})`, "g"), `$1\n`) : value;
|
|
128677
|
+
}
|
|
128678
|
+
}
|
|
128679
|
+
},
|
|
128680
|
+
yAxis: {
|
|
128681
|
+
type: "value",
|
|
128682
|
+
axisTick: {
|
|
128683
|
+
show: false
|
|
128684
|
+
},
|
|
128685
|
+
min: null,
|
|
128686
|
+
max: null,
|
|
128687
|
+
axisLabel: {
|
|
128688
|
+
show: false
|
|
128689
|
+
},
|
|
128690
|
+
splitLine: {
|
|
128691
|
+
lineStyle: {
|
|
128692
|
+
type: "dashed",
|
|
128693
|
+
width: 1
|
|
128694
|
+
}
|
|
128695
|
+
}
|
|
128696
|
+
}
|
|
128697
|
+
};
|
|
128698
|
+
|
|
128699
|
+
EchartsUtil.chartInstanceList = [];
|
|
128700
|
+
|
|
128701
|
+
EchartsUtil.mergeOptions = function(themeOption, customOption) {
|
|
128702
|
+
return Object.assign({}, this.baseOption, themeOption, customOption);
|
|
128703
|
+
};
|
|
128704
|
+
|
|
128705
|
+
// 根据字体大小调整主题配置
|
|
128706
|
+
EchartsUtil.applyFontSize = function(themeOption, size) {
|
|
128707
|
+
const fontSizeConfig = fontSizeMap[size] || fontSizeMap.medium;
|
|
128708
|
+
|
|
128709
|
+
const result = JSON.parse(JSON.stringify(themeOption));
|
|
128710
|
+
|
|
128711
|
+
// 调整标题字体大小
|
|
128712
|
+
if (result.title && result.title.textStyle) {
|
|
128713
|
+
result.title.textStyle.fontSize = fontSizeConfig.title;
|
|
128714
|
+
}
|
|
128715
|
+
if (result.title && result.title.subtextStyle) {
|
|
128716
|
+
result.title.subtextStyle.fontSize = fontSizeConfig.subtitle;
|
|
128717
|
+
}
|
|
128718
|
+
|
|
128719
|
+
// 调整图例字体大小
|
|
128720
|
+
if (result.legend && result.legend.textStyle) {
|
|
128721
|
+
result.legend.textStyle.fontSize = fontSizeConfig.legend;
|
|
128722
|
+
}
|
|
128723
|
+
|
|
128724
|
+
// 调整提示框字体大小
|
|
128725
|
+
if (result.tooltip && result.tooltip.textStyle) {
|
|
128726
|
+
result.tooltip.textStyle.fontSize = fontSizeConfig.tooltip;
|
|
128727
|
+
}
|
|
128728
|
+
|
|
128729
|
+
// 调整饼图标签字体大小
|
|
128730
|
+
if (result.pie && result.pie.label) {
|
|
128731
|
+
if (typeof result.pie.label === 'object') {
|
|
128732
|
+
result.pie.label.fontSize = fontSizeConfig.label;
|
|
128733
|
+
}
|
|
128734
|
+
}
|
|
128735
|
+
|
|
128736
|
+
// 调整雷达图指示器字体大小
|
|
128737
|
+
if (result.radar && result.radar.indicator) {
|
|
128738
|
+
if (typeof result.radar.indicator === 'object' && result.radar.indicator.textStyle) {
|
|
128739
|
+
result.radar.indicator.textStyle.fontSize = fontSizeConfig.label;
|
|
128740
|
+
}
|
|
128741
|
+
}
|
|
128742
|
+
|
|
128743
|
+
// 调整地图标签字体大小
|
|
128744
|
+
if (result.map && result.map.label) {
|
|
128745
|
+
if (typeof result.map.label === 'object') {
|
|
128746
|
+
result.map.label.fontSize = fontSizeConfig.label;
|
|
128747
|
+
}
|
|
128748
|
+
}
|
|
128749
|
+
|
|
128750
|
+
return result;
|
|
128751
|
+
};
|
|
128752
|
+
|
|
128753
|
+
EchartsUtil.init = function(dom, theme, customOption, size) {
|
|
128754
|
+
const ec = getEcharts();
|
|
128755
|
+
// SSR 环境下忽略初始化
|
|
128756
|
+
if (!ec || !dom) return null;
|
|
128757
|
+
|
|
128758
|
+
theme = theme || "default";
|
|
128759
|
+
size = size || "medium";
|
|
128760
|
+
customOption = customOption || {};
|
|
128761
|
+
|
|
128762
|
+
const useTheme = this.currentTheme || theme;
|
|
128763
|
+
const useSize = this.currentSize || size;
|
|
128764
|
+
|
|
128765
|
+
this.currentTheme = useTheme;
|
|
128766
|
+
this.currentSize = useSize;
|
|
128767
|
+
|
|
128768
|
+
let themeOption = themeKeys[useTheme];
|
|
128769
|
+
// 应用字体大小配置
|
|
128770
|
+
themeOption = this.applyFontSize(themeOption, useSize);
|
|
128771
|
+
|
|
128772
|
+
const option = this.mergeOptions(themeOption, customOption);
|
|
128773
|
+
|
|
128774
|
+
const chart = ec.init(dom, useTheme);
|
|
128775
|
+
chart.setOption(option, true);
|
|
128776
|
+
|
|
128777
|
+
this.chartInstanceList.push({
|
|
128778
|
+
dom,
|
|
128779
|
+
chart,
|
|
128780
|
+
customOption,
|
|
128781
|
+
size: useSize
|
|
128782
|
+
});
|
|
128783
|
+
|
|
128784
|
+
this.bindResize(chart);
|
|
128785
|
+
return chart;
|
|
128786
|
+
};
|
|
128787
|
+
|
|
128788
|
+
EchartsUtil.changeSingleTheme = function(dom, chartIns, customOption, newTheme) {
|
|
128789
|
+
const ec = getEcharts();
|
|
128790
|
+
if (!ec || !dom || !chartIns) return;
|
|
128791
|
+
|
|
128792
|
+
customOption = customOption || {};
|
|
128793
|
+
newTheme = newTheme || "default";
|
|
128794
|
+
|
|
128795
|
+
this.currentTheme = newTheme;
|
|
128796
|
+
chartIns.dispose();
|
|
128797
|
+
|
|
128798
|
+
const newChart = ec.init(dom, newTheme, customOption);
|
|
128799
|
+
|
|
128800
|
+
const item = this.chartInstanceList.find(function(v) {
|
|
128801
|
+
return v.dom === dom;
|
|
128802
|
+
});
|
|
128803
|
+
|
|
128804
|
+
if (item) {
|
|
128805
|
+
item.chart = newChart;
|
|
128806
|
+
}
|
|
128807
|
+
|
|
128808
|
+
return newChart;
|
|
128809
|
+
};
|
|
128810
|
+
|
|
128811
|
+
EchartsUtil.changeAllTheme = function(newTheme, newSize) {
|
|
128812
|
+
const ec = getEcharts();
|
|
128813
|
+
if (!ec || !newTheme) return;
|
|
128814
|
+
|
|
128815
|
+
this.currentTheme = newTheme;
|
|
128816
|
+
// 如果传入了新的 size,则更新全局 size
|
|
128817
|
+
if (newSize) {
|
|
128818
|
+
this.currentSize = newSize;
|
|
128819
|
+
}
|
|
128820
|
+
|
|
128821
|
+
this.chartInstanceList.forEach(function(item) {
|
|
128822
|
+
const dom = item.dom;
|
|
128823
|
+
const chart = item.chart;
|
|
128824
|
+
const customOption = item.customOption;
|
|
128825
|
+
// 使用图表自己的 size,如果没有则使用全局 size
|
|
128826
|
+
const useSize = item.size || EchartsUtil.currentSize;
|
|
128827
|
+
|
|
128828
|
+
if (chart) {
|
|
128829
|
+
chart.dispose();
|
|
128830
|
+
}
|
|
128831
|
+
|
|
128832
|
+
const newChart = ec.init(dom, newTheme);
|
|
128833
|
+
let themeOption = themeKeys[newTheme];
|
|
128834
|
+
// 应用字体大小配置
|
|
128835
|
+
themeOption = EchartsUtil.applyFontSize(themeOption, useSize);
|
|
128836
|
+
const option = EchartsUtil.mergeOptions(themeOption, customOption);
|
|
128837
|
+
|
|
128838
|
+
newChart.setOption(option, true);
|
|
128839
|
+
item.chart = newChart;
|
|
128840
|
+
// 更新图表的 size 记录
|
|
128841
|
+
item.size = useSize;
|
|
128842
|
+
EchartsUtil.bindResize(newChart);
|
|
128843
|
+
});
|
|
128844
|
+
};
|
|
128845
|
+
|
|
128846
|
+
EchartsUtil.bindResize = function(chartIns) {
|
|
128847
|
+
if (!chartIns || chartIns.resizeLocked) return;
|
|
128848
|
+
|
|
128849
|
+
window.addEventListener("resize", function() {
|
|
128850
|
+
chartIns.resize();
|
|
128851
|
+
});
|
|
128852
|
+
|
|
128853
|
+
chartIns._resizeLocked = true;
|
|
128854
|
+
};
|
|
128855
|
+
|
|
128856
|
+
EchartsUtil.destroy = function(chartIns) {
|
|
128857
|
+
if (chartIns) {
|
|
128858
|
+
chartIns.dispose();
|
|
128859
|
+
}
|
|
128860
|
+
|
|
128861
|
+
this.chartInstanceList = this.chartInstanceList.filter(function(item) {
|
|
128862
|
+
return item.chart !== chartIns;
|
|
128863
|
+
});
|
|
128864
|
+
};
|
|
128865
|
+
|
|
128866
|
+
EchartsUtil.destroyAll = function() {
|
|
128867
|
+
this.chartInstanceList.forEach(function(item) {
|
|
128868
|
+
if (item.chart) {
|
|
128869
|
+
item.chart.dispose();
|
|
128870
|
+
}
|
|
128871
|
+
});
|
|
128872
|
+
|
|
128873
|
+
this.chartInstanceList = [];
|
|
128874
|
+
};
|
|
128875
|
+
|
|
128876
|
+
/* harmony default export */ var utils = (EchartsUtil);
|
|
128877
|
+
|
|
128878
|
+
|
|
128879
|
+
|
|
128066
128880
|
// CONCATENATED MODULE: ./src/utils/index.js
|
|
128881
|
+
|
|
128067
128882
|
// 默认配置
|
|
128068
128883
|
const defaultConfig = {
|
|
128069
128884
|
theme: 'white',
|
|
@@ -128110,7 +128925,7 @@ const setConfig = function(config) {
|
|
|
128110
128925
|
}
|
|
128111
128926
|
|
|
128112
128927
|
|
|
128113
|
-
// 设置主题
|
|
128928
|
+
// 设置主题 并更新图表主题
|
|
128114
128929
|
const setTheme = function(theme) {
|
|
128115
128930
|
const validThemes = ['white', 'dark']
|
|
128116
128931
|
if (!validThemes.includes(theme)) {
|
|
@@ -128125,9 +128940,13 @@ const setTheme = function(theme) {
|
|
|
128125
128940
|
if (theme === 'dark') {
|
|
128126
128941
|
root.setAttribute('data-theme', 'dark')
|
|
128127
128942
|
} else {
|
|
128128
|
-
root.
|
|
128943
|
+
root.setAttribute('data-theme', theme)
|
|
128129
128944
|
}
|
|
128130
128945
|
|
|
128946
|
+
// 更新图表主题
|
|
128947
|
+
utils.changeAllTheme(currentConfig.theme, currentConfig.size)
|
|
128948
|
+
console.log('更新图表主题')
|
|
128949
|
+
|
|
128131
128950
|
emitConfigChange('theme', theme)
|
|
128132
128951
|
}
|
|
128133
128952
|
|
|
@@ -128141,6 +128960,10 @@ const setSize = function(size) {
|
|
|
128141
128960
|
|
|
128142
128961
|
currentConfig.size = size
|
|
128143
128962
|
document.documentElement.setAttribute('data-size', size)
|
|
128963
|
+
// 更新图表主题
|
|
128964
|
+
utils.changeAllTheme(currentConfig.theme, currentConfig.size)
|
|
128965
|
+
console.log('更新图表字体')
|
|
128966
|
+
|
|
128144
128967
|
emitConfigChange('size', size)
|
|
128145
128968
|
}
|
|
128146
128969
|
|
|
@@ -128245,7 +129068,7 @@ const onConfigChange = function(listener) {
|
|
|
128245
129068
|
}
|
|
128246
129069
|
}
|
|
128247
129070
|
|
|
128248
|
-
/* harmony default export */ var
|
|
129071
|
+
/* harmony default export */ var src_utils = ({
|
|
128249
129072
|
setTheme,
|
|
128250
129073
|
setSize,
|
|
128251
129074
|
setPrimaryColor,
|
|
@@ -128698,6 +129521,7 @@ var xt_card_item_component = normalizeComponent(
|
|
|
128698
129521
|
/* harmony default export */ var components_xt_card_item = (xt_card_item);
|
|
128699
129522
|
// 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
|
|
128700
129523
|
|
|
129524
|
+
|
|
128701
129525
|
/* harmony default export */ var xt_config_providervue_type_script_lang_js = ({
|
|
128702
129526
|
name: 'XtConfigProvider',
|
|
128703
129527
|
inheritAttrs: false,
|
|
@@ -128838,9 +129662,9 @@ var xt_card_item_component = normalizeComponent(
|
|
|
128838
129662
|
}
|
|
128839
129663
|
|
|
128840
129664
|
const sizeMap = {
|
|
128841
|
-
small: '
|
|
128842
|
-
medium: '
|
|
128843
|
-
large: '
|
|
129665
|
+
small: '14px',
|
|
129666
|
+
medium: '16px',
|
|
129667
|
+
large: '18px'
|
|
128844
129668
|
}
|
|
128845
129669
|
if (sizeMap[this.size]) {
|
|
128846
129670
|
result['--xt-font-size-base'] = sizeMap[this.size]
|
|
@@ -129007,6 +129831,9 @@ var xt_card_item_component = normalizeComponent(
|
|
|
129007
129831
|
|
|
129008
129832
|
// 设置 data-theme 属性
|
|
129009
129833
|
element.setAttribute('data-theme', this.theme)
|
|
129834
|
+
|
|
129835
|
+
// 更新图表颜色
|
|
129836
|
+
utils.changeAllTheme(this.theme, this.size, this.primaryColor)
|
|
129010
129837
|
|
|
129011
129838
|
// 触发主题改变钩子(当主题实际发生变化时)
|
|
129012
129839
|
if (prevTheme !== this.theme && typeof this.onThemeChange === 'function') {
|
|
@@ -129049,8 +129876,8 @@ var xt_card_item_component = normalizeComponent(
|
|
|
129049
129876
|
|
|
129050
129877
|
// CONCATENATED MODULE: ./src/components/xt-config-provider/index.vue?vue&type=script&lang=js
|
|
129051
129878
|
/* harmony default export */ var components_xt_config_providervue_type_script_lang_js = (xt_config_providervue_type_script_lang_js);
|
|
129052
|
-
// EXTERNAL MODULE: ./src/components/xt-config-provider/index.vue?vue&type=style&index=0&id=
|
|
129053
|
-
var
|
|
129879
|
+
// EXTERNAL MODULE: ./src/components/xt-config-provider/index.vue?vue&type=style&index=0&id=314a5524&prod&scoped=true&lang=css
|
|
129880
|
+
var xt_config_providervue_type_style_index_0_id_314a5524_prod_scoped_true_lang_css = __webpack_require__("24a5");
|
|
129054
129881
|
|
|
129055
129882
|
// CONCATENATED MODULE: ./src/components/xt-config-provider/index.vue
|
|
129056
129883
|
var xt_config_provider_render, xt_config_provider_staticRenderFns
|
|
@@ -129067,7 +129894,7 @@ var xt_config_provider_component = normalizeComponent(
|
|
|
129067
129894
|
xt_config_provider_staticRenderFns,
|
|
129068
129895
|
false,
|
|
129069
129896
|
null,
|
|
129070
|
-
"
|
|
129897
|
+
"314a5524",
|
|
129071
129898
|
null
|
|
129072
129899
|
|
|
129073
129900
|
)
|
|
@@ -129817,13 +130644,13 @@ var xt_date_picker_component = normalizeComponent(
|
|
|
129817
130644
|
// CONCATENATED MODULE: ./src/components/xt-date-picker/index.js
|
|
129818
130645
|
|
|
129819
130646
|
/* harmony default export */ var components_xt_date_picker = (xt_date_picker);
|
|
129820
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44e6dca7-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=
|
|
129821
|
-
var
|
|
130647
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44e6dca7-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
|
|
130648
|
+
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)
|
|
129822
130649
|
}
|
|
129823
|
-
var
|
|
130650
|
+
var ex_buttonvue_type_template_id_1b7e9238_staticRenderFns = []
|
|
129824
130651
|
|
|
129825
130652
|
|
|
129826
|
-
// CONCATENATED MODULE: ./src/components/ex-button/index.vue?vue&type=template&id=
|
|
130653
|
+
// CONCATENATED MODULE: ./src/components/ex-button/index.vue?vue&type=template&id=1b7e9238
|
|
129827
130654
|
|
|
129828
130655
|
// 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/ex-button/index.vue?vue&type=script&lang=js
|
|
129829
130656
|
|
|
@@ -129852,7 +130679,7 @@ var ex_buttonvue_type_template_id_4c2fec21_staticRenderFns = []
|
|
|
129852
130679
|
size: {
|
|
129853
130680
|
type: String,
|
|
129854
130681
|
default: null,
|
|
129855
|
-
validator: (val) => !val || ['small', 'medium', 'large'].includes(val)
|
|
130682
|
+
validator: (val) => !val || ['mini', 'small', 'medium', 'large'].includes(val)
|
|
129856
130683
|
}
|
|
129857
130684
|
},
|
|
129858
130685
|
data() {
|
|
@@ -129895,8 +130722,8 @@ var ex_buttonvue_type_template_id_4c2fec21_staticRenderFns = []
|
|
|
129895
130722
|
|
|
129896
130723
|
var ex_button_component = normalizeComponent(
|
|
129897
130724
|
components_ex_buttonvue_type_script_lang_js,
|
|
129898
|
-
|
|
129899
|
-
|
|
130725
|
+
ex_buttonvue_type_template_id_1b7e9238_render,
|
|
130726
|
+
ex_buttonvue_type_template_id_1b7e9238_staticRenderFns,
|
|
129900
130727
|
false,
|
|
129901
130728
|
null,
|
|
129902
130729
|
null,
|
|
@@ -129924,809 +130751,6 @@ var ExBarvue_type_template_id_10acd2fc_scoped_true_staticRenderFns = []
|
|
|
129924
130751
|
|
|
129925
130752
|
// CONCATENATED MODULE: ./src/components/ex-chart/ExBar.vue?vue&type=template&id=10acd2fc&scoped=true
|
|
129926
130753
|
|
|
129927
|
-
// CONCATENATED MODULE: ./src/components/ex-chart/theme/white.js
|
|
129928
|
-
/* harmony default export */ var white = ({
|
|
129929
|
-
color: ["#1890ff", "#37c3a4", "#29c0ce", "#6480D7", "#8cce6f", "#3a5dca", "#ffb74d"],
|
|
129930
|
-
backgroundColor: "#ffffff",
|
|
129931
|
-
textStyle: {
|
|
129932
|
-
fontFamily: "Microsoft YaHei, sans-serif"
|
|
129933
|
-
},
|
|
129934
|
-
title: {
|
|
129935
|
-
textStyle: {
|
|
129936
|
-
color: "#333",
|
|
129937
|
-
fontSize: 16
|
|
129938
|
-
},
|
|
129939
|
-
subtextStyle: {
|
|
129940
|
-
color: "#666666",
|
|
129941
|
-
fontSize: 12
|
|
129942
|
-
}
|
|
129943
|
-
},
|
|
129944
|
-
line: {
|
|
129945
|
-
itemStyle: {
|
|
129946
|
-
},
|
|
129947
|
-
lineStyle: {
|
|
129948
|
-
width: 2
|
|
129949
|
-
}
|
|
129950
|
-
},
|
|
129951
|
-
bar: {
|
|
129952
|
-
itemStyle: {
|
|
129953
|
-
borderRadius: 4
|
|
129954
|
-
}
|
|
129955
|
-
},
|
|
129956
|
-
pie: {
|
|
129957
|
-
roseType: "radius",
|
|
129958
|
-
label: {
|
|
129959
|
-
color: "#333"
|
|
129960
|
-
}
|
|
129961
|
-
},
|
|
129962
|
-
radar: {
|
|
129963
|
-
indicator: {
|
|
129964
|
-
color: "#666666"
|
|
129965
|
-
}
|
|
129966
|
-
},
|
|
129967
|
-
map: {
|
|
129968
|
-
label: {
|
|
129969
|
-
color: "#333"
|
|
129970
|
-
},
|
|
129971
|
-
itemStyle: {
|
|
129972
|
-
borderColor: "#fff"
|
|
129973
|
-
}
|
|
129974
|
-
},
|
|
129975
|
-
gauge: {
|
|
129976
|
-
axisLine: {
|
|
129977
|
-
lineStyle: {
|
|
129978
|
-
color: [[1, "#5470c6"]]
|
|
129979
|
-
}
|
|
129980
|
-
}
|
|
129981
|
-
},
|
|
129982
|
-
toolbox: {
|
|
129983
|
-
iconStyle: {
|
|
129984
|
-
borderColor: "#666666"
|
|
129985
|
-
}
|
|
129986
|
-
},
|
|
129987
|
-
xAxis: {
|
|
129988
|
-
axisLine: {
|
|
129989
|
-
lineStyle: {
|
|
129990
|
-
color: "#DFE9EE"
|
|
129991
|
-
}
|
|
129992
|
-
},
|
|
129993
|
-
axisTick: {
|
|
129994
|
-
lineStyle: {
|
|
129995
|
-
color: "#DFE9EE"
|
|
129996
|
-
},
|
|
129997
|
-
show: false
|
|
129998
|
-
}
|
|
129999
|
-
},
|
|
130000
|
-
yAxis: {
|
|
130001
|
-
axisLine: {
|
|
130002
|
-
lineStyle: {
|
|
130003
|
-
color: "#DFE9EE"
|
|
130004
|
-
}
|
|
130005
|
-
},
|
|
130006
|
-
axisTick: {
|
|
130007
|
-
lineStyle: {
|
|
130008
|
-
color: "#DFE9EE"
|
|
130009
|
-
}
|
|
130010
|
-
},
|
|
130011
|
-
splitLine: {
|
|
130012
|
-
show: true,
|
|
130013
|
-
lineStyle: {
|
|
130014
|
-
type: "dashed",
|
|
130015
|
-
color: "#DFE9EE"
|
|
130016
|
-
}
|
|
130017
|
-
}
|
|
130018
|
-
},
|
|
130019
|
-
splitArea: {
|
|
130020
|
-
areaStyle: {
|
|
130021
|
-
color: ["#f7f8fa", "#ffffff"]
|
|
130022
|
-
}
|
|
130023
|
-
},
|
|
130024
|
-
legend: {
|
|
130025
|
-
textStyle: {
|
|
130026
|
-
color: "#333333"
|
|
130027
|
-
}
|
|
130028
|
-
},
|
|
130029
|
-
tooltip: {
|
|
130030
|
-
borderWidth: 1,
|
|
130031
|
-
backgroundColor: "#ffffff",
|
|
130032
|
-
textStyle: {
|
|
130033
|
-
color: "#333333"
|
|
130034
|
-
},
|
|
130035
|
-
trigger: "axis"
|
|
130036
|
-
}
|
|
130037
|
-
});
|
|
130038
|
-
|
|
130039
|
-
// CONCATENATED MODULE: ./src/components/ex-chart/theme/dark.js
|
|
130040
|
-
/* harmony default export */ var dark = ({
|
|
130041
|
-
color: ["#0de7ff", "#a782ff", "#fcdd60", "#0de7ff", "#ffc5a1", "#6291ae", "#13ce66"],
|
|
130042
|
-
backgroundColor: "transparent",
|
|
130043
|
-
textStyle: {
|
|
130044
|
-
fontFamily: "Microsoft YaHei, sans-serif"
|
|
130045
|
-
},
|
|
130046
|
-
title: {
|
|
130047
|
-
textStyle: {
|
|
130048
|
-
color: "#333"
|
|
130049
|
-
},
|
|
130050
|
-
subtextStyle: {
|
|
130051
|
-
color: "#666666"
|
|
130052
|
-
}
|
|
130053
|
-
},
|
|
130054
|
-
line: {
|
|
130055
|
-
itemStyle: {
|
|
130056
|
-
},
|
|
130057
|
-
lineStyle: {
|
|
130058
|
-
width: 2
|
|
130059
|
-
}
|
|
130060
|
-
},
|
|
130061
|
-
bar: {
|
|
130062
|
-
itemStyle: {
|
|
130063
|
-
borderRadius: 4
|
|
130064
|
-
}
|
|
130065
|
-
},
|
|
130066
|
-
pie: {
|
|
130067
|
-
roseType: "radius",
|
|
130068
|
-
label: {
|
|
130069
|
-
color: "#333"
|
|
130070
|
-
}
|
|
130071
|
-
},
|
|
130072
|
-
radar: {
|
|
130073
|
-
indicator: {
|
|
130074
|
-
color: "#666666"
|
|
130075
|
-
}
|
|
130076
|
-
},
|
|
130077
|
-
map: {
|
|
130078
|
-
label: {
|
|
130079
|
-
color: "#333"
|
|
130080
|
-
},
|
|
130081
|
-
itemStyle: {
|
|
130082
|
-
borderColor: "#fff"
|
|
130083
|
-
}
|
|
130084
|
-
},
|
|
130085
|
-
gauge: {
|
|
130086
|
-
axisLine: {
|
|
130087
|
-
lineStyle: {
|
|
130088
|
-
color: [[1, "#5470c6"]]
|
|
130089
|
-
}
|
|
130090
|
-
}
|
|
130091
|
-
},
|
|
130092
|
-
toolbox: {
|
|
130093
|
-
iconStyle: {
|
|
130094
|
-
borderColor: "#666666"
|
|
130095
|
-
}
|
|
130096
|
-
},
|
|
130097
|
-
axisLine: {
|
|
130098
|
-
lineStyle: {
|
|
130099
|
-
color: "#DCDFE6"
|
|
130100
|
-
}
|
|
130101
|
-
},
|
|
130102
|
-
axisTick: {
|
|
130103
|
-
lineStyle: {
|
|
130104
|
-
color: "#DCDFE6"
|
|
130105
|
-
}
|
|
130106
|
-
},
|
|
130107
|
-
splitLine: {
|
|
130108
|
-
lineStyle: {
|
|
130109
|
-
color: "#ebeef5"
|
|
130110
|
-
}
|
|
130111
|
-
},
|
|
130112
|
-
splitArea: {
|
|
130113
|
-
areaStyle: {
|
|
130114
|
-
color: ["#f7f8fa", "#ffffff"]
|
|
130115
|
-
}
|
|
130116
|
-
},
|
|
130117
|
-
legend: {
|
|
130118
|
-
textStyle: {
|
|
130119
|
-
color: "#666"
|
|
130120
|
-
}
|
|
130121
|
-
},
|
|
130122
|
-
tooltip: {
|
|
130123
|
-
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
130124
|
-
borderColor: "#DCDFE6",
|
|
130125
|
-
borderWidth: 1,
|
|
130126
|
-
textStyle: {
|
|
130127
|
-
color: "#333"
|
|
130128
|
-
}
|
|
130129
|
-
}
|
|
130130
|
-
});
|
|
130131
|
-
|
|
130132
|
-
// CONCATENATED MODULE: ./src/components/ex-chart/theme/blue.js
|
|
130133
|
-
/* harmony default export */ var blue = ({
|
|
130134
|
-
color: ["#2CDEB3", "#A17EE6", "#E57E40", "#409EFF"],
|
|
130135
|
-
backgroundColor: "#ffffff",
|
|
130136
|
-
textStyle: {
|
|
130137
|
-
fontFamily: "Microsoft YaHei, sans-serif"
|
|
130138
|
-
},
|
|
130139
|
-
title: {
|
|
130140
|
-
textStyle: {
|
|
130141
|
-
color: "#333"
|
|
130142
|
-
},
|
|
130143
|
-
subtextStyle: {
|
|
130144
|
-
color: "#666666"
|
|
130145
|
-
}
|
|
130146
|
-
},
|
|
130147
|
-
line: {
|
|
130148
|
-
itemStyle: {
|
|
130149
|
-
},
|
|
130150
|
-
lineStyle: {
|
|
130151
|
-
width: 2
|
|
130152
|
-
}
|
|
130153
|
-
},
|
|
130154
|
-
bar: {
|
|
130155
|
-
itemStyle: {
|
|
130156
|
-
borderRadius: 4
|
|
130157
|
-
}
|
|
130158
|
-
},
|
|
130159
|
-
pie: {
|
|
130160
|
-
roseType: "radius",
|
|
130161
|
-
label: {
|
|
130162
|
-
color: "#333"
|
|
130163
|
-
}
|
|
130164
|
-
},
|
|
130165
|
-
radar: {
|
|
130166
|
-
indicator: {
|
|
130167
|
-
color: "#666666"
|
|
130168
|
-
}
|
|
130169
|
-
},
|
|
130170
|
-
map: {
|
|
130171
|
-
label: {
|
|
130172
|
-
color: "#333"
|
|
130173
|
-
},
|
|
130174
|
-
itemStyle: {
|
|
130175
|
-
borderColor: "#fff"
|
|
130176
|
-
}
|
|
130177
|
-
},
|
|
130178
|
-
gauge: {
|
|
130179
|
-
axisLine: {
|
|
130180
|
-
lineStyle: {
|
|
130181
|
-
color: [[1, "#5470c6"]]
|
|
130182
|
-
}
|
|
130183
|
-
}
|
|
130184
|
-
},
|
|
130185
|
-
toolbox: {
|
|
130186
|
-
iconStyle: {
|
|
130187
|
-
borderColor: "#666666"
|
|
130188
|
-
}
|
|
130189
|
-
},
|
|
130190
|
-
axisLine: {
|
|
130191
|
-
lineStyle: {
|
|
130192
|
-
color: "#DCDFE6"
|
|
130193
|
-
}
|
|
130194
|
-
},
|
|
130195
|
-
axisTick: {
|
|
130196
|
-
lineStyle: {
|
|
130197
|
-
color: "#DCDFE6"
|
|
130198
|
-
}
|
|
130199
|
-
},
|
|
130200
|
-
splitLine: {
|
|
130201
|
-
lineStyle: {
|
|
130202
|
-
color: "#ebeef5"
|
|
130203
|
-
}
|
|
130204
|
-
},
|
|
130205
|
-
splitArea: {
|
|
130206
|
-
areaStyle: {
|
|
130207
|
-
color: ["#f7f8fa", "#ffffff"]
|
|
130208
|
-
}
|
|
130209
|
-
},
|
|
130210
|
-
legend: {
|
|
130211
|
-
textStyle: {
|
|
130212
|
-
color: "#666"
|
|
130213
|
-
}
|
|
130214
|
-
},
|
|
130215
|
-
tooltip: {
|
|
130216
|
-
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
130217
|
-
borderColor: "#DCDFE6",
|
|
130218
|
-
borderWidth: 1,
|
|
130219
|
-
textStyle: {
|
|
130220
|
-
color: "#333"
|
|
130221
|
-
}
|
|
130222
|
-
}
|
|
130223
|
-
});
|
|
130224
|
-
|
|
130225
|
-
// CONCATENATED MODULE: ./src/components/ex-chart/theme/starry.js
|
|
130226
|
-
/* harmony default export */ var starry = ({
|
|
130227
|
-
color: [
|
|
130228
|
-
"#1685a9", // 石青
|
|
130229
|
-
"#21a675", // 松柏绿
|
|
130230
|
-
"#1bd1a5", // 飞燕草蓝
|
|
130231
|
-
"#8c4356", // 绛紫
|
|
130232
|
-
"#0dafc6", // 孔雀蓝
|
|
130233
|
-
"#4b5cc4", // 宝蓝
|
|
130234
|
-
"#758a99", // 墨灰
|
|
130235
|
-
"#cca4e3", // 丁香色
|
|
130236
|
-
"#205277", // 靛青色
|
|
130237
|
-
"#d9b611", // 秋香色
|
|
130238
|
-
"#ff8c31", // 杏红
|
|
130239
|
-
"#9d2933", // 胭脂
|
|
130240
|
-
"#0288c5", // 浅靛青蓝
|
|
130241
|
-
"#44cef6" // 天蓝色
|
|
130242
|
-
],
|
|
130243
|
-
backgroundColor: "#ffffff",
|
|
130244
|
-
textStyle: {
|
|
130245
|
-
fontFamily: "Microsoft YaHei, sans-serif"
|
|
130246
|
-
},
|
|
130247
|
-
title: {
|
|
130248
|
-
textStyle: {
|
|
130249
|
-
color: "#333"
|
|
130250
|
-
},
|
|
130251
|
-
subtextStyle: {
|
|
130252
|
-
color: "#666666"
|
|
130253
|
-
}
|
|
130254
|
-
},
|
|
130255
|
-
line: {
|
|
130256
|
-
itemStyle: {
|
|
130257
|
-
},
|
|
130258
|
-
lineStyle: {
|
|
130259
|
-
width: 2
|
|
130260
|
-
}
|
|
130261
|
-
},
|
|
130262
|
-
bar: {
|
|
130263
|
-
itemStyle: {
|
|
130264
|
-
borderRadius: 4
|
|
130265
|
-
}
|
|
130266
|
-
},
|
|
130267
|
-
pie: {
|
|
130268
|
-
roseType: "radius",
|
|
130269
|
-
label: {
|
|
130270
|
-
color: "#333"
|
|
130271
|
-
}
|
|
130272
|
-
},
|
|
130273
|
-
radar: {
|
|
130274
|
-
indicator: {
|
|
130275
|
-
color: "#666666"
|
|
130276
|
-
}
|
|
130277
|
-
},
|
|
130278
|
-
map: {
|
|
130279
|
-
label: {
|
|
130280
|
-
color: "#333"
|
|
130281
|
-
},
|
|
130282
|
-
itemStyle: {
|
|
130283
|
-
borderColor: "#fff"
|
|
130284
|
-
}
|
|
130285
|
-
},
|
|
130286
|
-
gauge: {
|
|
130287
|
-
axisLine: {
|
|
130288
|
-
lineStyle: {
|
|
130289
|
-
color: [[1, "#5470c6"]]
|
|
130290
|
-
}
|
|
130291
|
-
}
|
|
130292
|
-
},
|
|
130293
|
-
toolbox: {
|
|
130294
|
-
iconStyle: {
|
|
130295
|
-
borderColor: "#666666"
|
|
130296
|
-
}
|
|
130297
|
-
},
|
|
130298
|
-
axisLine: {
|
|
130299
|
-
lineStyle: {
|
|
130300
|
-
color: "#DCDFE6"
|
|
130301
|
-
}
|
|
130302
|
-
},
|
|
130303
|
-
axisTick: {
|
|
130304
|
-
lineStyle: {
|
|
130305
|
-
color: "#DCDFE6"
|
|
130306
|
-
}
|
|
130307
|
-
},
|
|
130308
|
-
splitLine: {
|
|
130309
|
-
lineStyle: {
|
|
130310
|
-
color: "#ebeef5"
|
|
130311
|
-
}
|
|
130312
|
-
},
|
|
130313
|
-
splitArea: {
|
|
130314
|
-
areaStyle: {
|
|
130315
|
-
color: ["#f7f8fa", "#ffffff"]
|
|
130316
|
-
}
|
|
130317
|
-
},
|
|
130318
|
-
legend: {
|
|
130319
|
-
textStyle: {
|
|
130320
|
-
color: "#666"
|
|
130321
|
-
}
|
|
130322
|
-
},
|
|
130323
|
-
tooltip: {
|
|
130324
|
-
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
130325
|
-
borderColor: "#DCDFE6",
|
|
130326
|
-
borderWidth: 1,
|
|
130327
|
-
textStyle: {
|
|
130328
|
-
color: "#333"
|
|
130329
|
-
}
|
|
130330
|
-
}
|
|
130331
|
-
});
|
|
130332
|
-
|
|
130333
|
-
// CONCATENATED MODULE: ./src/components/ex-chart/theme/orange.js
|
|
130334
|
-
/* harmony default export */ var orange = ({
|
|
130335
|
-
color: ["#e69419", "#A5b4da", "#F8792C", "#97bfb4", "#de747b", "#d6bac0", "#e62737", "#f35969", "#f1ccb0", "#b7394e", "#fe9c1c2"],
|
|
130336
|
-
backgroundColor: "#ffffff",
|
|
130337
|
-
textStyle: {
|
|
130338
|
-
fontFamily: "Microsoft YaHei, sans-serif"
|
|
130339
|
-
},
|
|
130340
|
-
title: {
|
|
130341
|
-
textStyle: {
|
|
130342
|
-
color: "#333"
|
|
130343
|
-
},
|
|
130344
|
-
subtextStyle: {
|
|
130345
|
-
color: "#666666"
|
|
130346
|
-
}
|
|
130347
|
-
},
|
|
130348
|
-
line: {
|
|
130349
|
-
itemStyle: {
|
|
130350
|
-
color: "#e69419"
|
|
130351
|
-
},
|
|
130352
|
-
lineStyle: {
|
|
130353
|
-
width: 2
|
|
130354
|
-
}
|
|
130355
|
-
},
|
|
130356
|
-
bar: {
|
|
130357
|
-
itemStyle: {
|
|
130358
|
-
borderRadius: 4
|
|
130359
|
-
}
|
|
130360
|
-
},
|
|
130361
|
-
pie: {
|
|
130362
|
-
roseType: "radius",
|
|
130363
|
-
label: {
|
|
130364
|
-
color: "#333"
|
|
130365
|
-
}
|
|
130366
|
-
},
|
|
130367
|
-
radar: {
|
|
130368
|
-
indicator: {
|
|
130369
|
-
color: "#666666"
|
|
130370
|
-
}
|
|
130371
|
-
},
|
|
130372
|
-
map: {
|
|
130373
|
-
label: {
|
|
130374
|
-
color: "#333"
|
|
130375
|
-
},
|
|
130376
|
-
itemStyle: {
|
|
130377
|
-
borderColor: "#fff"
|
|
130378
|
-
}
|
|
130379
|
-
},
|
|
130380
|
-
gauge: {
|
|
130381
|
-
axisLine: {
|
|
130382
|
-
lineStyle: {
|
|
130383
|
-
color: [[1, "#5470c6"]]
|
|
130384
|
-
}
|
|
130385
|
-
}
|
|
130386
|
-
},
|
|
130387
|
-
toolbox: {
|
|
130388
|
-
iconStyle: {
|
|
130389
|
-
borderColor: "#666666"
|
|
130390
|
-
}
|
|
130391
|
-
},
|
|
130392
|
-
axisLine: {
|
|
130393
|
-
lineStyle: {
|
|
130394
|
-
color: "#DCDFE6"
|
|
130395
|
-
}
|
|
130396
|
-
},
|
|
130397
|
-
axisTick: {
|
|
130398
|
-
lineStyle: {
|
|
130399
|
-
color: "#DCDFE6"
|
|
130400
|
-
}
|
|
130401
|
-
},
|
|
130402
|
-
splitLine: {
|
|
130403
|
-
lineStyle: {
|
|
130404
|
-
color: "#ebeef5"
|
|
130405
|
-
}
|
|
130406
|
-
},
|
|
130407
|
-
splitArea: {
|
|
130408
|
-
areaStyle: {
|
|
130409
|
-
color: ["#f7f8fa", "#ffffff"]
|
|
130410
|
-
}
|
|
130411
|
-
},
|
|
130412
|
-
legend: {
|
|
130413
|
-
textStyle: {
|
|
130414
|
-
color: "#666"
|
|
130415
|
-
}
|
|
130416
|
-
},
|
|
130417
|
-
tooltip: {
|
|
130418
|
-
backgroundColor: "rgba(255, 255, 255, 0.95)",
|
|
130419
|
-
borderColor: "#DCDFE6",
|
|
130420
|
-
borderWidth: 1,
|
|
130421
|
-
textStyle: {
|
|
130422
|
-
color: "#333"
|
|
130423
|
-
}
|
|
130424
|
-
}
|
|
130425
|
-
});
|
|
130426
|
-
|
|
130427
|
-
// CONCATENATED MODULE: ./src/components/ex-chart/utils.js
|
|
130428
|
-
|
|
130429
|
-
|
|
130430
|
-
|
|
130431
|
-
|
|
130432
|
-
|
|
130433
|
-
|
|
130434
|
-
const themeKeys = {
|
|
130435
|
-
"default": white,
|
|
130436
|
-
"white": white,
|
|
130437
|
-
"dark": dark,
|
|
130438
|
-
"blue": blue,
|
|
130439
|
-
"starry": starry,
|
|
130440
|
-
"orange": orange
|
|
130441
|
-
};
|
|
130442
|
-
|
|
130443
|
-
// echarts 仅在客户端加载,避免 SSR 编译/渲染报错
|
|
130444
|
-
let echarts = null;
|
|
130445
|
-
|
|
130446
|
-
function getEcharts() {
|
|
130447
|
-
if (!echarts && typeof window !== 'undefined') {
|
|
130448
|
-
try {
|
|
130449
|
-
echarts = __webpack_require__("313e");
|
|
130450
|
-
// 注册所有主题
|
|
130451
|
-
for (const key in themeKeys) {
|
|
130452
|
-
echarts.registerTheme(key, themeKeys[key]);
|
|
130453
|
-
}
|
|
130454
|
-
} catch (e) {
|
|
130455
|
-
console.warn('[ExChart] echarts 加载失败:', e.message);
|
|
130456
|
-
}
|
|
130457
|
-
}
|
|
130458
|
-
return echarts;
|
|
130459
|
-
}
|
|
130460
|
-
|
|
130461
|
-
// 字体大小配置
|
|
130462
|
-
const fontSizeMap = {
|
|
130463
|
-
small: {
|
|
130464
|
-
title: 14,
|
|
130465
|
-
subtitle: 11,
|
|
130466
|
-
legend: 11,
|
|
130467
|
-
axisLabel: 10,
|
|
130468
|
-
tooltip: 11,
|
|
130469
|
-
label: 11
|
|
130470
|
-
},
|
|
130471
|
-
medium: {
|
|
130472
|
-
title: 16,
|
|
130473
|
-
subtitle: 12,
|
|
130474
|
-
legend: 12,
|
|
130475
|
-
axisLabel: 12,
|
|
130476
|
-
tooltip: 12,
|
|
130477
|
-
label: 12
|
|
130478
|
-
},
|
|
130479
|
-
large: {
|
|
130480
|
-
title: 18,
|
|
130481
|
-
subtitle: 14,
|
|
130482
|
-
legend: 14,
|
|
130483
|
-
axisLabel: 14,
|
|
130484
|
-
tooltip: 14,
|
|
130485
|
-
label: 14
|
|
130486
|
-
}
|
|
130487
|
-
};
|
|
130488
|
-
|
|
130489
|
-
function EchartsUtil() {}
|
|
130490
|
-
|
|
130491
|
-
EchartsUtil.currentTheme = "default";
|
|
130492
|
-
EchartsUtil.currentSize = "medium";
|
|
130493
|
-
EchartsUtil.inverse = false;
|
|
130494
|
-
|
|
130495
|
-
EchartsUtil.baseOption = {
|
|
130496
|
-
backgroundColor: "transparent",
|
|
130497
|
-
tooltip: {
|
|
130498
|
-
trigger: "axis",
|
|
130499
|
-
borderWidth: 1
|
|
130500
|
-
},
|
|
130501
|
-
legend: {
|
|
130502
|
-
right: 20,
|
|
130503
|
-
top: 0,
|
|
130504
|
-
show: true,
|
|
130505
|
-
textStyle: {
|
|
130506
|
-
fontSize: 12
|
|
130507
|
-
}
|
|
130508
|
-
},
|
|
130509
|
-
grid: {
|
|
130510
|
-
top: "25%",
|
|
130511
|
-
left: "40",
|
|
130512
|
-
right: "15",
|
|
130513
|
-
bottom: "40"
|
|
130514
|
-
},
|
|
130515
|
-
xAxis: {
|
|
130516
|
-
type: "category",
|
|
130517
|
-
boundaryGap: false,
|
|
130518
|
-
axisTick: {
|
|
130519
|
-
show: true,
|
|
130520
|
-
length: 4
|
|
130521
|
-
},
|
|
130522
|
-
axisLabel: {
|
|
130523
|
-
fontSize: 12,
|
|
130524
|
-
interval: 0,
|
|
130525
|
-
formatter: function(value) {
|
|
130526
|
-
return !this.reverse && this.longLable ? value.replace(new RegExp(`(.{${this.longLableSplitNum}})`, "g"), `$1\n`) : value;
|
|
130527
|
-
}
|
|
130528
|
-
}
|
|
130529
|
-
},
|
|
130530
|
-
yAxis: {
|
|
130531
|
-
type: "value",
|
|
130532
|
-
axisTick: {
|
|
130533
|
-
show: false
|
|
130534
|
-
},
|
|
130535
|
-
min: null,
|
|
130536
|
-
max: null,
|
|
130537
|
-
axisLabel: {
|
|
130538
|
-
show: false
|
|
130539
|
-
},
|
|
130540
|
-
splitLine: {
|
|
130541
|
-
lineStyle: {
|
|
130542
|
-
type: "dashed",
|
|
130543
|
-
width: 1
|
|
130544
|
-
}
|
|
130545
|
-
}
|
|
130546
|
-
}
|
|
130547
|
-
};
|
|
130548
|
-
|
|
130549
|
-
EchartsUtil.chartInstanceList = [];
|
|
130550
|
-
|
|
130551
|
-
EchartsUtil.mergeOptions = function(themeOption, customOption) {
|
|
130552
|
-
return Object.assign({}, this.baseOption, themeOption, customOption);
|
|
130553
|
-
};
|
|
130554
|
-
|
|
130555
|
-
// 根据字体大小调整主题配置
|
|
130556
|
-
EchartsUtil.applyFontSize = function(themeOption, size) {
|
|
130557
|
-
const fontSizeConfig = fontSizeMap[size] || fontSizeMap.medium;
|
|
130558
|
-
|
|
130559
|
-
const result = JSON.parse(JSON.stringify(themeOption));
|
|
130560
|
-
|
|
130561
|
-
// 调整标题字体大小
|
|
130562
|
-
if (result.title && result.title.textStyle) {
|
|
130563
|
-
result.title.textStyle.fontSize = fontSizeConfig.title;
|
|
130564
|
-
}
|
|
130565
|
-
if (result.title && result.title.subtextStyle) {
|
|
130566
|
-
result.title.subtextStyle.fontSize = fontSizeConfig.subtitle;
|
|
130567
|
-
}
|
|
130568
|
-
|
|
130569
|
-
// 调整图例字体大小
|
|
130570
|
-
if (result.legend && result.legend.textStyle) {
|
|
130571
|
-
result.legend.textStyle.fontSize = fontSizeConfig.legend;
|
|
130572
|
-
}
|
|
130573
|
-
|
|
130574
|
-
// 调整提示框字体大小
|
|
130575
|
-
if (result.tooltip && result.tooltip.textStyle) {
|
|
130576
|
-
result.tooltip.textStyle.fontSize = fontSizeConfig.tooltip;
|
|
130577
|
-
}
|
|
130578
|
-
|
|
130579
|
-
// 调整饼图标签字体大小
|
|
130580
|
-
if (result.pie && result.pie.label) {
|
|
130581
|
-
if (typeof result.pie.label === 'object') {
|
|
130582
|
-
result.pie.label.fontSize = fontSizeConfig.label;
|
|
130583
|
-
}
|
|
130584
|
-
}
|
|
130585
|
-
|
|
130586
|
-
// 调整雷达图指示器字体大小
|
|
130587
|
-
if (result.radar && result.radar.indicator) {
|
|
130588
|
-
if (typeof result.radar.indicator === 'object' && result.radar.indicator.textStyle) {
|
|
130589
|
-
result.radar.indicator.textStyle.fontSize = fontSizeConfig.label;
|
|
130590
|
-
}
|
|
130591
|
-
}
|
|
130592
|
-
|
|
130593
|
-
// 调整地图标签字体大小
|
|
130594
|
-
if (result.map && result.map.label) {
|
|
130595
|
-
if (typeof result.map.label === 'object') {
|
|
130596
|
-
result.map.label.fontSize = fontSizeConfig.label;
|
|
130597
|
-
}
|
|
130598
|
-
}
|
|
130599
|
-
|
|
130600
|
-
return result;
|
|
130601
|
-
};
|
|
130602
|
-
|
|
130603
|
-
EchartsUtil.init = function(dom, theme, customOption, size) {
|
|
130604
|
-
const ec = getEcharts();
|
|
130605
|
-
// SSR 环境下忽略初始化
|
|
130606
|
-
if (!ec || !dom) return null;
|
|
130607
|
-
|
|
130608
|
-
theme = theme || "default";
|
|
130609
|
-
size = size || "medium";
|
|
130610
|
-
customOption = customOption || {};
|
|
130611
|
-
|
|
130612
|
-
const useTheme = this.currentTheme || theme;
|
|
130613
|
-
const useSize = this.currentSize || size;
|
|
130614
|
-
|
|
130615
|
-
this.currentTheme = useTheme;
|
|
130616
|
-
this.currentSize = useSize;
|
|
130617
|
-
|
|
130618
|
-
let themeOption = themeKeys[useTheme];
|
|
130619
|
-
// 应用字体大小配置
|
|
130620
|
-
themeOption = this.applyFontSize(themeOption, useSize);
|
|
130621
|
-
|
|
130622
|
-
const option = this.mergeOptions(themeOption, customOption);
|
|
130623
|
-
|
|
130624
|
-
const chart = ec.init(dom, useTheme);
|
|
130625
|
-
chart.setOption(option, true);
|
|
130626
|
-
|
|
130627
|
-
this.chartInstanceList.push({
|
|
130628
|
-
dom,
|
|
130629
|
-
chart,
|
|
130630
|
-
customOption,
|
|
130631
|
-
size: useSize
|
|
130632
|
-
});
|
|
130633
|
-
|
|
130634
|
-
this.bindResize(chart);
|
|
130635
|
-
return chart;
|
|
130636
|
-
};
|
|
130637
|
-
|
|
130638
|
-
EchartsUtil.changeSingleTheme = function(dom, chartIns, customOption, newTheme) {
|
|
130639
|
-
const ec = getEcharts();
|
|
130640
|
-
if (!ec || !dom || !chartIns) return;
|
|
130641
|
-
|
|
130642
|
-
customOption = customOption || {};
|
|
130643
|
-
newTheme = newTheme || "default";
|
|
130644
|
-
|
|
130645
|
-
this.currentTheme = newTheme;
|
|
130646
|
-
chartIns.dispose();
|
|
130647
|
-
|
|
130648
|
-
const newChart = ec.init(dom, newTheme, customOption);
|
|
130649
|
-
|
|
130650
|
-
const item = this.chartInstanceList.find(function(v) {
|
|
130651
|
-
return v.dom === dom;
|
|
130652
|
-
});
|
|
130653
|
-
|
|
130654
|
-
if (item) {
|
|
130655
|
-
item.chart = newChart;
|
|
130656
|
-
}
|
|
130657
|
-
|
|
130658
|
-
return newChart;
|
|
130659
|
-
};
|
|
130660
|
-
|
|
130661
|
-
EchartsUtil.changeAllTheme = function(newTheme, newSize) {
|
|
130662
|
-
const ec = getEcharts();
|
|
130663
|
-
if (!ec || !newTheme) return;
|
|
130664
|
-
|
|
130665
|
-
this.currentTheme = newTheme;
|
|
130666
|
-
// 如果传入了新的 size,则更新全局 size
|
|
130667
|
-
if (newSize) {
|
|
130668
|
-
this.currentSize = newSize;
|
|
130669
|
-
}
|
|
130670
|
-
|
|
130671
|
-
this.chartInstanceList.forEach(function(item) {
|
|
130672
|
-
const dom = item.dom;
|
|
130673
|
-
const chart = item.chart;
|
|
130674
|
-
const customOption = item.customOption;
|
|
130675
|
-
// 使用图表自己的 size,如果没有则使用全局 size
|
|
130676
|
-
const useSize = item.size || EchartsUtil.currentSize;
|
|
130677
|
-
|
|
130678
|
-
if (chart) {
|
|
130679
|
-
chart.dispose();
|
|
130680
|
-
}
|
|
130681
|
-
|
|
130682
|
-
const newChart = ec.init(dom, newTheme);
|
|
130683
|
-
let themeOption = themeKeys[newTheme];
|
|
130684
|
-
// 应用字体大小配置
|
|
130685
|
-
themeOption = EchartsUtil.applyFontSize(themeOption, useSize);
|
|
130686
|
-
const option = EchartsUtil.mergeOptions(themeOption, customOption);
|
|
130687
|
-
|
|
130688
|
-
newChart.setOption(option, true);
|
|
130689
|
-
item.chart = newChart;
|
|
130690
|
-
// 更新图表的 size 记录
|
|
130691
|
-
item.size = useSize;
|
|
130692
|
-
EchartsUtil.bindResize(newChart);
|
|
130693
|
-
});
|
|
130694
|
-
};
|
|
130695
|
-
|
|
130696
|
-
EchartsUtil.bindResize = function(chartIns) {
|
|
130697
|
-
if (!chartIns || chartIns.resizeLocked) return;
|
|
130698
|
-
|
|
130699
|
-
window.addEventListener("resize", function() {
|
|
130700
|
-
chartIns.resize();
|
|
130701
|
-
});
|
|
130702
|
-
|
|
130703
|
-
chartIns._resizeLocked = true;
|
|
130704
|
-
};
|
|
130705
|
-
|
|
130706
|
-
EchartsUtil.destroy = function(chartIns) {
|
|
130707
|
-
if (chartIns) {
|
|
130708
|
-
chartIns.dispose();
|
|
130709
|
-
}
|
|
130710
|
-
|
|
130711
|
-
this.chartInstanceList = this.chartInstanceList.filter(function(item) {
|
|
130712
|
-
return item.chart !== chartIns;
|
|
130713
|
-
});
|
|
130714
|
-
};
|
|
130715
|
-
|
|
130716
|
-
EchartsUtil.destroyAll = function() {
|
|
130717
|
-
this.chartInstanceList.forEach(function(item) {
|
|
130718
|
-
if (item.chart) {
|
|
130719
|
-
item.chart.dispose();
|
|
130720
|
-
}
|
|
130721
|
-
});
|
|
130722
|
-
|
|
130723
|
-
this.chartInstanceList = [];
|
|
130724
|
-
};
|
|
130725
|
-
|
|
130726
|
-
/* harmony default export */ var ex_chart_utils = (EchartsUtil);
|
|
130727
|
-
|
|
130728
|
-
|
|
130729
|
-
|
|
130730
130754
|
// 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/ex-chart/ExBar.vue?vue&type=script&lang=js
|
|
130731
130755
|
|
|
130732
130756
|
|
|
@@ -130919,7 +130943,7 @@ EchartsUtil.destroyAll = function() {
|
|
|
130919
130943
|
if (!this.markPoint) {
|
|
130920
130944
|
this.$delete(option.series[0], "markPoint");
|
|
130921
130945
|
}
|
|
130922
|
-
this.myChart =
|
|
130946
|
+
this.myChart = utils.init(_self.$refs.barchart, this.theme, option, this.size);
|
|
130923
130947
|
}
|
|
130924
130948
|
}
|
|
130925
130949
|
});
|
|
@@ -131093,7 +131117,7 @@ var ExLinevue_type_template_id_386a9c5d_scoped_true_staticRenderFns = []
|
|
|
131093
131117
|
}]
|
|
131094
131118
|
};
|
|
131095
131119
|
|
|
131096
|
-
this.myChart =
|
|
131120
|
+
this.myChart = utils.init(_self.$refs.linechart, this.theme, option, this.size);
|
|
131097
131121
|
}
|
|
131098
131122
|
}
|
|
131099
131123
|
});
|
|
@@ -131280,7 +131304,7 @@ var ExPievue_type_template_id_5100b648_scoped_true_staticRenderFns = []
|
|
|
131280
131304
|
})
|
|
131281
131305
|
}]
|
|
131282
131306
|
};
|
|
131283
|
-
this.myChart =
|
|
131307
|
+
this.myChart = utils.init(_self.$refs.piechart, this.theme, option, this.size);
|
|
131284
131308
|
}
|
|
131285
131309
|
}
|
|
131286
131310
|
});
|
|
@@ -131540,7 +131564,7 @@ var ExMultivue_type_template_id_18661424_scoped_true_staticRenderFns = []
|
|
|
131540
131564
|
],
|
|
131541
131565
|
series: this.getSeriesData()
|
|
131542
131566
|
};
|
|
131543
|
-
this.myChart =
|
|
131567
|
+
this.myChart = utils.init(_self.$refs.multilinechart, this.theme, option, this.size);
|
|
131544
131568
|
},
|
|
131545
131569
|
getSeriesData() {
|
|
131546
131570
|
// 创建 24小时 时间数据填充对象
|
|
@@ -131719,7 +131743,7 @@ var ExTrendvue_type_template_id_36cddc14_scoped_true_staticRenderFns = []
|
|
|
131719
131743
|
const _self = this;
|
|
131720
131744
|
// 数据处理
|
|
131721
131745
|
const option = this.getOption();
|
|
131722
|
-
this.myChart =
|
|
131746
|
+
this.myChart = utils.init(_self.$refs.barchart, this.theme, option, this.size);
|
|
131723
131747
|
}
|
|
131724
131748
|
}
|
|
131725
131749
|
});
|
|
@@ -132005,13 +132029,13 @@ ex_card.install = function (Vue) {
|
|
|
132005
132029
|
|
|
132006
132030
|
/* harmony default export */ var components_ex_card = (ex_card);
|
|
132007
132031
|
|
|
132008
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44e6dca7-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=
|
|
132009
|
-
var
|
|
132032
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44e6dca7-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=f6bc1634&scoped=true
|
|
132033
|
+
var ex_tablevue_type_template_id_f6bc1634_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.PageNum,"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()])
|
|
132010
132034
|
}
|
|
132011
|
-
var
|
|
132035
|
+
var ex_tablevue_type_template_id_f6bc1634_scoped_true_staticRenderFns = []
|
|
132012
132036
|
|
|
132013
132037
|
|
|
132014
|
-
// CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=template&id=
|
|
132038
|
+
// CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=template&id=f6bc1634&scoped=true
|
|
132015
132039
|
|
|
132016
132040
|
// 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/ex-table/ExTableCell.vue?vue&type=script&lang=js
|
|
132017
132041
|
|
|
@@ -132030,9 +132054,10 @@ var ex_tablevue_type_template_id_78d2b726_scoped_true_staticRenderFns = []
|
|
|
132030
132054
|
index: ctx.props.index
|
|
132031
132055
|
}
|
|
132032
132056
|
if (ctx.props.column) params.column = ctx.props.column
|
|
132033
|
-
const isVnode = (it) => typeof it === 'object' && it.hasOwnProperty('componentOptions')
|
|
132057
|
+
const isVnode = (it) => it !== null && it !== undefined && typeof it === 'object' && it.hasOwnProperty('componentOptions')
|
|
132034
132058
|
const renderNode = ctx.props.formatter(h, params)
|
|
132035
|
-
|
|
132059
|
+
if (renderNode === null || renderNode === undefined || renderNode === '') return h('span', '')
|
|
132060
|
+
return isVnode(renderNode) ? renderNode : h('span', String(renderNode))
|
|
132036
132061
|
}
|
|
132037
132062
|
});
|
|
132038
132063
|
|
|
@@ -132058,74 +132083,293 @@ var ExTableCell_component = normalizeComponent(
|
|
|
132058
132083
|
)
|
|
132059
132084
|
|
|
132060
132085
|
/* harmony default export */ var ExTableCell = (ExTableCell_component.exports);
|
|
132061
|
-
//
|
|
132062
|
-
var
|
|
132086
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44e6dca7-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
|
|
132087
|
+
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)
|
|
132088
|
+
}
|
|
132089
|
+
var VirtualElTablevue_type_template_id_5eb34e1c_scoped_true_staticRenderFns = []
|
|
132090
|
+
|
|
132091
|
+
|
|
132092
|
+
// CONCATENATED MODULE: ./src/components/ex-table/VirtualElTable.vue?vue&type=template&id=5eb34e1c&scoped=true
|
|
132093
|
+
|
|
132094
|
+
// 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/ex-table/VirtualElTable.vue?vue&type=script&lang=js
|
|
132095
|
+
|
|
132096
|
+
/* harmony default export */ var VirtualElTablevue_type_script_lang_js = ({
|
|
132097
|
+
name: 'VirtualElTable',
|
|
132098
|
+
inheritAttrs: false,
|
|
132099
|
+
|
|
132100
|
+
props: {
|
|
132101
|
+
virtualScroll: {
|
|
132102
|
+
type: Boolean,
|
|
132103
|
+
default: false
|
|
132104
|
+
},
|
|
132105
|
+
rowHeight: {
|
|
132106
|
+
type: Number,
|
|
132107
|
+
default: 48
|
|
132108
|
+
},
|
|
132109
|
+
bufferSize: {
|
|
132110
|
+
type: Number,
|
|
132111
|
+
default: 5
|
|
132112
|
+
}
|
|
132113
|
+
},
|
|
132114
|
+
|
|
132115
|
+
data() {
|
|
132116
|
+
return {
|
|
132117
|
+
scrollWrap: null,
|
|
132118
|
+
phantomDom: null,
|
|
132119
|
+
scrollTop: 0,
|
|
132120
|
+
// 根据数据量与容器高度预先估算一个合理的 endIndex,避免首屏只渲染 0 行
|
|
132121
|
+
startIndex: 0,
|
|
132122
|
+
endIndex: 20,
|
|
132123
|
+
rafId: null,
|
|
132124
|
+
unwatchPhantom: null,
|
|
132125
|
+
layoutTimer: null,
|
|
132126
|
+
retryTimers: []
|
|
132127
|
+
}
|
|
132128
|
+
},
|
|
132129
|
+
|
|
132130
|
+
computed: {
|
|
132131
|
+
originData() {
|
|
132132
|
+
return this.$attrs.data || []
|
|
132133
|
+
},
|
|
132134
|
+
renderList() {
|
|
132135
|
+
if (!this.virtualScroll) return this.originData
|
|
132136
|
+
const start = Math.max(0, this.startIndex - this.bufferSize)
|
|
132137
|
+
const end = Math.min(this.originData.length, this.endIndex + this.bufferSize)
|
|
132138
|
+
return this.originData.slice(start, end)
|
|
132139
|
+
},
|
|
132140
|
+
totalListHeight() {
|
|
132141
|
+
return this.originData.length * this.rowHeight
|
|
132142
|
+
},
|
|
132143
|
+
contentOffsetY() {
|
|
132144
|
+
return Math.max(0, this.startIndex - this.bufferSize) * this.rowHeight
|
|
132145
|
+
}
|
|
132146
|
+
},
|
|
132147
|
+
|
|
132148
|
+
watch: {
|
|
132149
|
+
renderList() {
|
|
132150
|
+
this.scheduleLayout()
|
|
132151
|
+
},
|
|
132152
|
+
originData: {
|
|
132153
|
+
handler(val) {
|
|
132154
|
+
if (!this.virtualScroll) return
|
|
132155
|
+
if (val && val.length) {
|
|
132156
|
+
this.$nextTick(() => {
|
|
132157
|
+
this.calcVisibleRange()
|
|
132158
|
+
})
|
|
132159
|
+
}
|
|
132160
|
+
}
|
|
132161
|
+
}
|
|
132162
|
+
},
|
|
132163
|
+
|
|
132164
|
+
mounted() {
|
|
132165
|
+
this.$nextTick(() => {
|
|
132166
|
+
this.initVirtualScroll()
|
|
132167
|
+
})
|
|
132168
|
+
},
|
|
132169
|
+
|
|
132170
|
+
beforeDestroy() {
|
|
132171
|
+
this.unbindScrollEvent()
|
|
132172
|
+
if (this.rafId) {
|
|
132173
|
+
cancelAnimationFrame(this.rafId)
|
|
132174
|
+
this.rafId = null
|
|
132175
|
+
}
|
|
132176
|
+
if (this.unwatchPhantom) {
|
|
132177
|
+
this.unwatchPhantom()
|
|
132178
|
+
this.unwatchPhantom = null
|
|
132179
|
+
}
|
|
132180
|
+
if (this.layoutTimer) {
|
|
132181
|
+
clearTimeout(this.layoutTimer)
|
|
132182
|
+
this.layoutTimer = null
|
|
132183
|
+
}
|
|
132184
|
+
this.retryTimers.forEach(t => clearTimeout(t))
|
|
132185
|
+
this.retryTimers = []
|
|
132186
|
+
},
|
|
132187
|
+
|
|
132188
|
+
methods: {
|
|
132189
|
+
initVirtualScroll() {
|
|
132190
|
+
if (!this.virtualScroll) return
|
|
132191
|
+
this.scrollWrap = this.$refs.innerTable.$el.querySelector('.el-table__body-wrapper')
|
|
132192
|
+
if (!this.scrollWrap) {
|
|
132193
|
+
console.warn('[VirtualElTable] 无法找到滚动容器,虚拟滚动功能已禁用')
|
|
132194
|
+
this.virtualScroll = false
|
|
132195
|
+
return
|
|
132196
|
+
}
|
|
132197
|
+
|
|
132198
|
+
this.scrollWrap.style.overflowY = 'auto'
|
|
132199
|
+
this.scrollWrap.style.overflowX = 'auto'
|
|
132200
|
+
|
|
132201
|
+
this.wrapTableBody()
|
|
132202
|
+
this.scrollWrap.addEventListener('scroll', this.onScroll, { passive: true })
|
|
132203
|
+
|
|
132204
|
+
// 首次可见范围计算 + 多次重试:
|
|
132205
|
+
// ElementUI 的 el-table 在 mounted 后仍会异步完成列宽/高度布局,
|
|
132206
|
+
// 单次 $nextTick 可能拿到 clientHeight=0,导致计算失败且无法恢复。
|
|
132207
|
+
// 以递增延迟多次调用,直到 scrollWrap.clientHeight 获得稳定值。
|
|
132208
|
+
this.calcVisibleRange()
|
|
132209
|
+
const delays = [100, 300, 600, 1000]
|
|
132210
|
+
delays.forEach(ms => {
|
|
132211
|
+
const timer = setTimeout(() => {
|
|
132212
|
+
this.calcVisibleRange()
|
|
132213
|
+
}, ms)
|
|
132214
|
+
this.retryTimers.push(timer)
|
|
132215
|
+
})
|
|
132216
|
+
},
|
|
132217
|
+
|
|
132218
|
+
wrapTableBody() {
|
|
132219
|
+
const bodyDom = this.scrollWrap.querySelector('.el-table__body')
|
|
132220
|
+
if (!bodyDom || bodyDom.querySelector('.vs-phantom')) return
|
|
132221
|
+
|
|
132222
|
+
// phantom 采用标准 block 布局:
|
|
132223
|
+
// - height = 总数据高度,确保撑开 body-wrapper 的滚动条
|
|
132224
|
+
// - padding-top = 可见区域偏移量,将 table 推到正确位置
|
|
132225
|
+
// - min-width: 100%(不设 width),允许 table 自然撑开,保证列宽生效
|
|
132226
|
+
const phantom = document.createElement('div')
|
|
132227
|
+
phantom.className = 'vs-phantom'
|
|
132228
|
+
phantom.style.position = 'relative'
|
|
132229
|
+
phantom.style.minWidth = '100%'
|
|
132230
|
+
phantom.style.boxSizing = 'border-box'
|
|
132231
|
+
phantom.style.zIndex = '1'
|
|
132232
|
+
this.phantomDom = phantom
|
|
132233
|
+
|
|
132234
|
+
const table = bodyDom.querySelector('table')
|
|
132235
|
+
phantom.appendChild(table)
|
|
132236
|
+
bodyDom.appendChild(phantom)
|
|
132237
|
+
|
|
132238
|
+
this.unwatchPhantom = this.$watch(
|
|
132239
|
+
['totalListHeight', 'contentOffsetY'],
|
|
132240
|
+
() => {
|
|
132241
|
+
if (this.phantomDom) {
|
|
132242
|
+
this.phantomDom.style.height = `${this.totalListHeight}px`
|
|
132243
|
+
this.phantomDom.style.paddingTop = `${this.contentOffsetY}px`
|
|
132244
|
+
}
|
|
132245
|
+
},
|
|
132246
|
+
{ immediate: true }
|
|
132247
|
+
)
|
|
132248
|
+
},
|
|
132249
|
+
|
|
132250
|
+
onScroll() {
|
|
132251
|
+
this.scrollTop = this.scrollWrap.scrollTop
|
|
132252
|
+
if (this.rafId) return
|
|
132253
|
+
this.rafId = requestAnimationFrame(() => {
|
|
132254
|
+
this.calcVisibleRange()
|
|
132255
|
+
this.rafId = null
|
|
132256
|
+
})
|
|
132257
|
+
},
|
|
132258
|
+
|
|
132259
|
+
calcVisibleRange() {
|
|
132260
|
+
if (!this.scrollWrap) return
|
|
132261
|
+
let viewHeight = this.scrollWrap.clientHeight
|
|
132262
|
+
|
|
132263
|
+
// 关键兜底:ElementUI 异步布局尚未完成时,clientHeight 可能为 0,
|
|
132264
|
+
// 此时用组件接收到的 height / max-height 作为估算值,确保至少能渲染正确数量的行。
|
|
132265
|
+
if (!viewHeight) {
|
|
132266
|
+
const h = this.$attrs.height || this.$attrs.maxHeight
|
|
132267
|
+
if (h) {
|
|
132268
|
+
viewHeight = typeof h === 'number' ? h : parseInt(String(h), 10)
|
|
132269
|
+
}
|
|
132270
|
+
}
|
|
132271
|
+
if (!viewHeight || viewHeight <= 0) return
|
|
132272
|
+
|
|
132273
|
+
const visibleRowCount = Math.ceil(viewHeight / this.rowHeight)
|
|
132274
|
+
const newStart = Math.floor(this.scrollTop / this.rowHeight)
|
|
132275
|
+
const newEnd = Math.min(this.originData.length, newStart + visibleRowCount)
|
|
132276
|
+
|
|
132277
|
+
if (newStart !== this.startIndex || newEnd !== this.endIndex) {
|
|
132278
|
+
this.startIndex = newStart
|
|
132279
|
+
this.endIndex = newEnd
|
|
132280
|
+
}
|
|
132281
|
+
},
|
|
132282
|
+
|
|
132283
|
+
unbindScrollEvent() {
|
|
132284
|
+
if (this.scrollWrap) {
|
|
132285
|
+
this.scrollWrap.removeEventListener('scroll', this.onScroll)
|
|
132286
|
+
}
|
|
132287
|
+
},
|
|
132288
|
+
|
|
132289
|
+
scheduleLayout() {
|
|
132290
|
+
if (this.layoutTimer) return
|
|
132291
|
+
this.layoutTimer = setTimeout(() => {
|
|
132292
|
+
if (this.$refs.innerTable) {
|
|
132293
|
+
this.$refs.innerTable.doLayout()
|
|
132294
|
+
}
|
|
132295
|
+
this.layoutTimer = null
|
|
132296
|
+
}, 0)
|
|
132297
|
+
},
|
|
132298
|
+
|
|
132299
|
+
clearSelection() {
|
|
132300
|
+
return this.$refs.innerTable.clearSelection()
|
|
132301
|
+
},
|
|
132302
|
+
toggleRowSelection() {
|
|
132303
|
+
return this.$refs.innerTable.toggleRowSelection()
|
|
132304
|
+
},
|
|
132305
|
+
doLayout() {
|
|
132306
|
+
return this.$refs.innerTable.doLayout()
|
|
132307
|
+
}
|
|
132308
|
+
}
|
|
132309
|
+
});
|
|
132310
|
+
|
|
132311
|
+
// CONCATENATED MODULE: ./src/components/ex-table/VirtualElTable.vue?vue&type=script&lang=js
|
|
132312
|
+
/* harmony default export */ var ex_table_VirtualElTablevue_type_script_lang_js = (VirtualElTablevue_type_script_lang_js);
|
|
132313
|
+
// EXTERNAL MODULE: ./src/components/ex-table/VirtualElTable.vue?vue&type=style&index=0&id=5eb34e1c&prod&scoped=true&lang=css
|
|
132314
|
+
var VirtualElTablevue_type_style_index_0_id_5eb34e1c_prod_scoped_true_lang_css = __webpack_require__("ac06");
|
|
132315
|
+
|
|
132316
|
+
// CONCATENATED MODULE: ./src/components/ex-table/VirtualElTable.vue
|
|
132317
|
+
|
|
132063
132318
|
|
|
132319
|
+
|
|
132320
|
+
|
|
132321
|
+
|
|
132322
|
+
|
|
132323
|
+
/* normalize component */
|
|
132324
|
+
|
|
132325
|
+
var VirtualElTable_component = normalizeComponent(
|
|
132326
|
+
ex_table_VirtualElTablevue_type_script_lang_js,
|
|
132327
|
+
VirtualElTablevue_type_template_id_5eb34e1c_scoped_true_render,
|
|
132328
|
+
VirtualElTablevue_type_template_id_5eb34e1c_scoped_true_staticRenderFns,
|
|
132329
|
+
false,
|
|
132330
|
+
null,
|
|
132331
|
+
"5eb34e1c",
|
|
132332
|
+
null
|
|
132333
|
+
|
|
132334
|
+
)
|
|
132335
|
+
|
|
132336
|
+
/* harmony default export */ var VirtualElTable = (VirtualElTable_component.exports);
|
|
132064
132337
|
// 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/ex-table/index.vue?vue&type=script&lang=js
|
|
132065
132338
|
|
|
132066
132339
|
|
|
132067
|
-
// 内部导入 element-ui 组件,避免与外部 element-ui 冲突
|
|
132068
132340
|
|
|
132069
132341
|
|
|
132070
132342
|
/* harmony default export */ var ex_tablevue_type_script_lang_js = ({
|
|
132071
132343
|
name: 'ExTable',
|
|
132072
132344
|
inheritAttrs: false,
|
|
132073
|
-
components: { ExTableCell: ExTableCell,
|
|
132345
|
+
components: { ExTableCell: ExTableCell, VirtualElTable: VirtualElTable },
|
|
132346
|
+
|
|
132074
132347
|
props: {
|
|
132075
|
-
// 表格数据
|
|
132076
132348
|
tableData: { type: Array, default: () => [] },
|
|
132077
|
-
// 列配置(支持 children 多级表头)
|
|
132078
132349
|
columns: { type: Array, default: () => [] },
|
|
132079
|
-
// 分组列配置(按配置的层级合并单元格)
|
|
132080
132350
|
groupColumns: { type: Array, default: () => [] },
|
|
132081
|
-
// 标题
|
|
132082
132351
|
title: { type: String, default: '' },
|
|
132083
|
-
// 高度
|
|
132084
132352
|
height: { type: [Number, String], default: null },
|
|
132085
|
-
// 最大高度(非虚拟滚动时与 height 二选一,均支持固定表头)
|
|
132086
132353
|
maxHeight: { type: [Number, String], default: null },
|
|
132087
|
-
// 虚拟滚动
|
|
132088
132354
|
virtualScroll: { type: Boolean, default: false },
|
|
132089
|
-
// 预估行高
|
|
132090
132355
|
rowInitHeight: { type: Number, default: 48 },
|
|
132091
|
-
// 缓冲区行数
|
|
132092
132356
|
bufferSize: { type: Number, default: 5 },
|
|
132093
|
-
// 分页配置
|
|
132094
132357
|
pagination: { type: Object, default: null },
|
|
132095
|
-
// 总条数
|
|
132096
132358
|
total: { type: Number, default: 0 },
|
|
132097
|
-
// 是否显示序号
|
|
132098
132359
|
showIndex: { type: Boolean, default: false },
|
|
132099
|
-
// 是否可选
|
|
132100
132360
|
selection: { type: Boolean, default: false },
|
|
132101
|
-
// 选择列固定位置
|
|
132102
132361
|
selectionFixed: { type: [String, Boolean], default: false },
|
|
132103
|
-
// 序号列固定位置
|
|
132104
132362
|
indexFixed: { type: [String, Boolean], default: false },
|
|
132105
|
-
// 加载状态
|
|
132106
132363
|
loading: { type: Boolean, default: false },
|
|
132107
|
-
// 空数据文案
|
|
132108
132364
|
emptyText: { type: String, default: '暂无数据' },
|
|
132109
|
-
// 小计配置
|
|
132110
132365
|
subtotalConfig: { type: Object, default: () => ({ enabled: false }) },
|
|
132111
|
-
// 总计配置
|
|
132112
132366
|
totalConfig: { type: Object, default: () => ({ enabled: false }) }
|
|
132113
132367
|
},
|
|
132114
132368
|
|
|
132115
132369
|
data() {
|
|
132116
132370
|
return {
|
|
132117
|
-
// 虚拟滚动相关
|
|
132118
|
-
scrollTop: 0,
|
|
132119
|
-
scrollLeft: 0,
|
|
132120
|
-
rowHeight: 48,
|
|
132121
|
-
visibleStartIndex: 0,
|
|
132122
|
-
visibleEndIndex: 0,
|
|
132123
|
-
visibleCount: 0,
|
|
132124
|
-
// 分组合并缓存
|
|
132125
132371
|
spanCache: {},
|
|
132126
|
-
// 列扁平化缓存
|
|
132127
132372
|
flattenedColumnsCache: [],
|
|
132128
|
-
// 选中数据
|
|
132129
132373
|
selectedRows: []
|
|
132130
132374
|
}
|
|
132131
132375
|
},
|
|
@@ -132134,75 +132378,44 @@ var external_ElementUI_ = __webpack_require__("5f72");
|
|
|
132134
132378
|
showPagination() {
|
|
132135
132379
|
return this.pagination && this.total > 0
|
|
132136
132380
|
},
|
|
132137
|
-
|
|
132138
132381
|
computedHeight() {
|
|
132139
|
-
if (this.virtualScroll) {
|
|
132140
|
-
return this.height || this.maxHeight || 400
|
|
132141
|
-
}
|
|
132142
132382
|
return this.height || undefined
|
|
132143
132383
|
},
|
|
132144
|
-
|
|
132145
132384
|
computedMaxHeight() {
|
|
132146
|
-
|
|
132147
|
-
return this.maxHeight || undefined
|
|
132148
|
-
},
|
|
132149
|
-
|
|
132150
|
-
// 虚拟滚动固定表头占位数据(仅渲染表头,不渲染 body 行)
|
|
132151
|
-
headerTableData() {
|
|
132152
|
-
return []
|
|
132385
|
+
return this.height ? undefined : this.maxHeight || undefined
|
|
132153
132386
|
},
|
|
132154
132387
|
|
|
132155
|
-
//
|
|
132388
|
+
// 处理小计、总计后的最终数据
|
|
132156
132389
|
processedTableData() {
|
|
132157
132390
|
if (!this.tableData.length) return []
|
|
132158
|
-
|
|
132159
132391
|
let data = [...this.tableData]
|
|
132160
132392
|
const hasSubtotal = this.subtotalConfig && this.subtotalConfig.enabled
|
|
132161
132393
|
const hasTotal = this.totalConfig && this.totalConfig.enabled
|
|
132162
132394
|
|
|
132163
132395
|
if (!hasSubtotal && !hasTotal) return data
|
|
132164
132396
|
|
|
132165
|
-
// 找到第一个数据列作为标签列
|
|
132166
132397
|
const labelColumn = this.findLabelColumn()
|
|
132167
|
-
|
|
132168
132398
|
let result = []
|
|
132169
132399
|
|
|
132170
132400
|
if (hasSubtotal && this.subtotalConfig.groupBy && this.subtotalConfig.groupBy.length) {
|
|
132171
|
-
// 按 groupBy 分组
|
|
132172
132401
|
const groups = this.groupData(data, this.subtotalConfig.groupBy)
|
|
132173
|
-
groups.forEach((groupRows
|
|
132174
|
-
// 插入数据行
|
|
132402
|
+
groups.forEach((groupRows) => {
|
|
132175
132403
|
result.push(...groupRows)
|
|
132176
|
-
|
|
132177
|
-
const subtotalRow = this.createSubtotalRow(groupRows, groupKey)
|
|
132404
|
+
const subtotalRow = this.createSubtotalRow(groupRows)
|
|
132178
132405
|
result.push(subtotalRow)
|
|
132179
132406
|
})
|
|
132180
132407
|
} else {
|
|
132181
132408
|
result = data
|
|
132182
132409
|
}
|
|
132183
132410
|
|
|
132184
|
-
// 插入总计行
|
|
132185
132411
|
if (hasTotal) {
|
|
132186
132412
|
const totalRow = this.createTotalRow(data)
|
|
132187
132413
|
result.push(totalRow)
|
|
132188
132414
|
}
|
|
132189
|
-
|
|
132190
132415
|
return result
|
|
132191
132416
|
},
|
|
132192
132417
|
|
|
132193
|
-
//
|
|
132194
|
-
virtualTotalHeight() {
|
|
132195
|
-
const data = this.processedTableData
|
|
132196
|
-
return data.length * this.rowHeight
|
|
132197
|
-
},
|
|
132198
|
-
|
|
132199
|
-
// 虚拟滚动偏移量
|
|
132200
|
-
virtualOffsetY() {
|
|
132201
|
-
const start = Math.max(0, this.visibleStartIndex - this.bufferSize)
|
|
132202
|
-
return start * this.rowHeight
|
|
132203
|
-
},
|
|
132204
|
-
|
|
132205
|
-
// 扁平化列配置(为每级列补充 _key)
|
|
132418
|
+
// 扁平化列配置,添加唯一 key
|
|
132206
132419
|
flattenedColumns() {
|
|
132207
132420
|
if (this.flattenedColumnsCache.length) return this.flattenedColumnsCache
|
|
132208
132421
|
const assignKeys = (cols, parentPath = '') => {
|
|
@@ -132218,91 +132431,47 @@ var external_ElementUI_ = __webpack_require__("5f72");
|
|
|
132218
132431
|
}
|
|
132219
132432
|
this.flattenedColumnsCache = assignKeys(this.columns)
|
|
132220
132433
|
return this.flattenedColumnsCache
|
|
132221
|
-
},
|
|
132222
|
-
|
|
132223
|
-
// 虚拟滚动时的可见数据(附带 _realIndex 供序号列使用)
|
|
132224
|
-
visibleData() {
|
|
132225
|
-
const data = this.processedTableData
|
|
132226
|
-
if (!this.virtualScroll || data.length === 0) {
|
|
132227
|
-
return data
|
|
132228
|
-
}
|
|
132229
|
-
const start = Math.max(0, this.visibleStartIndex - this.bufferSize)
|
|
132230
|
-
const end = Math.min(data.length, this.visibleEndIndex + this.bufferSize)
|
|
132231
|
-
return data.slice(start, end).map((row, i) => ({
|
|
132232
|
-
...row,
|
|
132233
|
-
_realIndex: start + i
|
|
132234
|
-
}))
|
|
132235
132434
|
}
|
|
132236
132435
|
},
|
|
132237
132436
|
|
|
132238
132437
|
watch: {
|
|
132239
|
-
tableData
|
|
132240
|
-
|
|
132241
|
-
|
|
132242
|
-
this.flattenedColumnsCache = []
|
|
132243
|
-
if (this.virtualScroll) {
|
|
132244
|
-
this.$nextTick(() => {
|
|
132245
|
-
this.measureRowHeight()
|
|
132246
|
-
this.updateVisibleRange()
|
|
132247
|
-
this.syncTableLayout()
|
|
132248
|
-
})
|
|
132249
|
-
}
|
|
132250
|
-
},
|
|
132251
|
-
immediate: false
|
|
132438
|
+
tableData() {
|
|
132439
|
+
this.spanCache = {}
|
|
132440
|
+
this.flattenedColumnsCache = []
|
|
132252
132441
|
},
|
|
132253
|
-
|
|
132254
132442
|
columns: {
|
|
132255
132443
|
handler() {
|
|
132256
132444
|
this.flattenedColumnsCache = []
|
|
132257
|
-
|
|
132258
|
-
this.$nextTick(() => this.syncTableLayout())
|
|
132259
|
-
}
|
|
132445
|
+
this.spanCache = {}
|
|
132260
132446
|
},
|
|
132261
132447
|
deep: true
|
|
132262
132448
|
},
|
|
132263
|
-
|
|
132264
|
-
|
|
132265
|
-
|
|
132266
|
-
|
|
132267
|
-
|
|
132268
|
-
},
|
|
132269
|
-
|
|
132270
|
-
maxHeight() {
|
|
132271
|
-
if (this.virtualScroll) {
|
|
132272
|
-
this.$nextTick(() => this.syncTableLayout())
|
|
132273
|
-
}
|
|
132274
|
-
},
|
|
132275
|
-
|
|
132276
|
-
virtualScroll(val) {
|
|
132277
|
-
if (val) {
|
|
132278
|
-
this.$nextTick(() => this.initVirtualScroll())
|
|
132279
|
-
} else {
|
|
132280
|
-
this.destroyVirtualScroll()
|
|
132281
|
-
}
|
|
132449
|
+
groupColumns: {
|
|
132450
|
+
handler() {
|
|
132451
|
+
this.spanCache = {}
|
|
132452
|
+
},
|
|
132453
|
+
deep: true
|
|
132282
132454
|
}
|
|
132283
132455
|
},
|
|
132284
132456
|
|
|
132285
132457
|
mounted() {
|
|
132286
|
-
|
|
132287
|
-
|
|
132288
|
-
}
|
|
132289
|
-
// 监听窗口resize,更新表格宽度
|
|
132290
|
-
this.resizeHandler = () => {
|
|
132291
|
-
if (this.virtualScroll) {
|
|
132292
|
-
this.$nextTick(() => this.syncTableLayout())
|
|
132293
|
-
}
|
|
132294
|
-
}
|
|
132295
|
-
window.addEventListener('resize', this.resizeHandler)
|
|
132458
|
+
this.$nextTick(() => {
|
|
132459
|
+
window.addEventListener('resize', this.handleResize)
|
|
132460
|
+
})
|
|
132296
132461
|
},
|
|
132297
132462
|
|
|
132298
132463
|
beforeDestroy() {
|
|
132299
|
-
this.
|
|
132300
|
-
window.removeEventListener('resize', this.resizeHandler)
|
|
132464
|
+
window.removeEventListener('resize', this.handleResize)
|
|
132301
132465
|
},
|
|
132302
132466
|
|
|
132303
132467
|
methods: {
|
|
132304
|
-
|
|
132305
|
-
|
|
132468
|
+
handleResize() {
|
|
132469
|
+
this.$nextTick(() => {
|
|
132470
|
+
this.$refs.table && this.$refs.table.doLayout()
|
|
132471
|
+
})
|
|
132472
|
+
},
|
|
132473
|
+
|
|
132474
|
+
// ========== 小计 / 总计 相关 ==========
|
|
132306
132475
|
findLabelColumn() {
|
|
132307
132476
|
for (const col of this.columns) {
|
|
132308
132477
|
if (col.children && col.children.length) {
|
|
@@ -132316,33 +132485,25 @@ var external_ElementUI_ = __webpack_require__("5f72");
|
|
|
132316
132485
|
return { prop: '', label: '' }
|
|
132317
132486
|
},
|
|
132318
132487
|
|
|
132319
|
-
// 按指定字段分组(保持分组顺序)
|
|
132320
132488
|
groupData(data, groupBy) {
|
|
132321
132489
|
const map = new Map()
|
|
132322
132490
|
data.forEach(row => {
|
|
132323
132491
|
const key = groupBy.map(f => row[f]).join('|||')
|
|
132324
|
-
if (!map.has(key))
|
|
132325
|
-
map.set(key, [])
|
|
132326
|
-
}
|
|
132492
|
+
if (!map.has(key)) map.set(key, [])
|
|
132327
132493
|
map.get(key).push(row)
|
|
132328
132494
|
})
|
|
132329
132495
|
return map
|
|
132330
132496
|
},
|
|
132331
132497
|
|
|
132332
|
-
// 计算单列的聚合值
|
|
132333
132498
|
_calcValue(rows, calc) {
|
|
132334
|
-
// 自定义函数
|
|
132335
132499
|
if (typeof calc === 'function') return calc(rows)
|
|
132336
|
-
|
|
132337
|
-
// 字符串:'sum' | 'avg' | 'count' | 'min' | 'max'(需配合 prop 使用)
|
|
132338
|
-
|
|
132339
|
-
// 对象:{ prop: 'field', type: 'sum' } 或 { prop: 'field' } (默认 sum)
|
|
132340
132500
|
const prop = calc.prop
|
|
132341
132501
|
const type = calc.type || 'sum'
|
|
132342
132502
|
const vals = prop ? rows.map(r => parseFloat(r[prop]) || 0) : []
|
|
132343
132503
|
switch (type) {
|
|
132344
132504
|
case 'sum': return vals.reduce((s, v) => s + v, 0)
|
|
132345
|
-
case 'avg':
|
|
132505
|
+
case 'avg':
|
|
132506
|
+
case 'average': return vals.length ? vals.reduce((s, v) => s + v, 0) / vals.length : 0
|
|
132346
132507
|
case 'count': return rows.length
|
|
132347
132508
|
case 'min': return vals.length ? Math.min(...vals) : 0
|
|
132348
132509
|
case 'max': return vals.length ? Math.max(...vals) : 0
|
|
@@ -132350,20 +132511,16 @@ var external_ElementUI_ = __webpack_require__("5f72");
|
|
|
132350
132511
|
}
|
|
132351
132512
|
},
|
|
132352
132513
|
|
|
132353
|
-
|
|
132354
|
-
createSubtotalRow(groupRows, groupKey) {
|
|
132514
|
+
createSubtotalRow(groupRows) {
|
|
132355
132515
|
const config = this.subtotalConfig
|
|
132356
132516
|
const rawLabelProp = this.findLabelColumn()
|
|
132357
|
-
|
|
132358
|
-
// 获取第一个 groupBy 列的值显示
|
|
132359
132517
|
const labelField = config.groupBy ? config.groupBy[0] : ''
|
|
132360
|
-
const groupValue = groupRows[0] ? groupRows[0][labelField] :
|
|
132518
|
+
const groupValue = groupRows[0] ? groupRows[0][labelField] : ''
|
|
132361
132519
|
const labelText = config.labelText || `${groupValue} 小计`
|
|
132362
132520
|
|
|
132363
|
-
const row = { _rowType: 'subtotal'
|
|
132521
|
+
const row = { _rowType: 'subtotal' }
|
|
132364
132522
|
row[rawLabelProp.prop] = labelText
|
|
132365
132523
|
|
|
132366
|
-
// 计算各列的聚合值
|
|
132367
132524
|
if (config.columns) {
|
|
132368
132525
|
Object.keys(config.columns).forEach(prop => {
|
|
132369
132526
|
const calc = config.columns[prop]
|
|
@@ -132372,11 +132529,9 @@ var external_ElementUI_ = __webpack_require__("5f72");
|
|
|
132372
132529
|
: this._calcValue(groupRows, calc)
|
|
132373
132530
|
})
|
|
132374
132531
|
}
|
|
132375
|
-
|
|
132376
132532
|
return row
|
|
132377
132533
|
},
|
|
132378
132534
|
|
|
132379
|
-
// 创建总计行
|
|
132380
132535
|
createTotalRow(allRows) {
|
|
132381
132536
|
const config = this.totalConfig
|
|
132382
132537
|
const rawLabelProp = this.findLabelColumn()
|
|
@@ -132385,7 +132540,6 @@ var external_ElementUI_ = __webpack_require__("5f72");
|
|
|
132385
132540
|
const row = { _rowType: 'total' }
|
|
132386
132541
|
row[rawLabelProp.prop] = labelText
|
|
132387
132542
|
|
|
132388
|
-
// 计算各列的聚合值
|
|
132389
132543
|
if (config.columns) {
|
|
132390
132544
|
Object.keys(config.columns).forEach(prop => {
|
|
132391
132545
|
const calc = config.columns[prop]
|
|
@@ -132394,55 +132548,40 @@ var external_ElementUI_ = __webpack_require__("5f72");
|
|
|
132394
132548
|
: this._calcValue(allRows, calc)
|
|
132395
132549
|
})
|
|
132396
132550
|
}
|
|
132397
|
-
|
|
132398
132551
|
return row
|
|
132399
132552
|
},
|
|
132400
132553
|
|
|
132401
|
-
// 行类名(小计/总计行样式)
|
|
132402
132554
|
getRowClassName({ row }) {
|
|
132403
|
-
if (!row) return ''
|
|
132404
132555
|
if (row._rowType === 'subtotal') return 'ex-table-row-subtotal'
|
|
132405
132556
|
if (row._rowType === 'total') return 'ex-table-row-total'
|
|
132406
132557
|
return ''
|
|
132407
132558
|
},
|
|
132408
132559
|
|
|
132409
|
-
//
|
|
132560
|
+
// ========== 列处理 ==========
|
|
132410
132561
|
getColumnProps(col) {
|
|
132411
132562
|
const { _key, children, render, formatter, slot, ...props } = col
|
|
132412
132563
|
return props
|
|
132413
132564
|
},
|
|
132414
132565
|
|
|
132415
|
-
// ==================== 序号方法 ====================
|
|
132416
132566
|
indexMethod(index) {
|
|
132417
|
-
if (this.virtualScroll && this.visibleData.length > 0) {
|
|
132418
|
-
const row = this.visibleData[index]
|
|
132419
|
-
if (row && row._realIndex !== undefined) {
|
|
132420
|
-
return row._realIndex + 1
|
|
132421
|
-
}
|
|
132422
|
-
}
|
|
132423
132567
|
return index + 1
|
|
132424
132568
|
},
|
|
132425
132569
|
|
|
132426
|
-
//
|
|
132570
|
+
// ========== 合并单元格 ==========
|
|
132427
132571
|
handleSpanMethod({ row, column, rowIndex }) {
|
|
132428
|
-
// 跳过小计/总计行,不做合并
|
|
132429
132572
|
if (row._rowType === 'subtotal' || row._rowType === 'total') {
|
|
132430
132573
|
return { rowspan: 1, colspan: 1 }
|
|
132431
132574
|
}
|
|
132432
|
-
|
|
132433
132575
|
if (!this.groupColumns.length) return { rowspan: 1, colspan: 1 }
|
|
132434
132576
|
|
|
132435
|
-
const data = this.
|
|
132577
|
+
const data = this.processedTableData
|
|
132436
132578
|
const prop = column.property
|
|
132437
132579
|
const groupIndex = this.groupColumns.indexOf(prop)
|
|
132438
|
-
|
|
132439
132580
|
if (groupIndex === -1) return { rowspan: 1, colspan: 1 }
|
|
132440
132581
|
|
|
132441
|
-
// 检查缓存
|
|
132442
132582
|
const cacheKey = `${rowIndex}_${prop}`
|
|
132443
132583
|
if (this.spanCache[cacheKey]) return this.spanCache[cacheKey]
|
|
132444
132584
|
|
|
132445
|
-
// 判断当前行是否与前一行在分组列上完全相同
|
|
132446
132585
|
if (rowIndex > 0) {
|
|
132447
132586
|
const prevRow = data[rowIndex - 1]
|
|
132448
132587
|
let isSame = true
|
|
@@ -132454,156 +132593,74 @@ var external_ElementUI_ = __webpack_require__("5f72");
|
|
|
132454
132593
|
}
|
|
132455
132594
|
}
|
|
132456
132595
|
if (isSame) {
|
|
132457
|
-
const
|
|
132458
|
-
this.spanCache[cacheKey] =
|
|
132459
|
-
return
|
|
132596
|
+
const res = { rowspan: 0, colspan: 1 }
|
|
132597
|
+
this.spanCache[cacheKey] = res
|
|
132598
|
+
return res
|
|
132460
132599
|
}
|
|
132461
132600
|
}
|
|
132462
132601
|
|
|
132463
|
-
// 向下扫描计算合并行数
|
|
132464
132602
|
let count = 1
|
|
132465
132603
|
for (let i = rowIndex + 1; i < data.length; i++) {
|
|
132466
132604
|
const nextRow = data[i]
|
|
132467
|
-
let
|
|
132605
|
+
let same = true
|
|
132468
132606
|
for (let j = 0; j <= groupIndex; j++) {
|
|
132469
132607
|
const gp = this.groupColumns[j]
|
|
132470
132608
|
if (nextRow[gp] !== row[gp]) {
|
|
132471
|
-
|
|
132609
|
+
same = false
|
|
132472
132610
|
break
|
|
132473
132611
|
}
|
|
132474
132612
|
}
|
|
132475
|
-
if (
|
|
132476
|
-
|
|
132477
|
-
} else {
|
|
132478
|
-
break
|
|
132479
|
-
}
|
|
132613
|
+
if (same) count++
|
|
132614
|
+
else break
|
|
132480
132615
|
}
|
|
132481
132616
|
|
|
132482
|
-
const
|
|
132483
|
-
this.spanCache[cacheKey] =
|
|
132484
|
-
return
|
|
132617
|
+
const res = { rowspan: count > 1 ? count : 1, colspan: 1 }
|
|
132618
|
+
this.spanCache[cacheKey] = res
|
|
132619
|
+
return res
|
|
132485
132620
|
},
|
|
132486
132621
|
|
|
132487
|
-
//
|
|
132622
|
+
// ========== 选择、排序、分页 ==========
|
|
132488
132623
|
handleSelectionChange(rows) {
|
|
132489
|
-
// 过滤掉小计/总计行
|
|
132490
132624
|
this.selectedRows = rows.filter(r => !r._rowType)
|
|
132491
132625
|
this.$emit('selection-change', this.selectedRows)
|
|
132492
132626
|
},
|
|
132493
|
-
|
|
132494
|
-
|
|
132495
|
-
handleSortChange({ prop, order }) {
|
|
132496
|
-
this.$emit('sort-change', { prop, order })
|
|
132627
|
+
handleSortChange(info) {
|
|
132628
|
+
this.$emit('sort-change', info)
|
|
132497
132629
|
},
|
|
132498
|
-
|
|
132499
|
-
// ==================== 分页 ====================
|
|
132500
132630
|
handleSizeChange(size) {
|
|
132501
132631
|
this.$emit('size-change', size)
|
|
132502
132632
|
},
|
|
132503
|
-
|
|
132504
132633
|
handleCurrentChange(page) {
|
|
132505
132634
|
this.$emit('page-change', page)
|
|
132506
132635
|
},
|
|
132507
132636
|
|
|
132508
|
-
//
|
|
132637
|
+
// ========== 对外暴露方法 ==========
|
|
132509
132638
|
getSelection() {
|
|
132510
132639
|
return this.selectedRows
|
|
132511
132640
|
},
|
|
132512
|
-
|
|
132513
132641
|
clearSelection() {
|
|
132514
132642
|
this.$refs.table && this.$refs.table.clearSelection()
|
|
132515
132643
|
this.selectedRows = []
|
|
132516
132644
|
},
|
|
132517
|
-
|
|
132518
132645
|
toggleRowSelection(row, selected) {
|
|
132519
132646
|
this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
|
|
132520
132647
|
},
|
|
132521
|
-
|
|
132522
132648
|
toggleRowsSelection(rows, selected) {
|
|
132523
|
-
if (rows
|
|
132524
|
-
|
|
132525
|
-
|
|
132526
|
-
|
|
132527
|
-
}
|
|
132649
|
+
if (!rows || !rows.length) return
|
|
132650
|
+
rows.forEach(row => {
|
|
132651
|
+
this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
|
|
132652
|
+
})
|
|
132528
132653
|
},
|
|
132529
|
-
|
|
132530
132654
|
doLayout() {
|
|
132531
|
-
this.
|
|
132532
|
-
},
|
|
132533
|
-
|
|
132534
|
-
// ==================== 虚拟滚动固定表头 ====================
|
|
132535
|
-
syncTableLayout() {
|
|
132536
|
-
const bodyTable = this.$refs.table
|
|
132537
|
-
const headerTable = this.$refs.headerTable
|
|
132538
|
-
if (bodyTable) bodyTable.doLayout()
|
|
132539
|
-
if (headerTable) headerTable.doLayout()
|
|
132540
|
-
this.syncHeaderScroll(this.scrollLeft)
|
|
132541
|
-
},
|
|
132542
|
-
|
|
132543
|
-
syncHeaderScroll(scrollLeft) {
|
|
132544
|
-
const headerTable = this.$refs.headerTable
|
|
132545
|
-
if (!headerTable) return
|
|
132546
|
-
const headerWrapper = headerTable.$el.querySelector('.el-table__header-wrapper')
|
|
132547
|
-
if (headerWrapper) {
|
|
132548
|
-
headerWrapper.scrollLeft = scrollLeft
|
|
132549
|
-
}
|
|
132550
|
-
},
|
|
132551
|
-
|
|
132552
|
-
// ==================== 虚拟滚动 ====================
|
|
132553
|
-
initVirtualScroll() {
|
|
132554
|
-
this.rowHeight = this.rowInitHeight
|
|
132555
|
-
this.measureRowHeight()
|
|
132556
|
-
if (this.processedTableData.length > 0) {
|
|
132557
|
-
this.updateVisibleRange()
|
|
132558
|
-
}
|
|
132559
|
-
this.syncTableLayout()
|
|
132560
|
-
},
|
|
132561
|
-
|
|
132562
|
-
measureRowHeight() {
|
|
132563
|
-
const el = this.$refs.table && this.$refs.table.$el
|
|
132564
|
-
if (!el) return
|
|
132565
|
-
const row = el.querySelector('.el-table__row')
|
|
132566
|
-
if (row) {
|
|
132567
|
-
this.rowHeight = row.offsetHeight || this.rowInitHeight
|
|
132568
|
-
}
|
|
132569
|
-
},
|
|
132570
|
-
|
|
132571
|
-
handleBodyScroll(event) {
|
|
132572
|
-
const target = event.target
|
|
132573
|
-
this.scrollLeft = target.scrollLeft
|
|
132574
|
-
if (this.virtualScroll) {
|
|
132575
|
-
this.scrollTop = target.scrollTop
|
|
132576
|
-
this.updateVisibleRange()
|
|
132577
|
-
this.syncHeaderScroll(target.scrollLeft)
|
|
132578
|
-
}
|
|
132579
|
-
},
|
|
132580
|
-
|
|
132581
|
-
updateVisibleRange() {
|
|
132582
|
-
const totalCount = this.processedTableData.length
|
|
132583
|
-
if (totalCount === 0 || this.rowHeight === 0) return
|
|
132584
|
-
|
|
132585
|
-
const visibleCount = Math.ceil((this.computedHeight || 400) / this.rowHeight)
|
|
132586
|
-
|
|
132587
|
-
this.visibleStartIndex = Math.max(0, Math.floor(this.scrollTop / this.rowHeight))
|
|
132588
|
-
this.visibleEndIndex = Math.min(
|
|
132589
|
-
totalCount,
|
|
132590
|
-
this.visibleStartIndex + visibleCount
|
|
132591
|
-
)
|
|
132592
|
-
this.visibleCount = visibleCount
|
|
132593
|
-
},
|
|
132594
|
-
|
|
132595
|
-
destroyVirtualScroll() {
|
|
132596
|
-
this.scrollTop = 0
|
|
132597
|
-
this.visibleStartIndex = 0
|
|
132598
|
-
this.visibleEndIndex = 0
|
|
132655
|
+
this.$refs.table && this.$refs.table.doLayout()
|
|
132599
132656
|
}
|
|
132600
132657
|
}
|
|
132601
132658
|
});
|
|
132602
132659
|
|
|
132603
132660
|
// CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=script&lang=js
|
|
132604
132661
|
/* harmony default export */ var components_ex_tablevue_type_script_lang_js = (ex_tablevue_type_script_lang_js);
|
|
132605
|
-
// EXTERNAL MODULE: ./src/components/ex-table/index.vue?vue&type=style&index=0&id=
|
|
132606
|
-
var
|
|
132662
|
+
// EXTERNAL MODULE: ./src/components/ex-table/index.vue?vue&type=style&index=0&id=f6bc1634&prod&scoped=true&lang=css
|
|
132663
|
+
var ex_tablevue_type_style_index_0_id_f6bc1634_prod_scoped_true_lang_css = __webpack_require__("a0ef");
|
|
132607
132664
|
|
|
132608
132665
|
// CONCATENATED MODULE: ./src/components/ex-table/index.vue
|
|
132609
132666
|
|
|
@@ -132616,11 +132673,11 @@ var ex_tablevue_type_style_index_0_id_78d2b726_prod_scoped_true_lang_css = __web
|
|
|
132616
132673
|
|
|
132617
132674
|
var ex_table_component = normalizeComponent(
|
|
132618
132675
|
components_ex_tablevue_type_script_lang_js,
|
|
132619
|
-
|
|
132620
|
-
|
|
132676
|
+
ex_tablevue_type_template_id_f6bc1634_scoped_true_render,
|
|
132677
|
+
ex_tablevue_type_template_id_f6bc1634_scoped_true_staticRenderFns,
|
|
132621
132678
|
false,
|
|
132622
132679
|
null,
|
|
132623
|
-
"
|
|
132680
|
+
"f6bc1634",
|
|
132624
132681
|
null
|
|
132625
132682
|
|
|
132626
132683
|
)
|
|
@@ -132817,10 +132874,10 @@ const virtualScrollColumns = [
|
|
|
132817
132874
|
|
|
132818
132875
|
|
|
132819
132876
|
// ES Module 默认导出需要通过 .default 访问
|
|
132820
|
-
const
|
|
132877
|
+
const src_utils_0 = src_utils.default || src_utils
|
|
132821
132878
|
|
|
132822
132879
|
// 从 utils 导入配置管理函数(仅用于存储配置)
|
|
132823
|
-
const { getConfig: src_getConfig, setConfig: src_setConfig, getTheme: src_getTheme, getSize: src_getSize, getPrimaryColor: src_getPrimaryColor, resetConfig: src_resetConfig, onConfigChange: src_onConfigChange, setTheme: src_setTheme, setSize: src_setSize, setPrimaryColor: src_setPrimaryColor } =
|
|
132880
|
+
const { getConfig: src_getConfig, setConfig: src_setConfig, getTheme: src_getTheme, getSize: src_getSize, getPrimaryColor: src_getPrimaryColor, resetConfig: src_resetConfig, onConfigChange: src_onConfigChange, setTheme: src_setTheme, setSize: src_setSize, setPrimaryColor: src_setPrimaryColor } = src_utils_0
|
|
132824
132881
|
|
|
132825
132882
|
// 导入组件
|
|
132826
132883
|
|