xt-element-ui 1.2.1 → 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.
Files changed (32) hide show
  1. package/lib/index.common.js +1306 -1398
  2. package/lib/index.css +1 -1
  3. package/lib/index.umd.js +1311 -1403
  4. package/lib/index.umd.min.js +5 -5
  5. package/package.json +3 -4
  6. package/src/components/ex-button/index.vue +8 -2
  7. package/src/components/ex-button/style/index.scss +42 -6
  8. package/src/components/ex-card/index.vue +0 -82
  9. package/src/components/ex-card/style/index.scss +7 -3
  10. package/src/components/ex-chart/theme/dark.js +1 -1
  11. package/src/components/ex-chart/utils.js +1 -1
  12. package/src/components/ex-page/index.js +2 -0
  13. package/src/components/ex-select-tree/index.js +2 -0
  14. package/src/components/{xt-select-tree → ex-select-tree}/index.vue +1 -1
  15. package/src/components/ex-table/ExTableCell.vue +3 -2
  16. package/src/components/ex-table/VirtualElTable.vue +234 -0
  17. package/src/components/ex-table/index.vue +188 -625
  18. package/src/components/ex-table/virtualScrollData.js +35 -0
  19. package/src/components/ex-upload/index.js +2 -0
  20. package/src/components/xt-config-provider/index.js +2 -2
  21. package/src/components/xt-config-provider/index.vue +17 -13
  22. package/src/components/xt-text/style/index.scss +13 -13
  23. package/src/index.js +4 -1
  24. package/src/styles/css-variables.scss +1 -2
  25. package/src/styles/element-theme.scss +12 -4
  26. package/src/utils/index.js +11 -2
  27. package/src/components/xt-page/index.js +0 -0
  28. package/src/components/xt-select-tree/index.js +0 -0
  29. package/src/components/xt-upload/index.js +0 -2
  30. /package/src/components/{xt-page → ex-page}/index.vue +0 -0
  31. /package/src/components/{xt-upload → ex-upload}/index.vue +0 -0
  32. /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(require("ElementUI"));
3
+ module.exports = factory();
4
4
  else if(typeof define === 'function' && define.amd)
5
- define("xt-element-ui", ["ElementUI"], factory);
5
+ define("xt-element-ui", [], factory);
6
6
  else if(typeof exports === 'object')
7
- exports["xt-element-ui"] = factory(require("ElementUI"));
7
+ exports["xt-element-ui"] = factory();
8
8
  else
9
- root["xt-element-ui"] = factory(root["ElementUI"]);
10
- })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__5f72__) {
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":
@@ -121847,6 +121865,13 @@ function isSaturday (dirtyDate) {
121847
121865
  module.exports = isSaturday
121848
121866
 
121849
121867
 
121868
+ /***/ }),
121869
+
121870
+ /***/ "493c":
121871
+ /***/ (function(module, exports, __webpack_require__) {
121872
+
121873
+ // extracted by mini-css-extract-plugin
121874
+
121850
121875
  /***/ }),
121851
121876
 
121852
121877
  /***/ "4f67":
@@ -122151,13 +122176,6 @@ function getHours (dirtyDate) {
122151
122176
  module.exports = getHours
122152
122177
 
122153
122178
 
122154
- /***/ }),
122155
-
122156
- /***/ "5f72":
122157
- /***/ (function(module, exports) {
122158
-
122159
- module.exports = __WEBPACK_EXTERNAL_MODULE__5f72__;
122160
-
122161
122179
  /***/ }),
122162
122180
 
122163
122181
  /***/ "6254":
@@ -122432,13 +122450,6 @@ function addMonths (dirtyDate, dirtyAmount) {
122432
122450
  module.exports = addMonths
122433
122451
 
122434
122452
 
122435
- /***/ }),
122436
-
122437
- /***/ "67b7":
122438
- /***/ (function(module, exports, __webpack_require__) {
122439
-
122440
- // extracted by mini-css-extract-plugin
122441
-
122442
122453
  /***/ }),
122443
122454
 
122444
122455
  /***/ "693a":
@@ -125153,6 +125164,17 @@ module.exports = isThisMonth
125153
125164
  /* unused harmony reexport * */
125154
125165
 
125155
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
+
125156
125178
  /***/ }),
125157
125179
 
125158
125180
  /***/ "a431":
@@ -125322,13 +125344,6 @@ function isPast (dirtyDate) {
125322
125344
  module.exports = isPast
125323
125345
 
125324
125346
 
125325
- /***/ }),
125326
-
125327
- /***/ "a968":
125328
- /***/ (function(module, exports, __webpack_require__) {
125329
-
125330
- // extracted by mini-css-extract-plugin
125331
-
125332
125347
  /***/ }),
125333
125348
 
125334
125349
  /***/ "abd4":
@@ -125364,6 +125379,17 @@ function isEqual (dirtyLeftDate, dirtyRightDate) {
125364
125379
  module.exports = isEqual
125365
125380
 
125366
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
+
125367
125393
  /***/ }),
125368
125394
 
125369
125395
  /***/ "acc4":
@@ -125434,24 +125460,6 @@ function addSeconds (dirtyDate, dirtyAmount) {
125434
125460
  module.exports = addSeconds
125435
125461
 
125436
125462
 
125437
- /***/ }),
125438
-
125439
- /***/ "b2a4":
125440
- /***/ (function(module, exports, __webpack_require__) {
125441
-
125442
- // extracted by mini-css-extract-plugin
125443
-
125444
- /***/ }),
125445
-
125446
- /***/ "b2b3":
125447
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
125448
-
125449
- "use strict";
125450
- /* 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_5be23981_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b2a4");
125451
- /* 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_5be23981_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_5be23981_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
125452
- /* unused harmony reexport * */
125453
-
125454
-
125455
125463
  /***/ }),
125456
125464
 
125457
125465
  /***/ "b2e9":
@@ -127046,6 +127054,13 @@ var LRU = (function () {
127046
127054
  /* harmony default export */ __webpack_exports__["a"] = (LRU);
127047
127055
 
127048
127056
 
127057
+ /***/ }),
127058
+
127059
+ /***/ "d661":
127060
+ /***/ (function(module, exports, __webpack_require__) {
127061
+
127062
+ // extracted by mini-css-extract-plugin
127063
+
127049
127064
  /***/ }),
127050
127065
 
127051
127066
  /***/ "d67a":
@@ -127098,17 +127113,6 @@ module.exports = endOfMonth
127098
127113
  /* unused harmony reexport * */
127099
127114
 
127100
127115
 
127101
- /***/ }),
127102
-
127103
- /***/ "d81e":
127104
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
127105
-
127106
- "use strict";
127107
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_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_2073f658_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("67b7");
127108
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_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_2073f658_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_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_2073f658_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
127109
- /* unused harmony reexport * */
127110
-
127111
-
127112
127116
  /***/ }),
127113
127117
 
127114
127118
  /***/ "d975":
@@ -127365,17 +127369,6 @@ module.exports = Array.isArray || function (arr) {
127365
127369
  };
127366
127370
 
127367
127371
 
127368
- /***/ }),
127369
-
127370
- /***/ "e3e9":
127371
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
127372
-
127373
- "use strict";
127374
- /* 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_cdc550fc_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a968");
127375
- /* 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_cdc550fc_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_cdc550fc_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
127376
- /* unused harmony reexport * */
127377
-
127378
-
127379
127372
  /***/ }),
127380
127373
 
127381
127374
  /***/ "e51d":
@@ -128040,7 +128033,9 @@ __webpack_require__.r(__webpack_exports__);
128040
128033
 
128041
128034
  // EXPORTS
128042
128035
  __webpack_require__.d(__webpack_exports__, "ExChart", function() { return /* reexport */ components_ex_chart; });
128043
- __webpack_require__.d(__webpack_exports__, "utils", function() { return /* reexport */ src_utils; });
128036
+ __webpack_require__.d(__webpack_exports__, "createVirtualScrollData", function() { return /* reexport */ createVirtualScrollData; });
128037
+ __webpack_require__.d(__webpack_exports__, "virtualScrollColumns", function() { return /* reexport */ virtualScrollColumns; });
128038
+ __webpack_require__.d(__webpack_exports__, "utils", function() { return /* reexport */ src_utils_0; });
128044
128039
  __webpack_require__.d(__webpack_exports__, "variables", function() { return /* reexport */ variables_export_default.a; });
128045
128040
  __webpack_require__.d(__webpack_exports__, "getConfig", function() { return /* reexport */ src_getConfig; });
128046
128041
  __webpack_require__.d(__webpack_exports__, "setConfig", function() { return /* reexport */ src_setConfig; });
@@ -128079,7 +128074,811 @@ var components = __webpack_require__("d67a");
128079
128074
  var variables_export = __webpack_require__("ad4d");
128080
128075
  var variables_export_default = /*#__PURE__*/__webpack_require__.n(variables_export);
128081
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
+
128082
128880
  // CONCATENATED MODULE: ./src/utils/index.js
128881
+
128083
128882
  // 默认配置
128084
128883
  const defaultConfig = {
128085
128884
  theme: 'white',
@@ -128126,7 +128925,7 @@ const setConfig = function(config) {
128126
128925
  }
128127
128926
 
128128
128927
 
128129
- // 设置主题
128928
+ // 设置主题 并更新图表主题
128130
128929
  const setTheme = function(theme) {
128131
128930
  const validThemes = ['white', 'dark']
128132
128931
  if (!validThemes.includes(theme)) {
@@ -128141,9 +128940,13 @@ const setTheme = function(theme) {
128141
128940
  if (theme === 'dark') {
128142
128941
  root.setAttribute('data-theme', 'dark')
128143
128942
  } else {
128144
- root.removeAttribute('data-theme')
128943
+ root.setAttribute('data-theme', theme)
128145
128944
  }
128146
128945
 
128946
+ // 更新图表主题
128947
+ utils.changeAllTheme(currentConfig.theme, currentConfig.size)
128948
+ console.log('更新图表主题')
128949
+
128147
128950
  emitConfigChange('theme', theme)
128148
128951
  }
128149
128952
 
@@ -128157,6 +128960,10 @@ const setSize = function(size) {
128157
128960
 
128158
128961
  currentConfig.size = size
128159
128962
  document.documentElement.setAttribute('data-size', size)
128963
+ // 更新图表主题
128964
+ utils.changeAllTheme(currentConfig.theme, currentConfig.size)
128965
+ console.log('更新图表字体')
128966
+
128160
128967
  emitConfigChange('size', size)
128161
128968
  }
128162
128969
 
@@ -128261,7 +129068,7 @@ const onConfigChange = function(listener) {
128261
129068
  }
128262
129069
  }
128263
129070
 
128264
- /* harmony default export */ var utils = ({
129071
+ /* harmony default export */ var src_utils = ({
128265
129072
  setTheme,
128266
129073
  setSize,
128267
129074
  setPrimaryColor,
@@ -128274,7 +129081,7 @@ const onConfigChange = function(listener) {
128274
129081
  onConfigChange
128275
129082
  });
128276
129083
 
128277
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-button/index.vue?vue&type=template&id=10eba8a7
129084
+ // 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/xt-button/index.vue?vue&type=template&id=10eba8a7
128278
129085
  var render = function render(){var _vm=this,_c=_vm._self._c;return _c('button',{staticClass:"el-button xt-button",class:[
128279
129086
  _vm.type ?'xt-button--' + _vm.type: '',
128280
129087
  _vm.size ? 'xt-button--' + _vm.size : '',
@@ -128450,7 +129257,7 @@ var component = normalizeComponent(
128450
129257
  // CONCATENATED MODULE: ./src/components/xt-button/index.js
128451
129258
 
128452
129259
  /* harmony default export */ var components_xt_button = (xt_button);
128453
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-input/index.vue?vue&type=template&id=f11783a2
129260
+ // 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/xt-input/index.vue?vue&type=template&id=f11783a2
128454
129261
  var xt_inputvue_type_template_id_f11783a2_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-input"},[_c('el-input',{style:(_vm.inputStyle),attrs:{"value":_vm.value,"placeholder":_vm.placeholder},on:{"input":function($event){return _vm.$emit('input', $event)}}})],1)
128455
129262
  }
128456
129263
  var xt_inputvue_type_template_id_f11783a2_staticRenderFns = []
@@ -128510,7 +129317,7 @@ var xt_input_component = normalizeComponent(
128510
129317
  // CONCATENATED MODULE: ./src/components/xt-input/index.js
128511
129318
 
128512
129319
  /* harmony default export */ var components_xt_input = (xt_input);
128513
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-flex-box/index.vue?vue&type=template&id=21429280
129320
+ // 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/xt-flex-box/index.vue?vue&type=template&id=21429280
128514
129321
  var xt_flex_boxvue_type_template_id_21429280_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-flex-box",class:_vm.classAttrs,style:(_vm.flexStyle)},[_vm._t("default")],2)
128515
129322
  }
128516
129323
  var xt_flex_boxvue_type_template_id_21429280_staticRenderFns = []
@@ -128572,7 +129379,7 @@ var xt_flex_box_component = normalizeComponent(
128572
129379
  // CONCATENATED MODULE: ./src/components/xt-flex-box/index.js
128573
129380
 
128574
129381
  /* harmony default export */ var components_xt_flex_box = (xt_flex_box);
128575
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-card/index.vue?vue&type=template&id=bc9ed1fa
129382
+ // 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/xt-card/index.vue?vue&type=template&id=bc9ed1fa
128576
129383
  var xt_cardvue_type_template_id_bc9ed1fa_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-card",class:{'no-padding': _vm.noPadding }},[(_vm.title)?_c('div',{staticClass:"card__header"},[_vm._t("icon",function(){return [_vm._v(_vm._s(_vm.icon))]}),_vm._t("title",function(){return [_vm._v(_vm._s(_vm.title))]})],2):_vm._e(),_c('div',{staticClass:"card__body"},[_vm._t("default",function(){return [_c('span',{staticClass:"value"},[_vm._t("value",function(){return [_vm._v(_vm._s(_vm.value))]})],2),_c('span',{staticClass:"unit"},[_vm._v(_vm._s(_vm.unit))])]})],2)])
128577
129384
  }
128578
129385
  var xt_cardvue_type_template_id_bc9ed1fa_staticRenderFns = []
@@ -128620,7 +129427,7 @@ var xt_card_component = normalizeComponent(
128620
129427
  // CONCATENATED MODULE: ./src/components/xt-card/index.js
128621
129428
 
128622
129429
  /* harmony default export */ var components_xt_card = (xt_card);
128623
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-card-item/index.vue?vue&type=template&id=4f375226
129430
+ // 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/xt-card-item/index.vue?vue&type=template&id=4f375226
128624
129431
  var xt_card_itemvue_type_template_id_4f375226_render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.iconType=='border')?_c('FlexBox',{staticClass:"xt-card-item is-border",class:[_vm.iconType=='border'?`is-${_vm.type}`:''],style:(_vm.cardItemStyle),attrs:{"content":"between"}},[(_vm.title)?_c('span',{staticClass:"item__label"},[_vm._t("label",function(){return [_vm._v(_vm._s(_vm.label))]})],2):_vm._e(),_c('span',{staticClass:"item__value"},[_vm._t("value",function(){return [_vm._v(_vm._s(_vm.value))]})],2),_c('span',{staticClass:"item__unit"},[_vm._t("unit",function(){return [_vm._v(_vm._s(_vm.unit))]})],2)]):_c('FlexBox',{staticClass:"xt-card-item",attrs:{"direction":_vm.direction,"content":_vm.contentAlign}},[_vm._t("icon",function(){return [_c('el-button',{attrs:{"type":_vm.type,"circle":_vm.circle,"round":_vm.round,"plain":"","icon":_vm.icon}})]}),_c('div',{staticClass:"item__value"},[_c('span',{staticClass:"value",style:(_vm.valueStyle)},[_vm._t("value",function(){return [_vm._v(_vm._s(_vm.label))]})],2),_c('div',{staticClass:"unit"},[_vm._v(_vm._s(_vm.value))])])],2)
128625
129432
  }
128626
129433
  var xt_card_itemvue_type_template_id_4f375226_staticRenderFns = []
@@ -128714,6 +129521,7 @@ var xt_card_item_component = normalizeComponent(
128714
129521
  /* harmony default export */ var components_xt_card_item = (xt_card_item);
128715
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
128716
129523
 
129524
+
128717
129525
  /* harmony default export */ var xt_config_providervue_type_script_lang_js = ({
128718
129526
  name: 'XtConfigProvider',
128719
129527
  inheritAttrs: false,
@@ -128728,25 +129536,25 @@ var xt_card_item_component = normalizeComponent(
128728
129536
  },
128729
129537
  watch: {
128730
129538
  theme(newVal) {
128731
- this.$provide('xtConfig', {
129539
+ this.xtConfig ={
128732
129540
  theme: newVal,
128733
129541
  size: this.size,
128734
129542
  primaryColor: this.primaryColor
128735
- })
129543
+ }
128736
129544
  },
128737
129545
  size(newVal) {
128738
- this.$provide('xtConfig', {
128739
- theme: this.theme,
128740
- size: newVal,
129546
+ this.xtConfig ={
129547
+ theme: newVal,
129548
+ size: this.size,
128741
129549
  primaryColor: this.primaryColor
128742
- })
129550
+ }
128743
129551
  },
128744
129552
  primaryColor(newVal) {
128745
- this.$provide('xtConfig', {
128746
- theme: this.theme,
129553
+ this.xtConfig ={
129554
+ theme: newVal,
128747
129555
  size: this.size,
128748
- primaryColor: newVal
128749
- })
129556
+ primaryColor: this.primaryColor
129557
+ }
128750
129558
  }
128751
129559
  },
128752
129560
  render(h) {
@@ -128854,9 +129662,9 @@ var xt_card_item_component = normalizeComponent(
128854
129662
  }
128855
129663
 
128856
129664
  const sizeMap = {
128857
- small: '12px',
128858
- medium: '14px',
128859
- large: '16px'
129665
+ small: '14px',
129666
+ medium: '16px',
129667
+ large: '18px'
128860
129668
  }
128861
129669
  if (sizeMap[this.size]) {
128862
129670
  result['--xt-font-size-base'] = sizeMap[this.size]
@@ -129023,6 +129831,9 @@ var xt_card_item_component = normalizeComponent(
129023
129831
 
129024
129832
  // 设置 data-theme 属性
129025
129833
  element.setAttribute('data-theme', this.theme)
129834
+
129835
+ // 更新图表颜色
129836
+ utils.changeAllTheme(this.theme, this.size, this.primaryColor)
129026
129837
 
129027
129838
  // 触发主题改变钩子(当主题实际发生变化时)
129028
129839
  if (prevTheme !== this.theme && typeof this.onThemeChange === 'function') {
@@ -129065,8 +129876,8 @@ var xt_card_item_component = normalizeComponent(
129065
129876
 
129066
129877
  // CONCATENATED MODULE: ./src/components/xt-config-provider/index.vue?vue&type=script&lang=js
129067
129878
  /* harmony default export */ var components_xt_config_providervue_type_script_lang_js = (xt_config_providervue_type_script_lang_js);
129068
- // EXTERNAL MODULE: ./src/components/xt-config-provider/index.vue?vue&type=style&index=0&id=cdc550fc&prod&scoped=true&lang=css
129069
- var xt_config_providervue_type_style_index_0_id_cdc550fc_prod_scoped_true_lang_css = __webpack_require__("e3e9");
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");
129070
129881
 
129071
129882
  // CONCATENATED MODULE: ./src/components/xt-config-provider/index.vue
129072
129883
  var xt_config_provider_render, xt_config_provider_staticRenderFns
@@ -129083,7 +129894,7 @@ var xt_config_provider_component = normalizeComponent(
129083
129894
  xt_config_provider_staticRenderFns,
129084
129895
  false,
129085
129896
  null,
129086
- "cdc550fc",
129897
+ "314a5524",
129087
129898
  null
129088
129899
 
129089
129900
  )
@@ -129093,7 +129904,7 @@ var xt_config_provider_component = normalizeComponent(
129093
129904
 
129094
129905
  /* harmony default export */ var components_xt_config_provider = (xt_config_provider);
129095
129906
 
129096
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-text/index.vue?vue&type=template&id=2b4328b0
129907
+ // 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/xt-text/index.vue?vue&type=template&id=2b4328b0
129097
129908
  var xt_textvue_type_template_id_2b4328b0_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-text",class:[
129098
129909
  _vm.type ? 'xt-text--' + _vm.type : '',
129099
129910
  'xt-text--' + _vm.size,
@@ -129240,7 +130051,7 @@ var xt_text_component = normalizeComponent(
129240
130051
  // CONCATENATED MODULE: ./src/components/xt-text/index.js
129241
130052
 
129242
130053
  /* harmony default export */ var components_xt_text = (xt_text);
129243
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-grid-box/index.vue?vue&type=template&id=67e197c4
130054
+ // 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/xt-grid-box/index.vue?vue&type=template&id=67e197c4
129244
130055
  var xt_grid_boxvue_type_template_id_67e197c4_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-grid-box",style:(_vm.styleAttrs)},[_vm._t("default")],2)
129245
130056
  }
129246
130057
  var xt_grid_boxvue_type_template_id_67e197c4_staticRenderFns = []
@@ -129404,7 +130215,7 @@ var xt_grid_box_component = normalizeComponent(
129404
130215
 
129405
130216
  /* harmony default export */ var components_xt_grid_box = (xt_grid_box);
129406
130217
 
129407
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-grid-item/index.vue?vue&type=template&id=5318efc6&scoped=true
130218
+ // 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/xt-grid-item/index.vue?vue&type=template&id=5318efc6&scoped=true
129408
130219
  var xt_grid_itemvue_type_template_id_5318efc6_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-grid-item",style:(_vm.styleAttrs)},[_vm._t("default")],2)
129409
130220
  }
129410
130221
  var xt_grid_itemvue_type_template_id_5318efc6_scoped_true_staticRenderFns = []
@@ -129537,7 +130348,7 @@ var xt_grid_item_component = normalizeComponent(
129537
130348
  // CONCATENATED MODULE: ./src/components/xt-grid-item/index.js
129538
130349
 
129539
130350
  /* harmony default export */ var components_xt_grid_item = (xt_grid_item);
129540
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-date-picker/index.vue?vue&type=template&id=6a59ddb5&scoped=true
130351
+ // 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/xt-date-picker/index.vue?vue&type=template&id=6a59ddb5&scoped=true
129541
130352
  var xt_date_pickervue_type_template_id_6a59ddb5_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticStyle:{"display":"inline-block"}},[(_vm.dateType=='quarter')?_c('FlexBox',{staticClass:"xt-date-picker",class:{focus: _vm.isfocus},style:(_vm.width?{width: `${_vm.width}px`}:{}),attrs:{"type":"inline-flex"}},[_c('Quarter',{attrs:{"format":_vm.format,"placeholder":"开始时间","quarter-type":"quarter-start","clearable":""},model:{value:(_vm.timeStart),callback:function ($$v) {_vm.timeStart=$$v},expression:"timeStart"}}),_c('span',{staticClass:"separator"},[_vm._v(_vm._s(_vm.separator))]),_c('Quarter',{attrs:{"format":_vm.format,"placeholder":"结束时间","quarter-type":"quarter-end","clearable":""},model:{value:(_vm.timeEnd),callback:function ($$v) {_vm.timeEnd=$$v},expression:"timeEnd"}})],1):_c('FlexBox',{staticClass:"xt-date",class:{focus: _vm.isfocus},style:(_vm.width?{width: `${_vm.width}px`}:{}),attrs:{"type":"inline-flex"}},[_c('el-date-picker',{key:"startSelect",ref:"timeStart",attrs:{"size":"small","disabled":_vm.disabled,"append-to-body":"","picker-options":_vm.startTimeRange,"format":_vm.format,"type":_vm.dateType,"placeholder":"开始时间","clearable":""},on:{"blur":function($event){return _vm.$emit('blur')},"focus":function($event){return _vm.$emit('focus')}},model:{value:(_vm.timeStart),callback:function ($$v) {_vm.timeStart=$$v},expression:"timeStart"}}),_c('span',{staticClass:"separator"},[_vm._v(_vm._s(_vm.separator))]),_c('el-date-picker',{key:"endSelect",ref:"timeEnd",attrs:{"size":"small","disabled":_vm.disabled,"append-to-body":"","picker-options":_vm.endTimeRange,"format":_vm.format,"type":_vm.dateType,"placeholder":"结束时间","clearable":""},on:{"blur":function($event){return _vm.$emit('blur')},"focus":function($event){return _vm.$emit('focus')}},model:{value:(_vm.timeEnd),callback:function ($$v) {_vm.timeEnd=$$v},expression:"timeEnd"}})],1)],1)
129542
130353
  }
129543
130354
  var xt_date_pickervue_type_template_id_6a59ddb5_scoped_true_staticRenderFns = []
@@ -129545,7 +130356,7 @@ var xt_date_pickervue_type_template_id_6a59ddb5_scoped_true_staticRenderFns = []
129545
130356
 
129546
130357
  // CONCATENATED MODULE: ./src/components/xt-date-picker/index.vue?vue&type=template&id=6a59ddb5&scoped=true
129547
130358
 
129548
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-date-picker/quarter.vue?vue&type=template&id=4e3cbf9a
130359
+ // 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/xt-date-picker/quarter.vue?vue&type=template&id=4e3cbf9a
129549
130360
  var quartervue_type_template_id_4e3cbf9a_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-popover',{attrs:{"trigger":"click","disabled":_vm.disabled,"transition":"el-zoom-in-top","placement":_vm.placement,"width":_vm.popoverWidth},on:{"hide":_vm.handleBlur},model:{value:(_vm.popoverVisible),callback:function ($$v) {_vm.popoverVisible=$$v},expression:"popoverVisible"}},[_c('div',{staticClass:"quarter-wrapper"},[_c('BaseFlexBox',{attrs:{"content":"between"}},[_c('i',{staticClass:"el-icon-d-arrow-left",on:{"click":_vm.prev}}),_c('span',[_vm._v(_vm._s(_vm.selectYear))]),_c('i',{staticClass:"el-icon-d-arrow-right",on:{"click":_vm.after}})]),_c('BaseFlexBox',{staticStyle:{"margin-top":"10px"},attrs:{"content":"between"}},_vm._l((_vm.quarterList),function(item){return _c('el-button',{key:item.value,attrs:{"disabled":_vm.getDisable(item),"type":_vm.currentyear==_vm.selectYear&&item.value == _vm.currentQuarter ?'primary':'',"size":"mini","round":""},on:{"click":function($event){return _vm.setCurrent(item)}}},[_vm._v(_vm._s(item.label))])}),1)],1),_c('el-input',{ref:"reference",attrs:{"slot":"reference","size":"small","value":_vm.quarterLabel,"readonly":"","title":_vm.value,"placeholder":_vm.placeholder,"prefix-icon":"el-icon-date","clearable":""},slot:"reference"})],1)
129550
130361
  }
129551
130362
  var quartervue_type_template_id_4e3cbf9a_staticRenderFns = []
@@ -129833,13 +130644,13 @@ var xt_date_picker_component = normalizeComponent(
129833
130644
  // CONCATENATED MODULE: ./src/components/xt-date-picker/index.js
129834
130645
 
129835
130646
  /* harmony default export */ var components_xt_date_picker = (xt_date_picker);
129836
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-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=39655574
129837
- var ex_buttonvue_type_template_id_39655574_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)
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)
129838
130649
  }
129839
- var ex_buttonvue_type_template_id_39655574_staticRenderFns = []
130650
+ var ex_buttonvue_type_template_id_1b7e9238_staticRenderFns = []
129840
130651
 
129841
130652
 
129842
- // CONCATENATED MODULE: ./src/components/ex-button/index.vue?vue&type=template&id=39655574
130653
+ // CONCATENATED MODULE: ./src/components/ex-button/index.vue?vue&type=template&id=1b7e9238
129843
130654
 
129844
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
129845
130656
 
@@ -129856,6 +130667,11 @@ var ex_buttonvue_type_template_id_39655574_staticRenderFns = []
129856
130667
  }
129857
130668
  },
129858
130669
  props: {
130670
+ type: {
130671
+ type: String,
130672
+ default: 'default',
130673
+ validator: (val) => ['default', 'primary', 'success', 'warning', 'danger'].includes(val)
130674
+ },
129859
130675
  throttle: {
129860
130676
  type: Number,
129861
130677
  default: 0
@@ -129863,7 +130679,7 @@ var ex_buttonvue_type_template_id_39655574_staticRenderFns = []
129863
130679
  size: {
129864
130680
  type: String,
129865
130681
  default: null,
129866
- validator: (val) => !val || ['small', 'medium', 'large'].includes(val)
130682
+ validator: (val) => !val || ['mini', 'small', 'medium', 'large'].includes(val)
129867
130683
  }
129868
130684
  },
129869
130685
  data() {
@@ -129878,7 +130694,8 @@ var ex_buttonvue_type_template_id_39655574_staticRenderFns = []
129878
130694
  },
129879
130695
  buttonClasses() {
129880
130696
  return [
129881
- `ex-button-${this.finalSize}`
130697
+ `ex-button-${this.finalSize}`,
130698
+ `ex-button-${this.type}`
129882
130699
  ]
129883
130700
  }
129884
130701
  },
@@ -129905,8 +130722,8 @@ var ex_buttonvue_type_template_id_39655574_staticRenderFns = []
129905
130722
 
129906
130723
  var ex_button_component = normalizeComponent(
129907
130724
  components_ex_buttonvue_type_script_lang_js,
129908
- ex_buttonvue_type_template_id_39655574_render,
129909
- ex_buttonvue_type_template_id_39655574_staticRenderFns,
130725
+ ex_buttonvue_type_template_id_1b7e9238_render,
130726
+ ex_buttonvue_type_template_id_1b7e9238_staticRenderFns,
129910
130727
  false,
129911
130728
  null,
129912
130729
  null,
@@ -129918,7 +130735,7 @@ var ex_button_component = normalizeComponent(
129918
130735
  // CONCATENATED MODULE: ./src/components/ex-button/index.js
129919
130736
 
129920
130737
  /* harmony default export */ var components_ex_button = (ex_button);
129921
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/index.vue?vue&type=template&id=40ae37dd
130738
+ // 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-chart/index.vue?vue&type=template&id=40ae37dd
129922
130739
  var ex_chartvue_type_template_id_40ae37dd_render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.type=='bar')?_c('ex-bar',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-bar',_vm.$attrs,false)):(_vm.type=='line')?_c('ex-line',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-line',_vm.$attrs,false)):(_vm.type=='pie')?_c('ex-pie',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-pie',_vm.$attrs,false)):(_vm.type=='multi')?_c('ex-multi',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-multi',_vm.$attrs,false)):(_vm.type=='trend')?_c('ex-trend',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-trend',_vm.$attrs,false)):_vm._e()
129923
130740
  }
129924
130741
  var ex_chartvue_type_template_id_40ae37dd_staticRenderFns = []
@@ -129926,7 +130743,7 @@ var ex_chartvue_type_template_id_40ae37dd_staticRenderFns = []
129926
130743
 
129927
130744
  // CONCATENATED MODULE: ./src/components/ex-chart/index.vue?vue&type=template&id=40ae37dd
129928
130745
 
129929
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/ExBar.vue?vue&type=template&id=10acd2fc&scoped=true
130746
+ // 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-chart/ExBar.vue?vue&type=template&id=10acd2fc&scoped=true
129930
130747
  var ExBarvue_type_template_id_10acd2fc_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"barchart",staticClass:"bar-box"})
129931
130748
  }
129932
130749
  var ExBarvue_type_template_id_10acd2fc_scoped_true_staticRenderFns = []
@@ -129934,809 +130751,6 @@ var ExBarvue_type_template_id_10acd2fc_scoped_true_staticRenderFns = []
129934
130751
 
129935
130752
  // CONCATENATED MODULE: ./src/components/ex-chart/ExBar.vue?vue&type=template&id=10acd2fc&scoped=true
129936
130753
 
129937
- // CONCATENATED MODULE: ./src/components/ex-chart/theme/white.js
129938
- /* harmony default export */ var white = ({
129939
- color: ["#1890ff", "#37c3a4", "#29c0ce", "#6480D7", "#8cce6f", "#3a5dca", "#ffb74d"],
129940
- backgroundColor: "#ffffff",
129941
- textStyle: {
129942
- fontFamily: "Microsoft YaHei, sans-serif"
129943
- },
129944
- title: {
129945
- textStyle: {
129946
- color: "#333",
129947
- fontSize: 16
129948
- },
129949
- subtextStyle: {
129950
- color: "#666666",
129951
- fontSize: 12
129952
- }
129953
- },
129954
- line: {
129955
- itemStyle: {
129956
- },
129957
- lineStyle: {
129958
- width: 2
129959
- }
129960
- },
129961
- bar: {
129962
- itemStyle: {
129963
- borderRadius: 4
129964
- }
129965
- },
129966
- pie: {
129967
- roseType: "radius",
129968
- label: {
129969
- color: "#333"
129970
- }
129971
- },
129972
- radar: {
129973
- indicator: {
129974
- color: "#666666"
129975
- }
129976
- },
129977
- map: {
129978
- label: {
129979
- color: "#333"
129980
- },
129981
- itemStyle: {
129982
- borderColor: "#fff"
129983
- }
129984
- },
129985
- gauge: {
129986
- axisLine: {
129987
- lineStyle: {
129988
- color: [[1, "#5470c6"]]
129989
- }
129990
- }
129991
- },
129992
- toolbox: {
129993
- iconStyle: {
129994
- borderColor: "#666666"
129995
- }
129996
- },
129997
- xAxis: {
129998
- axisLine: {
129999
- lineStyle: {
130000
- color: "#DFE9EE"
130001
- }
130002
- },
130003
- axisTick: {
130004
- lineStyle: {
130005
- color: "#DFE9EE"
130006
- },
130007
- show: false
130008
- }
130009
- },
130010
- yAxis: {
130011
- axisLine: {
130012
- lineStyle: {
130013
- color: "#DFE9EE"
130014
- }
130015
- },
130016
- axisTick: {
130017
- lineStyle: {
130018
- color: "#DFE9EE"
130019
- }
130020
- },
130021
- splitLine: {
130022
- show: true,
130023
- lineStyle: {
130024
- type: "dashed",
130025
- color: "#DFE9EE"
130026
- }
130027
- }
130028
- },
130029
- splitArea: {
130030
- areaStyle: {
130031
- color: ["#f7f8fa", "#ffffff"]
130032
- }
130033
- },
130034
- legend: {
130035
- textStyle: {
130036
- color: "#333333"
130037
- }
130038
- },
130039
- tooltip: {
130040
- borderWidth: 1,
130041
- backgroundColor: "#ffffff",
130042
- textStyle: {
130043
- color: "#333333"
130044
- },
130045
- trigger: "axis"
130046
- }
130047
- });
130048
-
130049
- // CONCATENATED MODULE: ./src/components/ex-chart/theme/dark.js
130050
- /* harmony default export */ var dark = ({
130051
- color: ["#0de7ff", "#a782ff", "#fcdd60", "#0de7ff", "#ffc5a1", "#6291ae", "#13ce66"],
130052
- backgroundColor: "transparent",
130053
- textStyle: {
130054
- fontFamily: "Microsoft YaHei, sans-serif"
130055
- },
130056
- title: {
130057
- textStyle: {
130058
- color: "#333"
130059
- },
130060
- subtextStyle: {
130061
- color: "#666666"
130062
- }
130063
- },
130064
- line: {
130065
- itemStyle: {
130066
- },
130067
- lineStyle: {
130068
- width: 2
130069
- }
130070
- },
130071
- bar: {
130072
- itemStyle: {
130073
- borderRadius: 4
130074
- }
130075
- },
130076
- pie: {
130077
- roseType: "radius",
130078
- label: {
130079
- color: "#333"
130080
- }
130081
- },
130082
- radar: {
130083
- indicator: {
130084
- color: "#666666"
130085
- }
130086
- },
130087
- map: {
130088
- label: {
130089
- color: "#333"
130090
- },
130091
- itemStyle: {
130092
- borderColor: "#fff"
130093
- }
130094
- },
130095
- gauge: {
130096
- axisLine: {
130097
- lineStyle: {
130098
- color: [[1, "#5470c6"]]
130099
- }
130100
- }
130101
- },
130102
- toolbox: {
130103
- iconStyle: {
130104
- borderColor: "#666666"
130105
- }
130106
- },
130107
- axisLine: {
130108
- lineStyle: {
130109
- color: "#DCDFE6"
130110
- }
130111
- },
130112
- axisTick: {
130113
- lineStyle: {
130114
- color: "#DCDFE6"
130115
- }
130116
- },
130117
- splitLine: {
130118
- lineStyle: {
130119
- color: "#ebeef5"
130120
- }
130121
- },
130122
- splitArea: {
130123
- areaStyle: {
130124
- color: ["#f7f8fa", "#ffffff"]
130125
- }
130126
- },
130127
- legend: {
130128
- textStyle: {
130129
- color: "#666"
130130
- }
130131
- },
130132
- tooltip: {
130133
- backgroundColor: "rgba(255, 255, 255, 0.95)",
130134
- borderColor: "#DCDFE6",
130135
- borderWidth: 1,
130136
- textStyle: {
130137
- color: "#333"
130138
- }
130139
- }
130140
- });
130141
-
130142
- // CONCATENATED MODULE: ./src/components/ex-chart/theme/blue.js
130143
- /* harmony default export */ var blue = ({
130144
- color: ["#2CDEB3", "#A17EE6", "#E57E40", "#409EFF"],
130145
- backgroundColor: "#ffffff",
130146
- textStyle: {
130147
- fontFamily: "Microsoft YaHei, sans-serif"
130148
- },
130149
- title: {
130150
- textStyle: {
130151
- color: "#333"
130152
- },
130153
- subtextStyle: {
130154
- color: "#666666"
130155
- }
130156
- },
130157
- line: {
130158
- itemStyle: {
130159
- },
130160
- lineStyle: {
130161
- width: 2
130162
- }
130163
- },
130164
- bar: {
130165
- itemStyle: {
130166
- borderRadius: 4
130167
- }
130168
- },
130169
- pie: {
130170
- roseType: "radius",
130171
- label: {
130172
- color: "#333"
130173
- }
130174
- },
130175
- radar: {
130176
- indicator: {
130177
- color: "#666666"
130178
- }
130179
- },
130180
- map: {
130181
- label: {
130182
- color: "#333"
130183
- },
130184
- itemStyle: {
130185
- borderColor: "#fff"
130186
- }
130187
- },
130188
- gauge: {
130189
- axisLine: {
130190
- lineStyle: {
130191
- color: [[1, "#5470c6"]]
130192
- }
130193
- }
130194
- },
130195
- toolbox: {
130196
- iconStyle: {
130197
- borderColor: "#666666"
130198
- }
130199
- },
130200
- axisLine: {
130201
- lineStyle: {
130202
- color: "#DCDFE6"
130203
- }
130204
- },
130205
- axisTick: {
130206
- lineStyle: {
130207
- color: "#DCDFE6"
130208
- }
130209
- },
130210
- splitLine: {
130211
- lineStyle: {
130212
- color: "#ebeef5"
130213
- }
130214
- },
130215
- splitArea: {
130216
- areaStyle: {
130217
- color: ["#f7f8fa", "#ffffff"]
130218
- }
130219
- },
130220
- legend: {
130221
- textStyle: {
130222
- color: "#666"
130223
- }
130224
- },
130225
- tooltip: {
130226
- backgroundColor: "rgba(255, 255, 255, 0.95)",
130227
- borderColor: "#DCDFE6",
130228
- borderWidth: 1,
130229
- textStyle: {
130230
- color: "#333"
130231
- }
130232
- }
130233
- });
130234
-
130235
- // CONCATENATED MODULE: ./src/components/ex-chart/theme/starry.js
130236
- /* harmony default export */ var starry = ({
130237
- color: [
130238
- "#1685a9", // 石青
130239
- "#21a675", // 松柏绿
130240
- "#1bd1a5", // 飞燕草蓝
130241
- "#8c4356", // 绛紫
130242
- "#0dafc6", // 孔雀蓝
130243
- "#4b5cc4", // 宝蓝
130244
- "#758a99", // 墨灰
130245
- "#cca4e3", // 丁香色
130246
- "#205277", // 靛青色
130247
- "#d9b611", // 秋香色
130248
- "#ff8c31", // 杏红
130249
- "#9d2933", // 胭脂
130250
- "#0288c5", // 浅靛青蓝
130251
- "#44cef6" // 天蓝色
130252
- ],
130253
- backgroundColor: "#ffffff",
130254
- textStyle: {
130255
- fontFamily: "Microsoft YaHei, sans-serif"
130256
- },
130257
- title: {
130258
- textStyle: {
130259
- color: "#333"
130260
- },
130261
- subtextStyle: {
130262
- color: "#666666"
130263
- }
130264
- },
130265
- line: {
130266
- itemStyle: {
130267
- },
130268
- lineStyle: {
130269
- width: 2
130270
- }
130271
- },
130272
- bar: {
130273
- itemStyle: {
130274
- borderRadius: 4
130275
- }
130276
- },
130277
- pie: {
130278
- roseType: "radius",
130279
- label: {
130280
- color: "#333"
130281
- }
130282
- },
130283
- radar: {
130284
- indicator: {
130285
- color: "#666666"
130286
- }
130287
- },
130288
- map: {
130289
- label: {
130290
- color: "#333"
130291
- },
130292
- itemStyle: {
130293
- borderColor: "#fff"
130294
- }
130295
- },
130296
- gauge: {
130297
- axisLine: {
130298
- lineStyle: {
130299
- color: [[1, "#5470c6"]]
130300
- }
130301
- }
130302
- },
130303
- toolbox: {
130304
- iconStyle: {
130305
- borderColor: "#666666"
130306
- }
130307
- },
130308
- axisLine: {
130309
- lineStyle: {
130310
- color: "#DCDFE6"
130311
- }
130312
- },
130313
- axisTick: {
130314
- lineStyle: {
130315
- color: "#DCDFE6"
130316
- }
130317
- },
130318
- splitLine: {
130319
- lineStyle: {
130320
- color: "#ebeef5"
130321
- }
130322
- },
130323
- splitArea: {
130324
- areaStyle: {
130325
- color: ["#f7f8fa", "#ffffff"]
130326
- }
130327
- },
130328
- legend: {
130329
- textStyle: {
130330
- color: "#666"
130331
- }
130332
- },
130333
- tooltip: {
130334
- backgroundColor: "rgba(255, 255, 255, 0.95)",
130335
- borderColor: "#DCDFE6",
130336
- borderWidth: 1,
130337
- textStyle: {
130338
- color: "#333"
130339
- }
130340
- }
130341
- });
130342
-
130343
- // CONCATENATED MODULE: ./src/components/ex-chart/theme/orange.js
130344
- /* harmony default export */ var orange = ({
130345
- color: ["#e69419", "#A5b4da", "#F8792C", "#97bfb4", "#de747b", "#d6bac0", "#e62737", "#f35969", "#f1ccb0", "#b7394e", "#fe9c1c2"],
130346
- backgroundColor: "#ffffff",
130347
- textStyle: {
130348
- fontFamily: "Microsoft YaHei, sans-serif"
130349
- },
130350
- title: {
130351
- textStyle: {
130352
- color: "#333"
130353
- },
130354
- subtextStyle: {
130355
- color: "#666666"
130356
- }
130357
- },
130358
- line: {
130359
- itemStyle: {
130360
- color: "#e69419"
130361
- },
130362
- lineStyle: {
130363
- width: 2
130364
- }
130365
- },
130366
- bar: {
130367
- itemStyle: {
130368
- borderRadius: 4
130369
- }
130370
- },
130371
- pie: {
130372
- roseType: "radius",
130373
- label: {
130374
- color: "#333"
130375
- }
130376
- },
130377
- radar: {
130378
- indicator: {
130379
- color: "#666666"
130380
- }
130381
- },
130382
- map: {
130383
- label: {
130384
- color: "#333"
130385
- },
130386
- itemStyle: {
130387
- borderColor: "#fff"
130388
- }
130389
- },
130390
- gauge: {
130391
- axisLine: {
130392
- lineStyle: {
130393
- color: [[1, "#5470c6"]]
130394
- }
130395
- }
130396
- },
130397
- toolbox: {
130398
- iconStyle: {
130399
- borderColor: "#666666"
130400
- }
130401
- },
130402
- axisLine: {
130403
- lineStyle: {
130404
- color: "#DCDFE6"
130405
- }
130406
- },
130407
- axisTick: {
130408
- lineStyle: {
130409
- color: "#DCDFE6"
130410
- }
130411
- },
130412
- splitLine: {
130413
- lineStyle: {
130414
- color: "#ebeef5"
130415
- }
130416
- },
130417
- splitArea: {
130418
- areaStyle: {
130419
- color: ["#f7f8fa", "#ffffff"]
130420
- }
130421
- },
130422
- legend: {
130423
- textStyle: {
130424
- color: "#666"
130425
- }
130426
- },
130427
- tooltip: {
130428
- backgroundColor: "rgba(255, 255, 255, 0.95)",
130429
- borderColor: "#DCDFE6",
130430
- borderWidth: 1,
130431
- textStyle: {
130432
- color: "#333"
130433
- }
130434
- }
130435
- });
130436
-
130437
- // CONCATENATED MODULE: ./src/components/ex-chart/utils.js
130438
-
130439
-
130440
-
130441
-
130442
-
130443
-
130444
- const themeKeys = {
130445
- "default": white,
130446
- "white": white,
130447
- "dark": dark,
130448
- "blue": blue,
130449
- "starry": starry,
130450
- "orange": orange
130451
- };
130452
-
130453
- // echarts 仅在客户端加载,避免 SSR 编译/渲染报错
130454
- let echarts = null;
130455
-
130456
- function getEcharts() {
130457
- if (!echarts && typeof window !== 'undefined') {
130458
- try {
130459
- echarts = __webpack_require__("313e");
130460
- // 注册所有主题
130461
- for (const key in themeKeys) {
130462
- echarts.registerTheme(key, themeKeys[key]);
130463
- }
130464
- } catch (e) {
130465
- console.warn('[ExChart] echarts 加载失败:', e.message);
130466
- }
130467
- }
130468
- return echarts;
130469
- }
130470
-
130471
- // 字体大小配置
130472
- const fontSizeMap = {
130473
- small: {
130474
- title: 14,
130475
- subtitle: 11,
130476
- legend: 11,
130477
- axisLabel: 10,
130478
- tooltip: 11,
130479
- label: 11
130480
- },
130481
- medium: {
130482
- title: 16,
130483
- subtitle: 12,
130484
- legend: 12,
130485
- axisLabel: 12,
130486
- tooltip: 12,
130487
- label: 12
130488
- },
130489
- large: {
130490
- title: 18,
130491
- subtitle: 14,
130492
- legend: 14,
130493
- axisLabel: 14,
130494
- tooltip: 14,
130495
- label: 14
130496
- }
130497
- };
130498
-
130499
- function EchartsUtil() {}
130500
-
130501
- EchartsUtil.currentTheme = "default";
130502
- EchartsUtil.currentSize = "medium";
130503
- EchartsUtil.inverse = false;
130504
-
130505
- EchartsUtil.baseOption = {
130506
- backgroundColor: "transparent",
130507
- tooltip: {
130508
- trigger: "axis",
130509
- borderWidth: 1
130510
- },
130511
- legend: {
130512
- right: 20,
130513
- top: 0,
130514
- show: true,
130515
- textStyle: {
130516
- fontSize: 12
130517
- }
130518
- },
130519
- grid: {
130520
- top: "25%",
130521
- left: "40",
130522
- right: "15",
130523
- bottom: "40"
130524
- },
130525
- xAxis: {
130526
- type: "category",
130527
- boundaryGap: false,
130528
- axisTick: {
130529
- show: true,
130530
- length: 4
130531
- },
130532
- axisLabel: {
130533
- fontSize: 12,
130534
- interval: 0,
130535
- formatter: function(value) {
130536
- return !this.reverse && this.longLable ? value.replace(new RegExp(`(.{${this.longLableSplitNum}})`, "g"), `$1\n`) : value;
130537
- }
130538
- }
130539
- },
130540
- yAxis: {
130541
- type: "value",
130542
- axisTick: {
130543
- show: false
130544
- },
130545
- min: null,
130546
- max: null,
130547
- axisLabel: {
130548
- show: false
130549
- },
130550
- splitLine: {
130551
- lineStyle: {
130552
- type: "dashed",
130553
- width: 1
130554
- }
130555
- }
130556
- }
130557
- };
130558
-
130559
- EchartsUtil.chartInstanceList = [];
130560
-
130561
- EchartsUtil.mergeOptions = function(themeOption, customOption) {
130562
- return Object.assign({}, this.baseOption, themeOption, customOption);
130563
- };
130564
-
130565
- // 根据字体大小调整主题配置
130566
- EchartsUtil.applyFontSize = function(themeOption, size) {
130567
- const fontSizeConfig = fontSizeMap[size] || fontSizeMap.medium;
130568
-
130569
- const result = JSON.parse(JSON.stringify(themeOption));
130570
-
130571
- // 调整标题字体大小
130572
- if (result.title && result.title.textStyle) {
130573
- result.title.textStyle.fontSize = fontSizeConfig.title;
130574
- }
130575
- if (result.title && result.title.subtextStyle) {
130576
- result.title.subtextStyle.fontSize = fontSizeConfig.subtitle;
130577
- }
130578
-
130579
- // 调整图例字体大小
130580
- if (result.legend && result.legend.textStyle) {
130581
- result.legend.textStyle.fontSize = fontSizeConfig.legend;
130582
- }
130583
-
130584
- // 调整提示框字体大小
130585
- if (result.tooltip && result.tooltip.textStyle) {
130586
- result.tooltip.textStyle.fontSize = fontSizeConfig.tooltip;
130587
- }
130588
-
130589
- // 调整饼图标签字体大小
130590
- if (result.pie && result.pie.label) {
130591
- if (typeof result.pie.label === 'object') {
130592
- result.pie.label.fontSize = fontSizeConfig.label;
130593
- }
130594
- }
130595
-
130596
- // 调整雷达图指示器字体大小
130597
- if (result.radar && result.radar.indicator) {
130598
- if (typeof result.radar.indicator === 'object' && result.radar.indicator.textStyle) {
130599
- result.radar.indicator.textStyle.fontSize = fontSizeConfig.label;
130600
- }
130601
- }
130602
-
130603
- // 调整地图标签字体大小
130604
- if (result.map && result.map.label) {
130605
- if (typeof result.map.label === 'object') {
130606
- result.map.label.fontSize = fontSizeConfig.label;
130607
- }
130608
- }
130609
-
130610
- return result;
130611
- };
130612
-
130613
- EchartsUtil.init = function(dom, theme, customOption, size) {
130614
- const ec = getEcharts();
130615
- // SSR 环境下忽略初始化
130616
- if (!ec || !dom) return null;
130617
-
130618
- theme = theme || "default";
130619
- size = size || "medium";
130620
- customOption = customOption || {};
130621
-
130622
- const useTheme = this.currentTheme || theme;
130623
- const useSize = this.currentSize || size;
130624
-
130625
- this.currentTheme = useTheme;
130626
- this.currentSize = useSize;
130627
-
130628
- let themeOption = themeKeys[useTheme];
130629
- // 应用字体大小配置
130630
- themeOption = this.applyFontSize(themeOption, useSize);
130631
-
130632
- const option = this.mergeOptions(themeOption, customOption);
130633
-
130634
- const chart = ec.init(dom, useTheme);
130635
- chart.setOption(option, true);
130636
-
130637
- this.chartInstanceList.push({
130638
- dom,
130639
- chart,
130640
- customOption,
130641
- size: useSize
130642
- });
130643
-
130644
- this.bindResize(chart);
130645
- return chart;
130646
- };
130647
-
130648
- EchartsUtil.changeSingleTheme = function(dom, chartIns, customOption, newTheme) {
130649
- const ec = getEcharts();
130650
- if (!ec || !dom || !chartIns) return;
130651
-
130652
- customOption = customOption || {};
130653
- newTheme = newTheme || "default";
130654
-
130655
- this.currentTheme = newTheme;
130656
- chartIns.dispose();
130657
-
130658
- const newChart = ec.init(dom, newTheme, customOption);
130659
-
130660
- const item = this.chartInstanceList.find(function(v) {
130661
- return v.dom === dom;
130662
- });
130663
-
130664
- if (item) {
130665
- item.chart = newChart;
130666
- }
130667
-
130668
- return newChart;
130669
- };
130670
-
130671
- EchartsUtil.changeAllTheme = function(newTheme, newSize) {
130672
- const ec = getEcharts();
130673
- if (!ec || !newTheme) return;
130674
-
130675
- this.currentTheme = newTheme;
130676
- // 如果传入了新的 size,则更新全局 size
130677
- if (newSize) {
130678
- this.currentSize = newSize;
130679
- }
130680
-
130681
- this.chartInstanceList.forEach(function(item) {
130682
- const dom = item.dom;
130683
- const chart = item.chart;
130684
- const customOption = item.customOption;
130685
- // 使用图表自己的 size,如果没有则使用全局 size
130686
- const useSize = item.size || EchartsUtil.currentSize;
130687
-
130688
- if (chart) {
130689
- chart.dispose();
130690
- }
130691
-
130692
- const newChart = ec.init(dom, newTheme);
130693
- let themeOption = themeKeys[newTheme];
130694
- // 应用字体大小配置
130695
- themeOption = EchartsUtil.applyFontSize(themeOption, useSize);
130696
- const option = EchartsUtil.mergeOptions(themeOption, customOption);
130697
-
130698
- newChart.setOption(option, true);
130699
- item.chart = newChart;
130700
- // 更新图表的 size 记录
130701
- item.size = useSize;
130702
- EchartsUtil.bindResize(newChart);
130703
- });
130704
- };
130705
-
130706
- EchartsUtil.bindResize = function(chartIns) {
130707
- if (!chartIns || chartIns.resizeLocked) return;
130708
-
130709
- window.addEventListener("resize", function() {
130710
- chartIns.resize();
130711
- });
130712
-
130713
- chartIns._resizeLocked = true;
130714
- };
130715
-
130716
- EchartsUtil.destroy = function(chartIns) {
130717
- if (chartIns) {
130718
- chartIns.dispose();
130719
- }
130720
-
130721
- this.chartInstanceList = this.chartInstanceList.filter(function(item) {
130722
- return item.chart !== chartIns;
130723
- });
130724
- };
130725
-
130726
- EchartsUtil.destroyAll = function() {
130727
- this.chartInstanceList.forEach(function(item) {
130728
- if (item.chart) {
130729
- item.chart.dispose();
130730
- }
130731
- });
130732
-
130733
- this.chartInstanceList = [];
130734
- };
130735
-
130736
- /* harmony default export */ var ex_chart_utils = (EchartsUtil);
130737
-
130738
-
130739
-
130740
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
130741
130755
 
130742
130756
 
@@ -130929,7 +130943,7 @@ EchartsUtil.destroyAll = function() {
130929
130943
  if (!this.markPoint) {
130930
130944
  this.$delete(option.series[0], "markPoint");
130931
130945
  }
130932
- this.myChart = ex_chart_utils.init(_self.$refs.barchart, this.theme, option, this.size);
130946
+ this.myChart = utils.init(_self.$refs.barchart, this.theme, option, this.size);
130933
130947
  }
130934
130948
  }
130935
130949
  });
@@ -130960,7 +130974,7 @@ var ExBar_component = normalizeComponent(
130960
130974
  )
130961
130975
 
130962
130976
  /* harmony default export */ var ExBar = (ExBar_component.exports);
130963
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/ExLine.vue?vue&type=template&id=386a9c5d&scoped=true
130977
+ // 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-chart/ExLine.vue?vue&type=template&id=386a9c5d&scoped=true
130964
130978
  var ExLinevue_type_template_id_386a9c5d_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"linechart",staticClass:"line-box"})
130965
130979
  }
130966
130980
  var ExLinevue_type_template_id_386a9c5d_scoped_true_staticRenderFns = []
@@ -131103,7 +131117,7 @@ var ExLinevue_type_template_id_386a9c5d_scoped_true_staticRenderFns = []
131103
131117
  }]
131104
131118
  };
131105
131119
 
131106
- this.myChart = ex_chart_utils.init(_self.$refs.linechart, this.theme, option, this.size);
131120
+ this.myChart = utils.init(_self.$refs.linechart, this.theme, option, this.size);
131107
131121
  }
131108
131122
  }
131109
131123
  });
@@ -131134,7 +131148,7 @@ var ExLine_component = normalizeComponent(
131134
131148
  )
131135
131149
 
131136
131150
  /* harmony default export */ var ExLine = (ExLine_component.exports);
131137
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/ExPie.vue?vue&type=template&id=5100b648&scoped=true
131151
+ // 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-chart/ExPie.vue?vue&type=template&id=5100b648&scoped=true
131138
131152
  var ExPievue_type_template_id_5100b648_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"piechart",staticClass:"pie-box"})
131139
131153
  }
131140
131154
  var ExPievue_type_template_id_5100b648_scoped_true_staticRenderFns = []
@@ -131290,7 +131304,7 @@ var ExPievue_type_template_id_5100b648_scoped_true_staticRenderFns = []
131290
131304
  })
131291
131305
  }]
131292
131306
  };
131293
- this.myChart = ex_chart_utils.init(_self.$refs.piechart, this.theme, option, this.size);
131307
+ this.myChart = utils.init(_self.$refs.piechart, this.theme, option, this.size);
131294
131308
  }
131295
131309
  }
131296
131310
  });
@@ -131321,7 +131335,7 @@ var ExPie_component = normalizeComponent(
131321
131335
  )
131322
131336
 
131323
131337
  /* harmony default export */ var ExPie = (ExPie_component.exports);
131324
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/ExMulti.vue?vue&type=template&id=18661424&scoped=true
131338
+ // 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-chart/ExMulti.vue?vue&type=template&id=18661424&scoped=true
131325
131339
  var ExMultivue_type_template_id_18661424_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"multilinechart",staticClass:"multiline-box"})
131326
131340
  }
131327
131341
  var ExMultivue_type_template_id_18661424_scoped_true_staticRenderFns = []
@@ -131550,7 +131564,7 @@ var ExMultivue_type_template_id_18661424_scoped_true_staticRenderFns = []
131550
131564
  ],
131551
131565
  series: this.getSeriesData()
131552
131566
  };
131553
- this.myChart = ex_chart_utils.init(_self.$refs.multilinechart, this.theme, option, this.size);
131567
+ this.myChart = utils.init(_self.$refs.multilinechart, this.theme, option, this.size);
131554
131568
  },
131555
131569
  getSeriesData() {
131556
131570
  // 创建 24小时 时间数据填充对象
@@ -131609,7 +131623,7 @@ var ExMulti_component = normalizeComponent(
131609
131623
  )
131610
131624
 
131611
131625
  /* harmony default export */ var ExMulti = (ExMulti_component.exports);
131612
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/ExTrend.vue?vue&type=template&id=36cddc14&scoped=true
131626
+ // 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-chart/ExTrend.vue?vue&type=template&id=36cddc14&scoped=true
131613
131627
  var ExTrendvue_type_template_id_36cddc14_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"barchart",staticClass:"bar-box",style:({width:_vm.width})})
131614
131628
  }
131615
131629
  var ExTrendvue_type_template_id_36cddc14_scoped_true_staticRenderFns = []
@@ -131729,7 +131743,7 @@ var ExTrendvue_type_template_id_36cddc14_scoped_true_staticRenderFns = []
131729
131743
  const _self = this;
131730
131744
  // 数据处理
131731
131745
  const option = this.getOption();
131732
- this.myChart = ex_chart_utils.init(_self.$refs.barchart, this.theme, option, this.size);
131746
+ this.myChart = utils.init(_self.$refs.barchart, this.theme, option, this.size);
131733
131747
  }
131734
131748
  }
131735
131749
  });
@@ -131920,13 +131934,13 @@ var ex_chart_component = normalizeComponent(
131920
131934
 
131921
131935
  /* harmony default export */ var components_ex_chart = (ex_chart);
131922
131936
 
131923
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-card/index.vue?vue&type=template&id=2073f658&scoped=true
131924
- var ex_cardvue_type_template_id_2073f658_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-card',_vm._b({staticClass:"ex-card",class:_vm.cardClasses,scopedSlots:_vm._u([(_vm.$slots.header || _vm.title)?{key:"header",fn:function(){return [_vm._t("header",function(){return [_vm._v(_vm._s(_vm.title))]})]},proxy:true}:null],null,true)},'el-card',_vm.$attrs,false),[_vm._t("default")],2)
131937
+ // 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-card/index.vue?vue&type=template&id=0d381618
131938
+ var ex_cardvue_type_template_id_0d381618_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-card',_vm._b({staticClass:"ex-card",class:_vm.cardClasses,scopedSlots:_vm._u([(_vm.$slots.header || _vm.title)?{key:"header",fn:function(){return [_vm._t("header",function(){return [_vm._v(_vm._s(_vm.title))]})]},proxy:true}:null],null,true)},'el-card',_vm.$attrs,false),[_vm._t("default")],2)
131925
131939
  }
131926
- var ex_cardvue_type_template_id_2073f658_scoped_true_staticRenderFns = []
131940
+ var ex_cardvue_type_template_id_0d381618_staticRenderFns = []
131927
131941
 
131928
131942
 
131929
- // CONCATENATED MODULE: ./src/components/ex-card/index.vue?vue&type=template&id=2073f658&scoped=true
131943
+ // CONCATENATED MODULE: ./src/components/ex-card/index.vue?vue&type=template&id=0d381618
131930
131944
 
131931
131945
  // 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-card/index.vue?vue&type=script&lang=js
131932
131946
 
@@ -131986,25 +132000,21 @@ var ex_cardvue_type_template_id_2073f658_scoped_true_staticRenderFns = []
131986
132000
 
131987
132001
  // CONCATENATED MODULE: ./src/components/ex-card/index.vue?vue&type=script&lang=js
131988
132002
  /* harmony default export */ var components_ex_cardvue_type_script_lang_js = (ex_cardvue_type_script_lang_js);
131989
- // EXTERNAL MODULE: ./src/components/ex-card/index.vue?vue&type=style&index=0&id=2073f658&prod&scoped=true&lang=scss
131990
- var ex_cardvue_type_style_index_0_id_2073f658_prod_scoped_true_lang_scss = __webpack_require__("d81e");
131991
-
131992
132003
  // CONCATENATED MODULE: ./src/components/ex-card/index.vue
131993
132004
 
131994
132005
 
131995
132006
 
131996
132007
 
131997
132008
 
131998
-
131999
132009
  /* normalize component */
132000
132010
 
132001
132011
  var ex_card_component = normalizeComponent(
132002
132012
  components_ex_cardvue_type_script_lang_js,
132003
- ex_cardvue_type_template_id_2073f658_scoped_true_render,
132004
- ex_cardvue_type_template_id_2073f658_scoped_true_staticRenderFns,
132013
+ ex_cardvue_type_template_id_0d381618_render,
132014
+ ex_cardvue_type_template_id_0d381618_staticRenderFns,
132005
132015
  false,
132006
132016
  null,
132007
- "2073f658",
132017
+ null,
132008
132018
  null
132009
132019
 
132010
132020
  )
@@ -132019,13 +132029,13 @@ ex_card.install = function (Vue) {
132019
132029
 
132020
132030
  /* harmony default export */ var components_ex_card = (ex_card);
132021
132031
 
132022
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"8c105b8c-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=5be23981&scoped=true
132023
- var ex_tablevue_type_template_id_5be23981_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(),(_vm.virtualScroll && _vm.headerRows.length)?_c('div',{ref:"fixedHeader",staticClass:"ex-table-fixed-header",style:({ marginLeft: -_vm.scrollLeft + 'px' })},[_c('table',{staticClass:"ex-table-fixed-header-table"},[_c('colgroup',[_vm._l((_vm.headerCols),function(col){return _c('col',{key:col._key,attrs:{"name":col._key,"width":col._width,"min-width":col._minWidth}})}),_c('col',{attrs:{"name":"gutter","width":"12"}})],2),_c('thead',_vm._l((_vm.headerRows),function(row,rowIdx){return _c('tr',{key:rowIdx},[_vm._l((row),function(cell){return [(!cell._hidden)?_c('th',{key:cell._key,style:(cell._style || {}),attrs:{"rowspan":cell._rowspan,"colspan":cell._colspan}},[_vm._v(_vm._s(cell.label))]):_vm._e()]})],2)}),0)])]):_vm._e(),_c('div',{ref:"tableBody",staticClass:"ex-table-body",class:{ 'ex-table-virtual': _vm.virtualScroll },style:(_vm.virtualScroll ? { height: _vm.computedHeight + 'px' } : {}),on:{"scroll":_vm.handleBodyScroll}},[(_vm.virtualScroll)?_c('div',{staticClass:"ex-table-virtual-inner",style:({ height: _vm.virtualTotalHeight + 'px' })},[_c('div',{style:({ transform: 'translateY(' + _vm.virtualOffsetY + 'px)' })},[_c('el-table',_vm._g(_vm._b({ref:"table",staticClass:"ex-table",attrs:{"data":_vm.visibleData,"span-method":_vm.groupColumns.length ? _vm.handleSpanMethod : undefined,"row-class-name":_vm.getRowClassName,"show-header":false},on:{"selection-change":_vm.handleSelectionChange,"sort-change":_vm.handleSortChange}},'el-table',_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)]):_c('el-table',_vm._g(_vm._b({ref:"table",staticClass:"ex-table",attrs:{"data":_vm.visibleData,"height":_vm.computedHeight,"span-method":_vm.groupColumns.length ? _vm.handleSpanMethod : undefined,"row-class-name":_vm.getRowClassName},on:{"selection-change":_vm.handleSelectionChange,"sort-change":_vm.handleSortChange}},'el-table',_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()])
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()])
132024
132034
  }
132025
- var ex_tablevue_type_template_id_5be23981_scoped_true_staticRenderFns = []
132035
+ var ex_tablevue_type_template_id_f6bc1634_scoped_true_staticRenderFns = []
132026
132036
 
132027
132037
 
132028
- // CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=template&id=5be23981&scoped=true
132038
+ // CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=template&id=f6bc1634&scoped=true
132029
132039
 
132030
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
132031
132041
 
@@ -132044,9 +132054,10 @@ var ex_tablevue_type_template_id_5be23981_scoped_true_staticRenderFns = []
132044
132054
  index: ctx.props.index
132045
132055
  }
132046
132056
  if (ctx.props.column) params.column = ctx.props.column
132047
- const isVnode = (it) => typeof it === 'object' && it.hasOwnProperty('componentOptions')
132057
+ const isVnode = (it) => it !== null && it !== undefined && typeof it === 'object' && it.hasOwnProperty('componentOptions')
132048
132058
  const renderNode = ctx.props.formatter(h, params)
132049
- return isVnode(renderNode) ? renderNode : h('span', renderNode)
132059
+ if (renderNode === null || renderNode === undefined || renderNode === '') return h('span', '')
132060
+ return isVnode(renderNode) ? renderNode : h('span', String(renderNode))
132050
132061
  }
132051
132062
  });
132052
132063
 
@@ -132072,74 +132083,293 @@ var ExTableCell_component = normalizeComponent(
132072
132083
  )
132073
132084
 
132074
132085
  /* harmony default export */ var ExTableCell = (ExTableCell_component.exports);
132075
- // EXTERNAL MODULE: external "ElementUI"
132076
- var external_ElementUI_ = __webpack_require__("5f72");
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
+
132318
+
132319
+
132320
+
132321
+
132322
+
132323
+ /* normalize component */
132077
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);
132078
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
132079
132338
 
132080
132339
 
132081
- // 内部导入 element-ui 组件,避免与外部 element-ui 冲突
132082
132340
 
132083
132341
 
132084
132342
  /* harmony default export */ var ex_tablevue_type_script_lang_js = ({
132085
132343
  name: 'ExTable',
132086
132344
  inheritAttrs: false,
132087
- components: { ExTableCell: ExTableCell, ElTable: external_ElementUI_["Table"], ElTableColumn: external_ElementUI_["TableColumn"] },
132345
+ components: { ExTableCell: ExTableCell, VirtualElTable: VirtualElTable },
132346
+
132088
132347
  props: {
132089
- // 表格数据
132090
132348
  tableData: { type: Array, default: () => [] },
132091
- // 列配置(支持 children 多级表头)
132092
132349
  columns: { type: Array, default: () => [] },
132093
- // 分组列配置(按配置的层级合并单元格)
132094
132350
  groupColumns: { type: Array, default: () => [] },
132095
- // 标题
132096
132351
  title: { type: String, default: '' },
132097
- // 高度
132098
132352
  height: { type: [Number, String], default: null },
132099
- // 虚拟滚动
132353
+ maxHeight: { type: [Number, String], default: null },
132100
132354
  virtualScroll: { type: Boolean, default: false },
132101
- // 预估行高
132102
132355
  rowInitHeight: { type: Number, default: 48 },
132103
- // 缓冲区行数
132104
132356
  bufferSize: { type: Number, default: 5 },
132105
- // 分页配置
132106
132357
  pagination: { type: Object, default: null },
132107
- // 总条数
132108
132358
  total: { type: Number, default: 0 },
132109
- // 是否显示序号
132110
132359
  showIndex: { type: Boolean, default: false },
132111
- // 是否可选
132112
132360
  selection: { type: Boolean, default: false },
132113
- // 选择列固定位置
132114
132361
  selectionFixed: { type: [String, Boolean], default: false },
132115
- // 序号列固定位置
132116
132362
  indexFixed: { type: [String, Boolean], default: false },
132117
- // 加载状态
132118
132363
  loading: { type: Boolean, default: false },
132119
- // 空数据文案
132120
132364
  emptyText: { type: String, default: '暂无数据' },
132121
- // 小计配置
132122
132365
  subtotalConfig: { type: Object, default: () => ({ enabled: false }) },
132123
- // 总计配置
132124
132366
  totalConfig: { type: Object, default: () => ({ enabled: false }) }
132125
132367
  },
132126
132368
 
132127
132369
  data() {
132128
132370
  return {
132129
- // 虚拟滚动相关
132130
- scrollTop: 0,
132131
- scrollLeft: 0,
132132
- rowHeight: 48,
132133
- visibleStartIndex: 0,
132134
- visibleEndIndex: 0,
132135
- visibleCount: 0,
132136
- // 表格宽度(用于自适应列宽计算)
132137
- tableWidth: 0,
132138
- // 分组合并缓存
132139
132371
  spanCache: {},
132140
- // 列扁平化缓存
132141
132372
  flattenedColumnsCache: [],
132142
- // 选中数据
132143
132373
  selectedRows: []
132144
132374
  }
132145
132375
  },
@@ -132148,337 +132378,100 @@ var external_ElementUI_ = __webpack_require__("5f72");
132148
132378
  showPagination() {
132149
132379
  return this.pagination && this.total > 0
132150
132380
  },
132151
-
132152
132381
  computedHeight() {
132153
- if (this.virtualScroll) {
132154
- return this.height || 400
132155
- }
132156
132382
  return this.height || undefined
132157
132383
  },
132158
-
132159
- // 计算固定列总宽度(selection + index + fixed列)
132160
- fixedColumnWidth() {
132161
- let width = 0
132162
- // 选择列
132163
- if (this.selection) width += 55
132164
- // 序号列
132165
- if (this.showIndex) width += 60
132166
- // fixed 列
132167
- const sumFixedWidth = (cols) => {
132168
- cols.forEach(c => {
132169
- if (c.fixed && (c.width || c.minWidth)) {
132170
- width += typeof c.width === 'number' ? c.width : (typeof c.minWidth === 'number' ? c.minWidth : 100)
132171
- }
132172
- if (c.children && c.children.length) sumFixedWidth(c.children)
132173
- })
132174
- }
132175
- sumFixedWidth(this.columns)
132176
- return width
132384
+ computedMaxHeight() {
132385
+ return this.height ? undefined : this.maxHeight || undefined
132177
132386
  },
132178
132387
 
132179
- // 计算非固定列中已设置width的总宽度
132180
- nonFixedColumnWidthWithWidth() {
132181
- let width = 0
132182
- const sumWidth = (cols) => {
132183
- cols.forEach(c => {
132184
- if (!c.fixed && c.width) {
132185
- width += typeof c.width === 'number' ? c.width : parseInt(c.width) || 0
132186
- }
132187
- if (c.children && c.children.length) sumWidth(c.children)
132188
- })
132189
- }
132190
- sumWidth(this.columns)
132191
- return width
132192
- },
132193
-
132194
- // 计算需要自适应的列数(非固定列且未设置width)
132195
- autoColumnCount() {
132196
- let count = 0
132197
- const countCols = (cols) => {
132198
- cols.forEach(c => {
132199
- if (!c.fixed) {
132200
- if (c.children && c.children.length) {
132201
- countCols(c.children)
132202
- } else if (!c.width) {
132203
- // 只有未设置width的非固定列才参与自适应
132204
- count++
132205
- }
132206
- }
132207
- })
132208
- }
132209
- countCols(this.columns)
132210
- return count
132211
- },
132212
-
132213
- // 自适应列宽(未设置width的非固定列均分剩余宽度)
132214
- autoColumnWidth() {
132215
- const totalWidth = this.tableWidth || 1000
132216
- const gutter = 12 // el-table 默认 gutter
132217
- const fixedWidth = this.fixedColumnWidth
132218
- const nonFixedWithWidth = this.nonFixedColumnWidthWithWidth
132219
- const autoCount = this.autoColumnCount
132220
-
132221
- if (autoCount <= 0) return 100 // 默认宽度
132222
-
132223
- // 自适应宽度 = (总宽度 - gutter - 固定列宽度 - 非固定列中已设置的width)/ 需要自适应的列数
132224
- const availableWidth = totalWidth - gutter - fixedWidth - nonFixedWithWidth
132225
- return Math.max(80, Math.floor(availableWidth / autoCount)) // 最小80px
132226
- },
132227
-
132228
- // 表头列定义(用于 colgroup,与 headerRows 列数保持一致)
132229
- headerCols() {
132230
- const cols = []
132231
-
132232
- // 选择列
132233
- if (this.selection) {
132234
- cols.push({ _key: 'prepend_selection', _width: 55, _minWidth: 55 })
132235
- }
132236
-
132237
- // 序号列
132238
- if (this.showIndex) {
132239
- cols.push({ _key: 'prepend_index', _width: 60, _minWidth: 60 })
132240
- }
132241
-
132242
- // 数据列(只取叶子节点,使用一致的key生成)
132243
- const addLeafCols = (columns, parentPath = '') => {
132244
- columns.forEach((col, index) => {
132245
- const path = parentPath ? `${parentPath}_${index}` : String(index)
132246
- const key = this.generateColKey(col, path)
132247
-
132248
- if (col.children && col.children.length) {
132249
- addLeafCols(col.children, path)
132250
- } else {
132251
- cols.push({
132252
- _key: key,
132253
- _width: this.getColumnWidth(col),
132254
- _minWidth: col.minWidth
132255
- })
132256
- }
132257
- })
132258
- }
132259
- addLeafCols(this.columns)
132260
-
132261
- return cols
132262
- },
132263
-
132264
- // 表头层级结构(用于自定义固定表头渲染)
132265
- headerRows() {
132266
- const rows = []
132267
- let maxDepth = 1
132268
-
132269
- // 计算最大深度
132270
- const calcDepth = (cols, depth) => {
132271
- maxDepth = Math.max(maxDepth, depth)
132272
- cols.forEach(c => { if (c.children && c.children.length) calcDepth(c.children, depth + 1) })
132273
- }
132274
- if (this.columns.length) calcDepth(this.columns, 1)
132275
-
132276
- // 初始化行
132277
- for (let i = 0; i < maxDepth; i++) rows.push([])
132278
-
132279
- // 计算叶子数量
132280
- const countLeaves = (cols) => {
132281
- let n = 0
132282
- cols.forEach(c => {
132283
- if (c.children && c.children.length) n += countLeaves(c.children)
132284
- else n++
132285
- })
132286
- return n
132287
- }
132288
-
132289
- // 选择列 / 序号列占位(仅第一行,rowspan 跨所有行)
132290
- if (this.selection) {
132291
- rows[0].push({
132292
- _key: 'prepend_selection',
132293
- _rowspan: maxDepth,
132294
- _colspan: 1,
132295
- _style: { width: '55px' },
132296
- _hidden: false,
132297
- label: ''
132298
- })
132299
- for (let i = 1; i < maxDepth; i++) {
132300
- rows[i].push({ _key: 'prepend_selection_' + i, _rowspan: 0, _colspan: 1, _hidden: true, label: '' })
132301
- }
132302
- }
132303
- if (this.showIndex) {
132304
- rows[0].push({
132305
- _key: 'prepend_index',
132306
- _rowspan: maxDepth,
132307
- _colspan: 1,
132308
- _style: { width: '60px' },
132309
- _hidden: false,
132310
- label: '#'
132311
- })
132312
- for (let i = 1; i < maxDepth; i++) {
132313
- rows[i].push({ _key: 'prepend_index_' + i, _rowspan: 0, _colspan: 1, _hidden: true, label: '' })
132314
- }
132315
- }
132316
-
132317
- // 填充列
132318
- if (this.columns.length) {
132319
- const fill = (cols, depth, parentPath = '') => {
132320
- cols.forEach((c, index) => {
132321
- const path = parentPath ? `${parentPath}_${index}` : String(index)
132322
- const key = this.generateColKey(c, path)
132323
- const hasKids = c.children && c.children.length
132324
- const style = {}
132325
-
132326
- // 如果有固定宽度,使用固定宽度;否则使用自适应宽度
132327
- if (c.width) {
132328
- style.width = typeof c.width === 'number' ? c.width + 'px' : c.width
132329
- } else if (!c.fixed && this.virtualScroll) {
132330
- // 非固定列且虚拟滚动时使用自适应宽度
132331
- style.width = this.autoColumnWidth + 'px'
132332
- }
132333
-
132334
- if (c.minWidth) style.minWidth = typeof c.minWidth === 'number' ? c.minWidth + 'px' : c.minWidth
132335
-
132336
- rows[depth].push({
132337
- _key: key,
132338
- _rowspan: hasKids ? 1 : maxDepth - depth,
132339
- _colspan: hasKids ? countLeaves(c.children) : 1,
132340
- _style: style,
132341
- _hidden: !c.label && !c.prop,
132342
- label: c.label || ''
132343
- })
132344
- if (hasKids) fill(c.children, depth + 1, path)
132345
- })
132346
- }
132347
- fill(this.columns, 0)
132348
- }
132349
-
132350
- return rows
132351
- },
132352
-
132353
- // 处理后的数据(注入小计/总计行)
132388
+ // 处理小计、总计后的最终数据
132354
132389
  processedTableData() {
132355
132390
  if (!this.tableData.length) return []
132356
-
132357
132391
  let data = [...this.tableData]
132358
132392
  const hasSubtotal = this.subtotalConfig && this.subtotalConfig.enabled
132359
132393
  const hasTotal = this.totalConfig && this.totalConfig.enabled
132360
132394
 
132361
132395
  if (!hasSubtotal && !hasTotal) return data
132362
132396
 
132363
- // 找到第一个数据列作为标签列
132364
132397
  const labelColumn = this.findLabelColumn()
132365
-
132366
132398
  let result = []
132367
132399
 
132368
132400
  if (hasSubtotal && this.subtotalConfig.groupBy && this.subtotalConfig.groupBy.length) {
132369
- // 按 groupBy 分组
132370
132401
  const groups = this.groupData(data, this.subtotalConfig.groupBy)
132371
- groups.forEach((groupRows, groupKey) => {
132372
- // 插入数据行
132402
+ groups.forEach((groupRows) => {
132373
132403
  result.push(...groupRows)
132374
- // 插入小计行
132375
- const subtotalRow = this.createSubtotalRow(groupRows, groupKey)
132404
+ const subtotalRow = this.createSubtotalRow(groupRows)
132376
132405
  result.push(subtotalRow)
132377
132406
  })
132378
132407
  } else {
132379
132408
  result = data
132380
132409
  }
132381
132410
 
132382
- // 插入总计行
132383
132411
  if (hasTotal) {
132384
132412
  const totalRow = this.createTotalRow(data)
132385
132413
  result.push(totalRow)
132386
132414
  }
132387
-
132388
132415
  return result
132389
132416
  },
132390
132417
 
132391
- // 虚拟滚动总高度
132392
- virtualTotalHeight() {
132393
- const data = this.processedTableData
132394
- return data.length * this.rowHeight
132395
- },
132396
-
132397
- // 虚拟滚动偏移量
132398
- virtualOffsetY() {
132399
- const start = Math.max(0, this.visibleStartIndex - this.bufferSize)
132400
- return start * this.rowHeight
132401
- },
132402
-
132403
- // 扁平化列配置(处理 children 嵌套)
132418
+ // 扁平化列配置,添加唯一 key
132404
132419
  flattenedColumns() {
132405
132420
  if (this.flattenedColumnsCache.length) return this.flattenedColumnsCache
132406
- const result = []
132407
- const flatten = (cols) => {
132408
- cols.forEach(col => {
132409
- const key = col.prop || col.label || Math.random().toString(36).slice(2)
132410
- result.push({ ...col, _key: key })
132421
+ const assignKeys = (cols, parentPath = '') => {
132422
+ return cols.map((col, index) => {
132423
+ const path = parentPath ? `${parentPath}_${index}` : String(index)
132424
+ const key = col.prop || col.slot || col.label || path
132425
+ const item = { ...col, _key: key }
132426
+ if (col.children && col.children.length) {
132427
+ item.children = assignKeys(col.children, path)
132428
+ }
132429
+ return item
132411
132430
  })
132412
132431
  }
132413
- flatten(this.columns)
132414
- this.flattenedColumnsCache = result
132415
- return result
132416
- },
132417
-
132418
- // 虚拟滚动时的可见数据
132419
- visibleData() {
132420
- const data = this.processedTableData
132421
- if (!this.virtualScroll || data.length === 0) {
132422
- return data
132423
- }
132424
- const start = Math.max(0, this.visibleStartIndex - this.bufferSize)
132425
- const end = Math.min(data.length, this.visibleEndIndex + this.bufferSize)
132426
- return data.slice(start, end)
132432
+ this.flattenedColumnsCache = assignKeys(this.columns)
132433
+ return this.flattenedColumnsCache
132427
132434
  }
132428
132435
  },
132429
132436
 
132430
132437
  watch: {
132431
- tableData: {
132432
- handler() {
132433
- this.spanCache = {}
132434
- this.flattenedColumnsCache = []
132435
- if (this.virtualScroll) {
132436
- this.$nextTick(() => {
132437
- this.measureRowHeight()
132438
- this.updateVisibleRange()
132439
- })
132440
- }
132441
- },
132442
- immediate: false
132438
+ tableData() {
132439
+ this.spanCache = {}
132440
+ this.flattenedColumnsCache = []
132443
132441
  },
132444
-
132445
132442
  columns: {
132446
132443
  handler() {
132447
132444
  this.flattenedColumnsCache = []
132445
+ this.spanCache = {}
132448
132446
  },
132449
132447
  deep: true
132450
132448
  },
132451
-
132452
- virtualScroll(val) {
132453
- if (val) {
132454
- this.$nextTick(() => this.initVirtualScroll())
132455
- } else {
132456
- this.destroyVirtualScroll()
132457
- }
132449
+ groupColumns: {
132450
+ handler() {
132451
+ this.spanCache = {}
132452
+ },
132453
+ deep: true
132458
132454
  }
132459
132455
  },
132460
132456
 
132461
132457
  mounted() {
132462
- if (this.virtualScroll) {
132463
- this.$nextTick(() => this.initVirtualScroll())
132464
- }
132465
- // 监听窗口resize,更新表格宽度
132466
- this.resizeHandler = () => {
132467
- if (this.virtualScroll) {
132468
- this.$nextTick(() => this.updateTableWidth())
132469
- }
132470
- }
132471
- window.addEventListener('resize', this.resizeHandler)
132458
+ this.$nextTick(() => {
132459
+ window.addEventListener('resize', this.handleResize)
132460
+ })
132472
132461
  },
132473
132462
 
132474
132463
  beforeDestroy() {
132475
- this.destroyVirtualScroll()
132476
- window.removeEventListener('resize', this.resizeHandler)
132464
+ window.removeEventListener('resize', this.handleResize)
132477
132465
  },
132478
132466
 
132479
132467
  methods: {
132480
- // ==================== 小计/总计工具函数 ====================
132481
- // 找到第一个数据列(非 selection/index),用于显示"小计"/"总计"标签
132468
+ handleResize() {
132469
+ this.$nextTick(() => {
132470
+ this.$refs.table && this.$refs.table.doLayout()
132471
+ })
132472
+ },
132473
+
132474
+ // ========== 小计 / 总计 相关 ==========
132482
132475
  findLabelColumn() {
132483
132476
  for (const col of this.columns) {
132484
132477
  if (col.children && col.children.length) {
@@ -132492,33 +132485,25 @@ var external_ElementUI_ = __webpack_require__("5f72");
132492
132485
  return { prop: '', label: '' }
132493
132486
  },
132494
132487
 
132495
- // 按指定字段分组(保持分组顺序)
132496
132488
  groupData(data, groupBy) {
132497
132489
  const map = new Map()
132498
132490
  data.forEach(row => {
132499
132491
  const key = groupBy.map(f => row[f]).join('|||')
132500
- if (!map.has(key)) {
132501
- map.set(key, [])
132502
- }
132492
+ if (!map.has(key)) map.set(key, [])
132503
132493
  map.get(key).push(row)
132504
132494
  })
132505
132495
  return map
132506
132496
  },
132507
132497
 
132508
- // 计算单列的聚合值
132509
132498
  _calcValue(rows, calc) {
132510
- // 自定义函数
132511
132499
  if (typeof calc === 'function') return calc(rows)
132512
-
132513
- // 字符串:'sum' | 'avg' | 'count' | 'min' | 'max'(需配合 prop 使用)
132514
-
132515
- // 对象:{ prop: 'field', type: 'sum' } 或 { prop: 'field' } (默认 sum)
132516
132500
  const prop = calc.prop
132517
132501
  const type = calc.type || 'sum'
132518
132502
  const vals = prop ? rows.map(r => parseFloat(r[prop]) || 0) : []
132519
132503
  switch (type) {
132520
132504
  case 'sum': return vals.reduce((s, v) => s + v, 0)
132521
- case 'avg': case 'average': return vals.length ? (vals.reduce((s, v) => s + v, 0) / vals.length) : 0
132505
+ case 'avg':
132506
+ case 'average': return vals.length ? vals.reduce((s, v) => s + v, 0) / vals.length : 0
132522
132507
  case 'count': return rows.length
132523
132508
  case 'min': return vals.length ? Math.min(...vals) : 0
132524
132509
  case 'max': return vals.length ? Math.max(...vals) : 0
@@ -132526,20 +132511,16 @@ var external_ElementUI_ = __webpack_require__("5f72");
132526
132511
  }
132527
132512
  },
132528
132513
 
132529
- // 创建小计行
132530
- createSubtotalRow(groupRows, groupKey) {
132514
+ createSubtotalRow(groupRows) {
132531
132515
  const config = this.subtotalConfig
132532
132516
  const rawLabelProp = this.findLabelColumn()
132533
-
132534
- // 获取第一个 groupBy 列的值显示
132535
132517
  const labelField = config.groupBy ? config.groupBy[0] : ''
132536
- const groupValue = groupRows[0] ? groupRows[0][labelField] : groupKey
132518
+ const groupValue = groupRows[0] ? groupRows[0][labelField] : ''
132537
132519
  const labelText = config.labelText || `${groupValue} 小计`
132538
132520
 
132539
- const row = { _rowType: 'subtotal', _groupKey: groupKey }
132521
+ const row = { _rowType: 'subtotal' }
132540
132522
  row[rawLabelProp.prop] = labelText
132541
132523
 
132542
- // 计算各列的聚合值
132543
132524
  if (config.columns) {
132544
132525
  Object.keys(config.columns).forEach(prop => {
132545
132526
  const calc = config.columns[prop]
@@ -132548,11 +132529,9 @@ var external_ElementUI_ = __webpack_require__("5f72");
132548
132529
  : this._calcValue(groupRows, calc)
132549
132530
  })
132550
132531
  }
132551
-
132552
132532
  return row
132553
132533
  },
132554
132534
 
132555
- // 创建总计行
132556
132535
  createTotalRow(allRows) {
132557
132536
  const config = this.totalConfig
132558
132537
  const rawLabelProp = this.findLabelColumn()
@@ -132561,7 +132540,6 @@ var external_ElementUI_ = __webpack_require__("5f72");
132561
132540
  const row = { _rowType: 'total' }
132562
132541
  row[rawLabelProp.prop] = labelText
132563
132542
 
132564
- // 计算各列的聚合值
132565
132543
  if (config.columns) {
132566
132544
  Object.keys(config.columns).forEach(prop => {
132567
132545
  const calc = config.columns[prop]
@@ -132570,55 +132548,40 @@ var external_ElementUI_ = __webpack_require__("5f72");
132570
132548
  : this._calcValue(allRows, calc)
132571
132549
  })
132572
132550
  }
132573
-
132574
132551
  return row
132575
132552
  },
132576
132553
 
132577
- // 行类名(小计/总计行样式)
132578
132554
  getRowClassName({ row }) {
132579
- if (!row) return ''
132580
132555
  if (row._rowType === 'subtotal') return 'ex-table-row-subtotal'
132581
132556
  if (row._rowType === 'total') return 'ex-table-row-total'
132582
132557
  return ''
132583
132558
  },
132584
132559
 
132585
- // ==================== 列配置 ====================
132560
+ // ========== 列处理 ==========
132586
132561
  getColumnProps(col) {
132587
132562
  const { _key, children, render, formatter, slot, ...props } = col
132588
132563
  return props
132589
132564
  },
132590
132565
 
132591
- // ==================== 序号方法 ====================
132592
132566
  indexMethod(index) {
132593
- if (this.virtualScroll && this.visibleData.length > 0) {
132594
- const row = this.visibleData[index]
132595
- if (row && row._realIndex !== undefined) {
132596
- return row._realIndex + 1
132597
- }
132598
- }
132599
132567
  return index + 1
132600
132568
  },
132601
132569
 
132602
- // ==================== 分组合并 ====================
132570
+ // ========== 合并单元格 ==========
132603
132571
  handleSpanMethod({ row, column, rowIndex }) {
132604
- // 跳过小计/总计行,不做合并
132605
132572
  if (row._rowType === 'subtotal' || row._rowType === 'total') {
132606
132573
  return { rowspan: 1, colspan: 1 }
132607
132574
  }
132608
-
132609
132575
  if (!this.groupColumns.length) return { rowspan: 1, colspan: 1 }
132610
132576
 
132611
- const data = this.virtualScroll ? this.visibleData : this.processedTableData
132577
+ const data = this.processedTableData
132612
132578
  const prop = column.property
132613
132579
  const groupIndex = this.groupColumns.indexOf(prop)
132614
-
132615
132580
  if (groupIndex === -1) return { rowspan: 1, colspan: 1 }
132616
132581
 
132617
- // 检查缓存
132618
132582
  const cacheKey = `${rowIndex}_${prop}`
132619
132583
  if (this.spanCache[cacheKey]) return this.spanCache[cacheKey]
132620
132584
 
132621
- // 判断当前行是否与前一行在分组列上完全相同
132622
132585
  if (rowIndex > 0) {
132623
132586
  const prevRow = data[rowIndex - 1]
132624
132587
  let isSame = true
@@ -132630,161 +132593,74 @@ var external_ElementUI_ = __webpack_require__("5f72");
132630
132593
  }
132631
132594
  }
132632
132595
  if (isSame) {
132633
- const result = { rowspan: 0, colspan: 1 }
132634
- this.spanCache[cacheKey] = result
132635
- return result
132596
+ const res = { rowspan: 0, colspan: 1 }
132597
+ this.spanCache[cacheKey] = res
132598
+ return res
132636
132599
  }
132637
132600
  }
132638
132601
 
132639
- // 向下扫描计算合并行数
132640
132602
  let count = 1
132641
132603
  for (let i = rowIndex + 1; i < data.length; i++) {
132642
132604
  const nextRow = data[i]
132643
- let isSame = true
132605
+ let same = true
132644
132606
  for (let j = 0; j <= groupIndex; j++) {
132645
132607
  const gp = this.groupColumns[j]
132646
132608
  if (nextRow[gp] !== row[gp]) {
132647
- isSame = false
132609
+ same = false
132648
132610
  break
132649
132611
  }
132650
132612
  }
132651
- if (isSame) {
132652
- count++
132653
- } else {
132654
- break
132655
- }
132613
+ if (same) count++
132614
+ else break
132656
132615
  }
132657
132616
 
132658
- const result = { rowspan: count > 1 ? count : 1, colspan: 1 }
132659
- this.spanCache[cacheKey] = result
132660
- return result
132617
+ const res = { rowspan: count > 1 ? count : 1, colspan: 1 }
132618
+ this.spanCache[cacheKey] = res
132619
+ return res
132661
132620
  },
132662
132621
 
132663
- // ==================== 选择 ====================
132622
+ // ========== 选择、排序、分页 ==========
132664
132623
  handleSelectionChange(rows) {
132665
- // 过滤掉小计/总计行
132666
132624
  this.selectedRows = rows.filter(r => !r._rowType)
132667
132625
  this.$emit('selection-change', this.selectedRows)
132668
132626
  },
132669
-
132670
- // ==================== 排序 ====================
132671
- handleSortChange({ prop, order }) {
132672
- this.$emit('sort-change', { prop, order })
132627
+ handleSortChange(info) {
132628
+ this.$emit('sort-change', info)
132673
132629
  },
132674
-
132675
- // ==================== 分页 ====================
132676
132630
  handleSizeChange(size) {
132677
132631
  this.$emit('size-change', size)
132678
132632
  },
132679
-
132680
132633
  handleCurrentChange(page) {
132681
132634
  this.$emit('page-change', page)
132682
132635
  },
132683
132636
 
132684
- // ==================== 公开方法 ====================
132637
+ // ========== 对外暴露方法 ==========
132685
132638
  getSelection() {
132686
132639
  return this.selectedRows
132687
132640
  },
132688
-
132689
132641
  clearSelection() {
132690
132642
  this.$refs.table && this.$refs.table.clearSelection()
132691
132643
  this.selectedRows = []
132692
132644
  },
132693
-
132694
132645
  toggleRowSelection(row, selected) {
132695
132646
  this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
132696
132647
  },
132697
-
132698
132648
  toggleRowsSelection(rows, selected) {
132699
- if (rows && rows.length) {
132700
- rows.forEach(row => {
132701
- this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
132702
- })
132703
- }
132649
+ if (!rows || !rows.length) return
132650
+ rows.forEach(row => {
132651
+ this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
132652
+ })
132704
132653
  },
132705
-
132706
132654
  doLayout() {
132707
132655
  this.$refs.table && this.$refs.table.doLayout()
132708
- },
132709
-
132710
- // 获取列宽度(支持自适应)
132711
- getColumnWidth(col) {
132712
- // 如果有固定宽度,使用固定宽度
132713
- if (col.width) {
132714
- return typeof col.width === 'number' ? col.width : col.width.replace('px', '')
132715
- }
132716
- // 非固定列且虚拟滚动时使用自适应宽度
132717
- if (!col.fixed && this.virtualScroll) {
132718
- return this.autoColumnWidth
132719
- }
132720
- // 默认宽度
132721
- if (col.minWidth) {
132722
- return typeof col.minWidth === 'number' ? col.minWidth : col.minWidth.replace('px', '')
132723
- }
132724
- return 100
132725
- },
132726
-
132727
- // 更新表格宽度(用于自适应列宽计算)
132728
- updateTableWidth() {
132729
- const tableWrapper = this.$refs.tableBody
132730
- if (tableWrapper) {
132731
- this.tableWidth = tableWrapper.offsetWidth || 1000
132732
- }
132733
- },
132734
-
132735
- // ==================== 虚拟滚动 ====================
132736
- initVirtualScroll() {
132737
- this.updateTableWidth()
132738
- this.measureRowHeight()
132739
- if (this.processedTableData.length > 0) {
132740
- this.updateVisibleRange()
132741
- }
132742
- },
132743
-
132744
- measureRowHeight() {
132745
- const el = this.$refs.table && this.$refs.table.$el
132746
- if (!el) return
132747
- const row = el.querySelector('.el-table__row')
132748
- if (row) {
132749
- this.rowHeight = row.offsetHeight || this.rowInitHeight
132750
- }
132751
- },
132752
-
132753
- handleBodyScroll(event) {
132754
- const target = event.target
132755
- this.scrollLeft = target.scrollLeft
132756
- if (this.virtualScroll) {
132757
- this.scrollTop = target.scrollTop
132758
- this.updateVisibleRange()
132759
- }
132760
- },
132761
-
132762
- updateVisibleRange() {
132763
- const totalCount = this.processedTableData.length
132764
- if (totalCount === 0 || this.rowHeight === 0) return
132765
-
132766
- const visibleCount = Math.ceil((this.computedHeight || 400) / this.rowHeight)
132767
-
132768
- this.visibleStartIndex = Math.max(0, Math.floor(this.scrollTop / this.rowHeight))
132769
- this.visibleEndIndex = Math.min(
132770
- totalCount,
132771
- this.visibleStartIndex + visibleCount
132772
- )
132773
- this.visibleCount = visibleCount
132774
- },
132775
-
132776
- destroyVirtualScroll() {
132777
- this.scrollTop = 0
132778
- this.visibleStartIndex = 0
132779
- this.visibleEndIndex = 0
132780
132656
  }
132781
132657
  }
132782
132658
  });
132783
132659
 
132784
132660
  // CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=script&lang=js
132785
132661
  /* harmony default export */ var components_ex_tablevue_type_script_lang_js = (ex_tablevue_type_script_lang_js);
132786
- // EXTERNAL MODULE: ./src/components/ex-table/index.vue?vue&type=style&index=0&id=5be23981&prod&scoped=true&lang=css
132787
- var ex_tablevue_type_style_index_0_id_5be23981_prod_scoped_true_lang_css = __webpack_require__("b2b3");
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");
132788
132664
 
132789
132665
  // CONCATENATED MODULE: ./src/components/ex-table/index.vue
132790
132666
 
@@ -132797,11 +132673,11 @@ var ex_tablevue_type_style_index_0_id_5be23981_prod_scoped_true_lang_css = __web
132797
132673
 
132798
132674
  var ex_table_component = normalizeComponent(
132799
132675
  components_ex_tablevue_type_script_lang_js,
132800
- ex_tablevue_type_template_id_5be23981_scoped_true_render,
132801
- ex_tablevue_type_template_id_5be23981_scoped_true_staticRenderFns,
132676
+ ex_tablevue_type_template_id_f6bc1634_scoped_true_render,
132677
+ ex_tablevue_type_template_id_f6bc1634_scoped_true_staticRenderFns,
132802
132678
  false,
132803
132679
  null,
132804
- "5be23981",
132680
+ "f6bc1634",
132805
132681
  null
132806
132682
 
132807
132683
  )
@@ -132948,6 +132824,43 @@ function registerElementDirectives(Vue, ElementUI) {
132948
132824
  }
132949
132825
  })
132950
132826
  }
132827
+ // CONCATENATED MODULE: ./src/components/ex-table/virtualScrollData.js
132828
+ /**
132829
+ * 生成虚拟滚动演示数据
132830
+ * @param {number} count 数据条数,默认 10000
132831
+ * @returns {Array}
132832
+ */
132833
+ function createVirtualScrollData(count = 10000) {
132834
+ const departments = ['研发部', '产品部', '运营部', '财务部', '市场部']
132835
+ const positions = ['工程师', '产品经理', '运营专员', '财务主管', '市场经理']
132836
+ const statuses = ['在职', '休假', '离职']
132837
+
132838
+ return Array.from({ length: count }, (_, i) => ({
132839
+ id: i + 1,
132840
+ name: `用户${i + 1}`,
132841
+ department: departments[i % departments.length],
132842
+ position: positions[i % positions.length],
132843
+ email: `user${i + 1}@example.com`,
132844
+ phone: `13800138${String(i).padStart(4, '0')}`,
132845
+ address: `北京市朝阳区第${i + 1}号街道`,
132846
+ salary: 5000 + Math.floor(Math.random() * 10000),
132847
+ status: statuses[i % statuses.length]
132848
+ }))
132849
+ }
132850
+
132851
+ /** 虚拟滚动演示列配置 */
132852
+ const virtualScrollColumns = [
132853
+ { prop: 'id', label: 'ID', fixed: 'left', width: 80 },
132854
+ { prop: 'name', label: '姓名', fixed: 'left', width: 120 },
132855
+ { prop: 'department', label: '部门', width: 150 },
132856
+ { prop: 'position', label: '职位', width: 150 },
132857
+ { prop: 'email', label: '邮箱', width: 200 },
132858
+ { prop: 'phone', label: '电话', width: 130 },
132859
+ { prop: 'address', label: '地址', width: 200 },
132860
+ { prop: 'salary', label: '薪资', width: 120 },
132861
+ { prop: 'status', label: '状态', fixed: 'right', width: 100 }
132862
+ ]
132863
+
132951
132864
  // CONCATENATED MODULE: ./src/index.js
132952
132865
  // 导入主题样式(定义 CSS 变量)
132953
132866
 
@@ -132961,10 +132874,10 @@ function registerElementDirectives(Vue, ElementUI) {
132961
132874
 
132962
132875
 
132963
132876
  // ES Module 默认导出需要通过 .default 访问
132964
- const src_utils = utils.default || utils
132877
+ const src_utils_0 = src_utils.default || src_utils
132965
132878
 
132966
132879
  // 从 utils 导入配置管理函数(仅用于存储配置)
132967
- 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
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
132968
132881
 
132969
132882
  // 导入组件
132970
132883
 
@@ -133047,15 +132960,7 @@ const install = function (Vue, options = {}) {
133047
132960
  }
133048
132961
  }
133049
132962
 
133050
- // 导入内部 element-ui 依赖(作为内部依赖,不与外部冲突)
133051
- const ElementUI = __webpack_require__("5f72")
133052
-
133053
- // 注册 ElementUI 的基础组件(用于 ExTable 等封装组件内部使用)
133054
- // 不调用 Vue.use(ElementUI),避免全局污染
133055
- // ex-table 等组件内部会直接使用 element-ui 的组件
133056
-
133057
- // 在开发环境下注册 ElementUI 组件为 Ex 开头(方便文档和示例使用)
133058
- if (false) {}
132963
+ if (false) {}
133059
132964
 
133060
132965
  // 调用统一的注册函数
133061
132966
  }
@@ -133089,6 +132994,9 @@ if (typeof window !== 'undefined' && window.Vue) {
133089
132994
  // ExChart 组件按需导出(使用时需自行安装 echarts 依赖)
133090
132995
 
133091
132996
 
132997
+ // ExTable 虚拟滚动演示数据工具
132998
+
132999
+
133092
133000
  // 导出工具函数和变量
133093
133001
 
133094
133002
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js