xt-element-ui 1.2.2 → 1.2.4

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 (36) hide show
  1. package/lib/index.common.js +1322 -1281
  2. package/lib/index.css +1 -1
  3. package/lib/index.umd.js +1327 -1286
  4. package/lib/index.umd.min.js +5 -5
  5. package/package.json +1 -1
  6. package/src/components/ex-button/index.vue +1 -1
  7. package/src/components/ex-button/style/index.scss +10 -4
  8. package/src/components/ex-chart/ExPie.vue +1 -4
  9. package/src/components/ex-chart/theme/dark.js +15 -13
  10. package/src/components/ex-chart/utils.js +1 -1
  11. package/src/components/ex-page/index.js +2 -0
  12. package/src/components/ex-select-tree/index.js +2 -0
  13. package/src/components/{xt-select-tree → ex-select-tree}/index.vue +1 -1
  14. package/src/components/ex-table/ExTableCell.vue +3 -2
  15. package/src/components/ex-table/VirtualElTable.vue +234 -0
  16. package/src/components/ex-table/index.vue +176 -445
  17. package/src/components/ex-upload/index.js +2 -0
  18. package/src/components/xt-button/index.vue +2 -2
  19. package/src/components/xt-button/style/index.scss +524 -614
  20. package/src/components/xt-card-item/index copy.vue +93 -0
  21. package/src/components/xt-card-item/index.vue +23 -83
  22. package/src/components/xt-card-item/style/index copy.scss +72 -0
  23. package/src/components/xt-card-item/style/index.scss +51 -40
  24. package/src/components/xt-config-provider/index.js +2 -2
  25. package/src/components/xt-config-provider/index.vue +9 -5
  26. package/src/components/xt-text/index.vue +58 -29
  27. package/src/components/xt-text/style/index.scss +13 -13
  28. package/src/styles/css-variables.scss +1 -1
  29. package/src/styles/element-theme.scss +1 -1
  30. package/src/utils/index.js +11 -2
  31. package/src/components/xt-page/index.js +0 -0
  32. package/src/components/xt-select-tree/index.js +0 -0
  33. package/src/components/xt-upload/index.js +0 -2
  34. /package/src/components/{xt-page → ex-page}/index.vue +0 -0
  35. /package/src/components/{xt-upload → ex-upload}/index.vue +0 -0
  36. /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 = {};
@@ -133,6 +133,13 @@ module.exports = isThisHour
133
133
 
134
134
  /***/ }),
135
135
 
136
+ /***/ "0918":
137
+ /***/ (function(module, exports, __webpack_require__) {
138
+
139
+ // extracted by mini-css-extract-plugin
140
+
141
+ /***/ }),
142
+
136
143
  /***/ "0978":
137
144
  /***/ (function(module, exports, __webpack_require__) {
138
145
 
@@ -121184,17 +121191,6 @@ function startOfToday () {
121184
121191
  module.exports = startOfToday
121185
121192
 
121186
121193
 
121187
- /***/ }),
121188
-
121189
- /***/ "3cd7":
121190
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
121191
-
121192
- "use strict";
121193
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_279f5e29_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5ee4");
121194
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_279f5e29_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_279f5e29_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
121195
- /* unused harmony reexport * */
121196
-
121197
-
121198
121194
  /***/ }),
121199
121195
 
121200
121196
  /***/ "3eee":
@@ -121858,6 +121854,13 @@ function isSaturday (dirtyDate) {
121858
121854
  module.exports = isSaturday
121859
121855
 
121860
121856
 
121857
+ /***/ }),
121858
+
121859
+ /***/ "493c":
121860
+ /***/ (function(module, exports, __webpack_require__) {
121861
+
121862
+ // extracted by mini-css-extract-plugin
121863
+
121861
121864
  /***/ }),
121862
121865
 
121863
121866
  /***/ "4f67":
@@ -122162,20 +122165,6 @@ function getHours (dirtyDate) {
122162
122165
  module.exports = getHours
122163
122166
 
122164
122167
 
122165
- /***/ }),
122166
-
122167
- /***/ "5ee4":
122168
- /***/ (function(module, exports, __webpack_require__) {
122169
-
122170
- // extracted by mini-css-extract-plugin
122171
-
122172
- /***/ }),
122173
-
122174
- /***/ "5f72":
122175
- /***/ (function(module, exports) {
122176
-
122177
- module.exports = __WEBPACK_EXTERNAL_MODULE__5f72__;
122178
-
122179
122168
  /***/ }),
122180
122169
 
122181
122170
  /***/ "6254":
@@ -124433,6 +124422,17 @@ function endOfISOYear (dirtyDate) {
124433
124422
  module.exports = endOfISOYear
124434
124423
 
124435
124424
 
124425
+ /***/ }),
124426
+
124427
+ /***/ "8629":
124428
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
124429
+
124430
+ "use strict";
124431
+ /* 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_ExPie_vue_vue_type_style_index_0_id_2412b380_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9a3c");
124432
+ /* 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_ExPie_vue_vue_type_style_index_0_id_2412b380_prod_lang_scss_scoped_true__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_ExPie_vue_vue_type_style_index_0_id_2412b380_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
124433
+ /* unused harmony reexport * */
124434
+
124435
+
124436
124436
  /***/ }),
124437
124437
 
124438
124438
  /***/ "8902":
@@ -124613,13 +124613,6 @@ function getMilliseconds (dirtyDate) {
124613
124613
  module.exports = getMilliseconds
124614
124614
 
124615
124615
 
124616
- /***/ }),
124617
-
124618
- /***/ "8d72":
124619
- /***/ (function(module, exports, __webpack_require__) {
124620
-
124621
- // extracted by mini-css-extract-plugin
124622
-
124623
124616
  /***/ }),
124624
124617
 
124625
124618
  /***/ "902e":
@@ -124811,17 +124804,6 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
124811
124804
  }
124812
124805
 
124813
124806
 
124814
- /***/ }),
124815
-
124816
- /***/ "93f4":
124817
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
124818
-
124819
- "use strict";
124820
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_78d2b726_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b49a");
124821
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_78d2b726_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_78d2b726_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
124822
- /* unused harmony reexport * */
124823
-
124824
-
124825
124807
  /***/ }),
124826
124808
 
124827
124809
  /***/ "942b":
@@ -125068,6 +125050,13 @@ function isThisISOYear (dirtyDate) {
125068
125050
  module.exports = isThisISOYear
125069
125051
 
125070
125052
 
125053
+ /***/ }),
125054
+
125055
+ /***/ "9a3c":
125056
+ /***/ (function(module, exports, __webpack_require__) {
125057
+
125058
+ // extracted by mini-css-extract-plugin
125059
+
125071
125060
  /***/ }),
125072
125061
 
125073
125062
  /***/ "9aaa":
@@ -125175,6 +125164,17 @@ module.exports = isThisMonth
125175
125164
  /* unused harmony reexport * */
125176
125165
 
125177
125166
 
125167
+ /***/ }),
125168
+
125169
+ /***/ "a0ef":
125170
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
125171
+
125172
+ "use strict";
125173
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_f6bc1634_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d661");
125174
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_f6bc1634_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_f6bc1634_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
125175
+ /* unused harmony reexport * */
125176
+
125177
+
125178
125178
  /***/ }),
125179
125179
 
125180
125180
  /***/ "a431":
@@ -125344,6 +125344,17 @@ function isPast (dirtyDate) {
125344
125344
  module.exports = isPast
125345
125345
 
125346
125346
 
125347
+ /***/ }),
125348
+
125349
+ /***/ "ab58":
125350
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
125351
+
125352
+ "use strict";
125353
+ /* 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_a28a77e4_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0918");
125354
+ /* 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_a28a77e4_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_a28a77e4_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
125355
+ /* unused harmony reexport * */
125356
+
125357
+
125347
125358
  /***/ }),
125348
125359
 
125349
125360
  /***/ "abd4":
@@ -125379,6 +125390,17 @@ function isEqual (dirtyLeftDate, dirtyRightDate) {
125379
125390
  module.exports = isEqual
125380
125391
 
125381
125392
 
125393
+ /***/ }),
125394
+
125395
+ /***/ "ac06":
125396
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
125397
+
125398
+ "use strict";
125399
+ /* 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");
125400
+ /* 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__);
125401
+ /* unused harmony reexport * */
125402
+
125403
+
125382
125404
  /***/ }),
125383
125405
 
125384
125406
  /***/ "acc4":
@@ -125537,13 +125559,6 @@ function differenceInISOYears (dirtyDateLeft, dirtyDateRight) {
125537
125559
  module.exports = differenceInISOYears
125538
125560
 
125539
125561
 
125540
- /***/ }),
125541
-
125542
- /***/ "b49a":
125543
- /***/ (function(module, exports, __webpack_require__) {
125544
-
125545
- // extracted by mini-css-extract-plugin
125546
-
125547
125562
  /***/ }),
125548
125563
 
125549
125564
  /***/ "b4c7":
@@ -127050,6 +127065,13 @@ var LRU = (function () {
127050
127065
  /* harmony default export */ __webpack_exports__["a"] = (LRU);
127051
127066
 
127052
127067
 
127068
+ /***/ }),
127069
+
127070
+ /***/ "d661":
127071
+ /***/ (function(module, exports, __webpack_require__) {
127072
+
127073
+ // extracted by mini-css-extract-plugin
127074
+
127053
127075
  /***/ }),
127054
127076
 
127055
127077
  /***/ "d67a":
@@ -127335,17 +127357,6 @@ function subDays (dirtyDate, dirtyAmount) {
127335
127357
  module.exports = subDays
127336
127358
 
127337
127359
 
127338
- /***/ }),
127339
-
127340
- /***/ "e3c3":
127341
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
127342
-
127343
- "use strict";
127344
- /* 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_ExPie_vue_vue_type_style_index_0_id_5100b648_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8d72");
127345
- /* 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_ExPie_vue_vue_type_style_index_0_id_5100b648_prod_lang_scss_scoped_true__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_ExPie_vue_vue_type_style_index_0_id_5100b648_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
127346
- /* unused harmony reexport * */
127347
-
127348
-
127349
127360
  /***/ }),
127350
127361
 
127351
127362
  /***/ "e3db":
@@ -128024,7 +128035,7 @@ __webpack_require__.r(__webpack_exports__);
128024
128035
  __webpack_require__.d(__webpack_exports__, "ExChart", function() { return /* reexport */ components_ex_chart; });
128025
128036
  __webpack_require__.d(__webpack_exports__, "createVirtualScrollData", function() { return /* reexport */ createVirtualScrollData; });
128026
128037
  __webpack_require__.d(__webpack_exports__, "virtualScrollColumns", function() { return /* reexport */ virtualScrollColumns; });
128027
- __webpack_require__.d(__webpack_exports__, "utils", function() { return /* reexport */ src_utils; });
128038
+ __webpack_require__.d(__webpack_exports__, "utils", function() { return /* reexport */ src_utils_0; });
128028
128039
  __webpack_require__.d(__webpack_exports__, "variables", function() { return /* reexport */ variables_export_default.a; });
128029
128040
  __webpack_require__.d(__webpack_exports__, "getConfig", function() { return /* reexport */ src_getConfig; });
128030
128041
  __webpack_require__.d(__webpack_exports__, "setConfig", function() { return /* reexport */ src_setConfig; });
@@ -128063,7 +128074,813 @@ var components = __webpack_require__("d67a");
128063
128074
  var variables_export = __webpack_require__("ad4d");
128064
128075
  var variables_export_default = /*#__PURE__*/__webpack_require__.n(variables_export);
128065
128076
 
128077
+ // CONCATENATED MODULE: ./src/components/ex-chart/theme/white.js
128078
+ /* harmony default export */ var white = ({
128079
+ color: ["#1890ff", "#37c3a4", "#29c0ce", "#6480D7", "#8cce6f", "#3a5dca", "#ffb74d"],
128080
+ backgroundColor: "#ffffff",
128081
+ textStyle: {
128082
+ fontFamily: "Microsoft YaHei, sans-serif"
128083
+ },
128084
+ title: {
128085
+ textStyle: {
128086
+ color: "#333",
128087
+ fontSize: 16
128088
+ },
128089
+ subtextStyle: {
128090
+ color: "#666666",
128091
+ fontSize: 12
128092
+ }
128093
+ },
128094
+ line: {
128095
+ itemStyle: {
128096
+ },
128097
+ lineStyle: {
128098
+ width: 2
128099
+ }
128100
+ },
128101
+ bar: {
128102
+ itemStyle: {
128103
+ borderRadius: 4
128104
+ }
128105
+ },
128106
+ pie: {
128107
+ roseType: "radius",
128108
+ label: {
128109
+ color: "#333"
128110
+ }
128111
+ },
128112
+ radar: {
128113
+ indicator: {
128114
+ color: "#666666"
128115
+ }
128116
+ },
128117
+ map: {
128118
+ label: {
128119
+ color: "#333"
128120
+ },
128121
+ itemStyle: {
128122
+ borderColor: "#fff"
128123
+ }
128124
+ },
128125
+ gauge: {
128126
+ axisLine: {
128127
+ lineStyle: {
128128
+ color: [[1, "#5470c6"]]
128129
+ }
128130
+ }
128131
+ },
128132
+ toolbox: {
128133
+ iconStyle: {
128134
+ borderColor: "#666666"
128135
+ }
128136
+ },
128137
+ xAxis: {
128138
+ axisLine: {
128139
+ lineStyle: {
128140
+ color: "#DFE9EE"
128141
+ }
128142
+ },
128143
+ axisTick: {
128144
+ lineStyle: {
128145
+ color: "#DFE9EE"
128146
+ },
128147
+ show: false
128148
+ }
128149
+ },
128150
+ yAxis: {
128151
+ axisLine: {
128152
+ lineStyle: {
128153
+ color: "#DFE9EE"
128154
+ }
128155
+ },
128156
+ axisTick: {
128157
+ lineStyle: {
128158
+ color: "#DFE9EE"
128159
+ }
128160
+ },
128161
+ splitLine: {
128162
+ show: true,
128163
+ lineStyle: {
128164
+ type: "dashed",
128165
+ color: "#DFE9EE"
128166
+ }
128167
+ }
128168
+ },
128169
+ splitArea: {
128170
+ areaStyle: {
128171
+ color: ["#f7f8fa", "#ffffff"]
128172
+ }
128173
+ },
128174
+ legend: {
128175
+ textStyle: {
128176
+ color: "#333333"
128177
+ }
128178
+ },
128179
+ tooltip: {
128180
+ borderWidth: 1,
128181
+ backgroundColor: "#ffffff",
128182
+ textStyle: {
128183
+ color: "#333333"
128184
+ },
128185
+ trigger: "axis"
128186
+ }
128187
+ });
128188
+
128189
+ // CONCATENATED MODULE: ./src/components/ex-chart/theme/dark.js
128190
+
128191
+
128192
+ /* harmony default export */ var dark = ({
128193
+ color: ["#0de7ff", "#a782ff", "#fcdd60", "#0de7ff", "#ffc5a1", "#6291ae", "#13ce66"],
128194
+ backgroundColor: "#000",
128195
+ textStyle: {
128196
+ fontFamily: "Microsoft YaHei, sans-serif"
128197
+ },
128198
+ title: {
128199
+ textStyle: {
128200
+ color: "#ffffff"
128201
+ },
128202
+ subtextStyle: {
128203
+ color: "#ffffff"
128204
+ }
128205
+ },
128206
+ line: {
128207
+ itemStyle: {
128208
+ },
128209
+ lineStyle: {
128210
+ width: 2
128211
+ }
128212
+ },
128213
+ bar: {
128214
+ itemStyle: {
128215
+ borderRadius: 4
128216
+ }
128217
+ },
128218
+ pie: {
128219
+ roseType: "radius",
128220
+ label: {
128221
+ color: "#ffffff"
128222
+ }
128223
+ },
128224
+ radar: {
128225
+ indicator: {
128226
+ color: "#ffffff"
128227
+ }
128228
+ },
128229
+ map: {
128230
+ label: {
128231
+ color: "#ffffff"
128232
+ },
128233
+ itemStyle: {
128234
+ borderColor: variables_export_default.a.xtColorBorder
128235
+ }
128236
+ },
128237
+ gauge: {
128238
+ axisLine: {
128239
+ lineStyle: {
128240
+ color: [[1, "#5470c6"]]
128241
+ }
128242
+ }
128243
+ },
128244
+ toolbox: {
128245
+ iconStyle: {
128246
+ borderColor: "#ffffff"
128247
+ }
128248
+ },
128249
+ axisLine: {
128250
+ lineStyle: {
128251
+ color: "#DCDFE6"
128252
+ }
128253
+ },
128254
+ axisTick: {
128255
+ lineStyle: {
128256
+ color: "#DCDFE6"
128257
+ }
128258
+ },
128259
+ splitLine: {
128260
+ lineStyle: {
128261
+ color: "#ebeef5"
128262
+ }
128263
+ },
128264
+ splitArea: {
128265
+ areaStyle: {
128266
+ color: ["#666666", "#666666"]
128267
+ }
128268
+ },
128269
+ legend: {
128270
+ textStyle: {
128271
+ color: "#ffffff"
128272
+ }
128273
+ },
128274
+ tooltip: {
128275
+ backgroundColor: variables_export_default.a.xtColorBgOverlay,
128276
+ borderColor: variables_export_default.a.xtColorBorder,
128277
+ borderWidth: 1,
128278
+ textStyle: {
128279
+ color: "#fff"
128280
+ }
128281
+ }
128282
+ });
128283
+
128284
+ // CONCATENATED MODULE: ./src/components/ex-chart/theme/blue.js
128285
+ /* harmony default export */ var blue = ({
128286
+ color: ["#2CDEB3", "#A17EE6", "#E57E40", "#409EFF"],
128287
+ backgroundColor: "#ffffff",
128288
+ textStyle: {
128289
+ fontFamily: "Microsoft YaHei, sans-serif"
128290
+ },
128291
+ title: {
128292
+ textStyle: {
128293
+ color: "#333"
128294
+ },
128295
+ subtextStyle: {
128296
+ color: "#666666"
128297
+ }
128298
+ },
128299
+ line: {
128300
+ itemStyle: {
128301
+ },
128302
+ lineStyle: {
128303
+ width: 2
128304
+ }
128305
+ },
128306
+ bar: {
128307
+ itemStyle: {
128308
+ borderRadius: 4
128309
+ }
128310
+ },
128311
+ pie: {
128312
+ roseType: "radius",
128313
+ label: {
128314
+ color: "#333"
128315
+ }
128316
+ },
128317
+ radar: {
128318
+ indicator: {
128319
+ color: "#666666"
128320
+ }
128321
+ },
128322
+ map: {
128323
+ label: {
128324
+ color: "#333"
128325
+ },
128326
+ itemStyle: {
128327
+ borderColor: "#fff"
128328
+ }
128329
+ },
128330
+ gauge: {
128331
+ axisLine: {
128332
+ lineStyle: {
128333
+ color: [[1, "#5470c6"]]
128334
+ }
128335
+ }
128336
+ },
128337
+ toolbox: {
128338
+ iconStyle: {
128339
+ borderColor: "#666666"
128340
+ }
128341
+ },
128342
+ axisLine: {
128343
+ lineStyle: {
128344
+ color: "#DCDFE6"
128345
+ }
128346
+ },
128347
+ axisTick: {
128348
+ lineStyle: {
128349
+ color: "#DCDFE6"
128350
+ }
128351
+ },
128352
+ splitLine: {
128353
+ lineStyle: {
128354
+ color: "#ebeef5"
128355
+ }
128356
+ },
128357
+ splitArea: {
128358
+ areaStyle: {
128359
+ color: ["#f7f8fa", "#ffffff"]
128360
+ }
128361
+ },
128362
+ legend: {
128363
+ textStyle: {
128364
+ color: "#666"
128365
+ }
128366
+ },
128367
+ tooltip: {
128368
+ backgroundColor: "rgba(255, 255, 255, 0.95)",
128369
+ borderColor: "#DCDFE6",
128370
+ borderWidth: 1,
128371
+ textStyle: {
128372
+ color: "#333"
128373
+ }
128374
+ }
128375
+ });
128376
+
128377
+ // CONCATENATED MODULE: ./src/components/ex-chart/theme/starry.js
128378
+ /* harmony default export */ var starry = ({
128379
+ color: [
128380
+ "#1685a9", // 石青
128381
+ "#21a675", // 松柏绿
128382
+ "#1bd1a5", // 飞燕草蓝
128383
+ "#8c4356", // 绛紫
128384
+ "#0dafc6", // 孔雀蓝
128385
+ "#4b5cc4", // 宝蓝
128386
+ "#758a99", // 墨灰
128387
+ "#cca4e3", // 丁香色
128388
+ "#205277", // 靛青色
128389
+ "#d9b611", // 秋香色
128390
+ "#ff8c31", // 杏红
128391
+ "#9d2933", // 胭脂
128392
+ "#0288c5", // 浅靛青蓝
128393
+ "#44cef6" // 天蓝色
128394
+ ],
128395
+ backgroundColor: "#ffffff",
128396
+ textStyle: {
128397
+ fontFamily: "Microsoft YaHei, sans-serif"
128398
+ },
128399
+ title: {
128400
+ textStyle: {
128401
+ color: "#333"
128402
+ },
128403
+ subtextStyle: {
128404
+ color: "#666666"
128405
+ }
128406
+ },
128407
+ line: {
128408
+ itemStyle: {
128409
+ },
128410
+ lineStyle: {
128411
+ width: 2
128412
+ }
128413
+ },
128414
+ bar: {
128415
+ itemStyle: {
128416
+ borderRadius: 4
128417
+ }
128418
+ },
128419
+ pie: {
128420
+ roseType: "radius",
128421
+ label: {
128422
+ color: "#333"
128423
+ }
128424
+ },
128425
+ radar: {
128426
+ indicator: {
128427
+ color: "#666666"
128428
+ }
128429
+ },
128430
+ map: {
128431
+ label: {
128432
+ color: "#333"
128433
+ },
128434
+ itemStyle: {
128435
+ borderColor: "#fff"
128436
+ }
128437
+ },
128438
+ gauge: {
128439
+ axisLine: {
128440
+ lineStyle: {
128441
+ color: [[1, "#5470c6"]]
128442
+ }
128443
+ }
128444
+ },
128445
+ toolbox: {
128446
+ iconStyle: {
128447
+ borderColor: "#666666"
128448
+ }
128449
+ },
128450
+ axisLine: {
128451
+ lineStyle: {
128452
+ color: "#DCDFE6"
128453
+ }
128454
+ },
128455
+ axisTick: {
128456
+ lineStyle: {
128457
+ color: "#DCDFE6"
128458
+ }
128459
+ },
128460
+ splitLine: {
128461
+ lineStyle: {
128462
+ color: "#ebeef5"
128463
+ }
128464
+ },
128465
+ splitArea: {
128466
+ areaStyle: {
128467
+ color: ["#f7f8fa", "#ffffff"]
128468
+ }
128469
+ },
128470
+ legend: {
128471
+ textStyle: {
128472
+ color: "#666"
128473
+ }
128474
+ },
128475
+ tooltip: {
128476
+ backgroundColor: "rgba(255, 255, 255, 0.95)",
128477
+ borderColor: "#DCDFE6",
128478
+ borderWidth: 1,
128479
+ textStyle: {
128480
+ color: "#333"
128481
+ }
128482
+ }
128483
+ });
128484
+
128485
+ // CONCATENATED MODULE: ./src/components/ex-chart/theme/orange.js
128486
+ /* harmony default export */ var orange = ({
128487
+ color: ["#e69419", "#A5b4da", "#F8792C", "#97bfb4", "#de747b", "#d6bac0", "#e62737", "#f35969", "#f1ccb0", "#b7394e", "#fe9c1c2"],
128488
+ backgroundColor: "#ffffff",
128489
+ textStyle: {
128490
+ fontFamily: "Microsoft YaHei, sans-serif"
128491
+ },
128492
+ title: {
128493
+ textStyle: {
128494
+ color: "#333"
128495
+ },
128496
+ subtextStyle: {
128497
+ color: "#666666"
128498
+ }
128499
+ },
128500
+ line: {
128501
+ itemStyle: {
128502
+ color: "#e69419"
128503
+ },
128504
+ lineStyle: {
128505
+ width: 2
128506
+ }
128507
+ },
128508
+ bar: {
128509
+ itemStyle: {
128510
+ borderRadius: 4
128511
+ }
128512
+ },
128513
+ pie: {
128514
+ roseType: "radius",
128515
+ label: {
128516
+ color: "#333"
128517
+ }
128518
+ },
128519
+ radar: {
128520
+ indicator: {
128521
+ color: "#666666"
128522
+ }
128523
+ },
128524
+ map: {
128525
+ label: {
128526
+ color: "#333"
128527
+ },
128528
+ itemStyle: {
128529
+ borderColor: "#fff"
128530
+ }
128531
+ },
128532
+ gauge: {
128533
+ axisLine: {
128534
+ lineStyle: {
128535
+ color: [[1, "#5470c6"]]
128536
+ }
128537
+ }
128538
+ },
128539
+ toolbox: {
128540
+ iconStyle: {
128541
+ borderColor: "#666666"
128542
+ }
128543
+ },
128544
+ axisLine: {
128545
+ lineStyle: {
128546
+ color: "#DCDFE6"
128547
+ }
128548
+ },
128549
+ axisTick: {
128550
+ lineStyle: {
128551
+ color: "#DCDFE6"
128552
+ }
128553
+ },
128554
+ splitLine: {
128555
+ lineStyle: {
128556
+ color: "#ebeef5"
128557
+ }
128558
+ },
128559
+ splitArea: {
128560
+ areaStyle: {
128561
+ color: ["#f7f8fa", "#ffffff"]
128562
+ }
128563
+ },
128564
+ legend: {
128565
+ textStyle: {
128566
+ color: "#666"
128567
+ }
128568
+ },
128569
+ tooltip: {
128570
+ backgroundColor: "rgba(255, 255, 255, 0.95)",
128571
+ borderColor: "#DCDFE6",
128572
+ borderWidth: 1,
128573
+ textStyle: {
128574
+ color: "#333"
128575
+ }
128576
+ }
128577
+ });
128578
+
128579
+ // CONCATENATED MODULE: ./src/components/ex-chart/utils.js
128580
+
128581
+
128582
+
128583
+
128584
+
128585
+
128586
+ const themeKeys = {
128587
+ "default": white,
128588
+ "white": white,
128589
+ "dark": dark,
128590
+ "blue": blue,
128591
+ "starry": starry,
128592
+ "orange": orange
128593
+ };
128594
+
128595
+ // echarts 仅在客户端加载,避免 SSR 编译/渲染报错
128596
+ let echarts = null;
128597
+
128598
+ function getEcharts() {
128599
+ if (!echarts && typeof window !== 'undefined') {
128600
+ try {
128601
+ echarts = __webpack_require__("313e");
128602
+ // 注册所有主题
128603
+ for (const key in themeKeys) {
128604
+ echarts.registerTheme(key, themeKeys[key]);
128605
+ }
128606
+ } catch (e) {
128607
+ console.warn('[ExChart] echarts 加载失败:', e.message);
128608
+ }
128609
+ }
128610
+ return echarts;
128611
+ }
128612
+
128613
+ // 字体大小配置
128614
+ const fontSizeMap = {
128615
+ small: {
128616
+ title: 14,
128617
+ subtitle: 11,
128618
+ legend: 11,
128619
+ axisLabel: 10,
128620
+ tooltip: 11,
128621
+ label: 11
128622
+ },
128623
+ medium: {
128624
+ title: 16,
128625
+ subtitle: 12,
128626
+ legend: 12,
128627
+ axisLabel: 12,
128628
+ tooltip: 12,
128629
+ label: 12
128630
+ },
128631
+ large: {
128632
+ title: 18,
128633
+ subtitle: 14,
128634
+ legend: 14,
128635
+ axisLabel: 14,
128636
+ tooltip: 14,
128637
+ label: 14
128638
+ }
128639
+ };
128640
+
128641
+ function EchartsUtil() {}
128642
+
128643
+ EchartsUtil.currentTheme = "default";
128644
+ EchartsUtil.currentSize = "medium";
128645
+ EchartsUtil.inverse = false;
128646
+
128647
+ EchartsUtil.EchartsUtil = {
128648
+ backgroundColor: "transparent",
128649
+ tooltip: {
128650
+ trigger: "axis",
128651
+ borderWidth: 1
128652
+ },
128653
+ legend: {
128654
+ right: 20,
128655
+ top: 0,
128656
+ show: true,
128657
+ textStyle: {
128658
+ fontSize: 12
128659
+ }
128660
+ },
128661
+ grid: {
128662
+ top: "25%",
128663
+ left: "40",
128664
+ right: "15",
128665
+ bottom: "40"
128666
+ },
128667
+ xAxis: {
128668
+ type: "category",
128669
+ boundaryGap: false,
128670
+ axisTick: {
128671
+ show: true,
128672
+ length: 4
128673
+ },
128674
+ axisLabel: {
128675
+ fontSize: 12,
128676
+ interval: 0,
128677
+ formatter: function(value) {
128678
+ return !this.reverse && this.longLable ? value.replace(new RegExp(`(.{${this.longLableSplitNum}})`, "g"), `$1\n`) : value;
128679
+ }
128680
+ }
128681
+ },
128682
+ yAxis: {
128683
+ type: "value",
128684
+ axisTick: {
128685
+ show: false
128686
+ },
128687
+ min: null,
128688
+ max: null,
128689
+ axisLabel: {
128690
+ show: false
128691
+ },
128692
+ splitLine: {
128693
+ lineStyle: {
128694
+ type: "dashed",
128695
+ width: 1
128696
+ }
128697
+ }
128698
+ }
128699
+ };
128700
+
128701
+ EchartsUtil.chartInstanceList = [];
128702
+
128703
+ EchartsUtil.mergeOptions = function(themeOption, customOption) {
128704
+ return Object.assign({}, this.baseOption, themeOption, customOption);
128705
+ };
128706
+
128707
+ // 根据字体大小调整主题配置
128708
+ EchartsUtil.applyFontSize = function(themeOption, size) {
128709
+ const fontSizeConfig = fontSizeMap[size] || fontSizeMap.medium;
128710
+
128711
+ const result = JSON.parse(JSON.stringify(themeOption));
128712
+
128713
+ // 调整标题字体大小
128714
+ if (result.title && result.title.textStyle) {
128715
+ result.title.textStyle.fontSize = fontSizeConfig.title;
128716
+ }
128717
+ if (result.title && result.title.subtextStyle) {
128718
+ result.title.subtextStyle.fontSize = fontSizeConfig.subtitle;
128719
+ }
128720
+
128721
+ // 调整图例字体大小
128722
+ if (result.legend && result.legend.textStyle) {
128723
+ result.legend.textStyle.fontSize = fontSizeConfig.legend;
128724
+ }
128725
+
128726
+ // 调整提示框字体大小
128727
+ if (result.tooltip && result.tooltip.textStyle) {
128728
+ result.tooltip.textStyle.fontSize = fontSizeConfig.tooltip;
128729
+ }
128730
+
128731
+ // 调整饼图标签字体大小
128732
+ if (result.pie && result.pie.label) {
128733
+ if (typeof result.pie.label === 'object') {
128734
+ result.pie.label.fontSize = fontSizeConfig.label;
128735
+ }
128736
+ }
128737
+
128738
+ // 调整雷达图指示器字体大小
128739
+ if (result.radar && result.radar.indicator) {
128740
+ if (typeof result.radar.indicator === 'object' && result.radar.indicator.textStyle) {
128741
+ result.radar.indicator.textStyle.fontSize = fontSizeConfig.label;
128742
+ }
128743
+ }
128744
+
128745
+ // 调整地图标签字体大小
128746
+ if (result.map && result.map.label) {
128747
+ if (typeof result.map.label === 'object') {
128748
+ result.map.label.fontSize = fontSizeConfig.label;
128749
+ }
128750
+ }
128751
+
128752
+ return result;
128753
+ };
128754
+
128755
+ EchartsUtil.init = function(dom, theme, customOption, size) {
128756
+ const ec = getEcharts();
128757
+ // SSR 环境下忽略初始化
128758
+ if (!ec || !dom) return null;
128759
+
128760
+ theme = theme || "default";
128761
+ size = size || "medium";
128762
+ customOption = customOption || {};
128763
+
128764
+ const useTheme = this.currentTheme || theme;
128765
+ const useSize = this.currentSize || size;
128766
+
128767
+ this.currentTheme = useTheme;
128768
+ this.currentSize = useSize;
128769
+
128770
+ let themeOption = themeKeys[useTheme];
128771
+ // 应用字体大小配置
128772
+ themeOption = this.applyFontSize(themeOption, useSize);
128773
+
128774
+ const option = this.mergeOptions(themeOption, customOption);
128775
+
128776
+ const chart = ec.init(dom, useTheme);
128777
+ chart.setOption(option, true);
128778
+
128779
+ this.chartInstanceList.push({
128780
+ dom,
128781
+ chart,
128782
+ customOption,
128783
+ size: useSize
128784
+ });
128785
+
128786
+ this.bindResize(chart);
128787
+ return chart;
128788
+ };
128789
+
128790
+ EchartsUtil.changeSingleTheme = function(dom, chartIns, customOption, newTheme) {
128791
+ const ec = getEcharts();
128792
+ if (!ec || !dom || !chartIns) return;
128793
+
128794
+ customOption = customOption || {};
128795
+ newTheme = newTheme || "default";
128796
+
128797
+ this.currentTheme = newTheme;
128798
+ chartIns.dispose();
128799
+
128800
+ const newChart = ec.init(dom, newTheme, customOption);
128801
+
128802
+ const item = this.chartInstanceList.find(function(v) {
128803
+ return v.dom === dom;
128804
+ });
128805
+
128806
+ if (item) {
128807
+ item.chart = newChart;
128808
+ }
128809
+
128810
+ return newChart;
128811
+ };
128812
+
128813
+ EchartsUtil.changeAllTheme = function(newTheme, newSize) {
128814
+ const ec = getEcharts();
128815
+ if (!ec || !newTheme) return;
128816
+
128817
+ this.currentTheme = newTheme;
128818
+ // 如果传入了新的 size,则更新全局 size
128819
+ if (newSize) {
128820
+ this.currentSize = newSize;
128821
+ }
128822
+
128823
+ this.chartInstanceList.forEach(function(item) {
128824
+ const dom = item.dom;
128825
+ const chart = item.chart;
128826
+ const customOption = item.customOption;
128827
+ // 使用图表自己的 size,如果没有则使用全局 size
128828
+ const useSize = item.size || EchartsUtil.currentSize;
128829
+
128830
+ if (chart) {
128831
+ chart.dispose();
128832
+ }
128833
+
128834
+ const newChart = ec.init(dom, newTheme);
128835
+ let themeOption = themeKeys[newTheme];
128836
+ // 应用字体大小配置
128837
+ themeOption = EchartsUtil.applyFontSize(themeOption, useSize);
128838
+ const option = EchartsUtil.mergeOptions(themeOption, customOption);
128839
+
128840
+ newChart.setOption(option, true);
128841
+ item.chart = newChart;
128842
+ // 更新图表的 size 记录
128843
+ item.size = useSize;
128844
+ EchartsUtil.bindResize(newChart);
128845
+ });
128846
+ };
128847
+
128848
+ EchartsUtil.bindResize = function(chartIns) {
128849
+ if (!chartIns || chartIns.resizeLocked) return;
128850
+
128851
+ window.addEventListener("resize", function() {
128852
+ chartIns.resize();
128853
+ });
128854
+
128855
+ chartIns._resizeLocked = true;
128856
+ };
128857
+
128858
+ EchartsUtil.destroy = function(chartIns) {
128859
+ if (chartIns) {
128860
+ chartIns.dispose();
128861
+ }
128862
+
128863
+ this.chartInstanceList = this.chartInstanceList.filter(function(item) {
128864
+ return item.chart !== chartIns;
128865
+ });
128866
+ };
128867
+
128868
+ EchartsUtil.destroyAll = function() {
128869
+ this.chartInstanceList.forEach(function(item) {
128870
+ if (item.chart) {
128871
+ item.chart.dispose();
128872
+ }
128873
+ });
128874
+
128875
+ this.chartInstanceList = [];
128876
+ };
128877
+
128878
+ /* harmony default export */ var utils = (EchartsUtil);
128879
+
128880
+
128881
+
128066
128882
  // CONCATENATED MODULE: ./src/utils/index.js
128883
+
128067
128884
  // 默认配置
128068
128885
  const defaultConfig = {
128069
128886
  theme: 'white',
@@ -128110,7 +128927,7 @@ const setConfig = function(config) {
128110
128927
  }
128111
128928
 
128112
128929
 
128113
- // 设置主题
128930
+ // 设置主题 并更新图表主题
128114
128931
  const setTheme = function(theme) {
128115
128932
  const validThemes = ['white', 'dark']
128116
128933
  if (!validThemes.includes(theme)) {
@@ -128125,9 +128942,13 @@ const setTheme = function(theme) {
128125
128942
  if (theme === 'dark') {
128126
128943
  root.setAttribute('data-theme', 'dark')
128127
128944
  } else {
128128
- root.removeAttribute('data-theme')
128945
+ root.setAttribute('data-theme', theme)
128129
128946
  }
128130
128947
 
128948
+ // 更新图表主题
128949
+ utils.changeAllTheme(currentConfig.theme, currentConfig.size)
128950
+ console.log('更新图表主题')
128951
+
128131
128952
  emitConfigChange('theme', theme)
128132
128953
  }
128133
128954
 
@@ -128141,6 +128962,10 @@ const setSize = function(size) {
128141
128962
 
128142
128963
  currentConfig.size = size
128143
128964
  document.documentElement.setAttribute('data-size', size)
128965
+ // 更新图表主题
128966
+ utils.changeAllTheme(currentConfig.theme, currentConfig.size)
128967
+ console.log('更新图表字体')
128968
+
128144
128969
  emitConfigChange('size', size)
128145
128970
  }
128146
128971
 
@@ -128245,7 +129070,7 @@ const onConfigChange = function(listener) {
128245
129070
  }
128246
129071
  }
128247
129072
 
128248
- /* harmony default export */ var utils = ({
129073
+ /* harmony default export */ var src_utils = ({
128249
129074
  setTheme,
128250
129075
  setSize,
128251
129076
  setPrimaryColor,
@@ -128258,8 +129083,8 @@ const onConfigChange = function(listener) {
128258
129083
  onConfigChange
128259
129084
  });
128260
129085
 
128261
- // 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
128262
- var render = function render(){var _vm=this,_c=_vm._self._c;return _c('button',{staticClass:"el-button xt-button",class:[
129086
+ // 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=02fecd1e
129087
+ var render = function render(){var _vm=this,_c=_vm._self._c;return _c('button',{staticClass:"xt-button",class:[
128263
129088
  _vm.type ?'xt-button--' + _vm.type: '',
128264
129089
  _vm.size ? 'xt-button--' + _vm.size : '',
128265
129090
  {
@@ -128272,7 +129097,7 @@ var render = function render(){var _vm=this,_c=_vm._self._c;return _c('button',{
128272
129097
  var staticRenderFns = []
128273
129098
 
128274
129099
 
128275
- // CONCATENATED MODULE: ./src/components/xt-button/index.vue?vue&type=template&id=10eba8a7
129100
+ // CONCATENATED MODULE: ./src/components/xt-button/index.vue?vue&type=template&id=02fecd1e
128276
129101
 
128277
129102
  // 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-button/index.vue?vue&type=script&lang=js
128278
129103
 
@@ -128287,7 +129112,7 @@ var staticRenderFns = []
128287
129112
  size: {
128288
129113
  type: String,
128289
129114
  default: '',
128290
- validator: (val) => ['', 'large', 'medium', 'small', 'mini'].includes(val)
129115
+ validator: (val) => ['', 'large', 'medium', 'small'].includes(val)
128291
129116
  },
128292
129117
  plain: {
128293
129118
  type: Boolean,
@@ -128604,71 +129429,29 @@ var xt_card_component = normalizeComponent(
128604
129429
  // CONCATENATED MODULE: ./src/components/xt-card/index.js
128605
129430
 
128606
129431
  /* harmony default export */ var components_xt_card = (xt_card);
128607
- // 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
128608
- 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)
129432
+ // 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=b2553886
129433
+ var xt_card_itemvue_type_template_id_b2553886_render = function render(){var _vm=this,_c=_vm._self._c;return _c('ex-card',{staticClass:"xt-card-item",class:{ [`is-${_vm.type}`]: _vm.type ? true : false},attrs:{"bordered":false}},[_c('xt-text',{attrs:{"bold":"","size":"medium"}},[_vm._v(_vm._s(_vm.title))]),_c('xt-flex-box',[_c('div',{staticStyle:{"width":"50%","margin-bottom":"5px"}},[_c('xt-text',{attrs:{"bold":"","size":"large","format":"thousand","type":_vm.type,"decimals":0},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}}),_c('div',{staticStyle:{"margin":"5px 0"}},[_c('xt-text',{attrs:{"size":"small"}},[_vm._v("较昨日")]),_c('xt-text',{attrs:{"format":"normal","type":_vm.diff > 0 ? 'success' : 'danger',"suffix":_vm.diff > 0 ? '↑' : '↓'},model:{value:(_vm.change),callback:function ($$v) {_vm.change=$$v},expression:"change"}})],1)],1),_c('div',{staticStyle:{"flex":"1","height":"100%"}},[_c('xt-text',{attrs:{"size":"extra-large","type":_vm.type}},[_c('i',{staticClass:"el-icon-user"})])],1)])],1)
128609
129434
  }
128610
- var xt_card_itemvue_type_template_id_4f375226_staticRenderFns = []
129435
+ var xt_card_itemvue_type_template_id_b2553886_staticRenderFns = []
128611
129436
 
128612
129437
 
128613
- // CONCATENATED MODULE: ./src/components/xt-card-item/index.vue?vue&type=template&id=4f375226
129438
+ // CONCATENATED MODULE: ./src/components/xt-card-item/index.vue?vue&type=template&id=b2553886
128614
129439
 
128615
129440
  // 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-card-item/index.vue?vue&type=script&lang=js
128616
129441
 
128617
-
128618
129442
  /* harmony default export */ var xt_card_itemvue_type_script_lang_js = ({
128619
- name: "XtCardItem",
128620
- components: {
128621
- FlexBox: xt_flex_box
128622
- },
128623
- props: {
128624
- iconType: { default: "border" },
128625
- type: { default: "primary" },
128626
- label: {},
128627
- value: {},
128628
- unit: {},
128629
- icon: {},
128630
- iconAt: { default: "right" },
128631
- color: {
128632
- type: String,
128633
- default: ''
128634
- }
128635
- },
128636
- data() {
128637
- return {
128638
- circle: false,
128639
- round: false
128640
- }
128641
- },
128642
- computed: {
128643
- contentAlign() {
128644
- return this.iconAt == 'center' ? 'center' : 'start'
128645
- },
128646
- direction() {
128647
- const iconAtMap = {
128648
- left: 'row',
128649
- right: 'row-reverse',
128650
- top: 'column',
128651
- bottom: 'column-reverse'
128652
- }
128653
- return iconAtMap[this.iconAt]
128654
- },
128655
- cardItemStyle() {
128656
- if (this.iconType === 'border' && this.type === 'primary' && this.color) {
128657
- return {
128658
- '--xt-card-item-color': this.color
128659
- }
128660
- }
128661
- return {}
129443
+ name: "XtCardItem",
129444
+ props: {
129445
+ type: { type: String, default: "primary" },
129446
+ title: { type: String, default: '' },
129447
+ diff: { type: Number, default: 0 },
129448
+ value: { type: Number, default: 0 },
129449
+ change: { type: Number, default: 0 },
128662
129450
  },
128663
- valueStyle() {
128664
- if (this.iconType !== 'border' && this.type === 'primary' && this.color) {
129451
+ data() {
128665
129452
  return {
128666
- color: this.color
128667
129453
  }
128668
- }
128669
- return {}
128670
129454
  }
128671
- }
128672
129455
  });
128673
129456
 
128674
129457
  // CONCATENATED MODULE: ./src/components/xt-card-item/index.vue?vue&type=script&lang=js
@@ -128683,8 +129466,8 @@ var xt_card_itemvue_type_template_id_4f375226_staticRenderFns = []
128683
129466
 
128684
129467
  var xt_card_item_component = normalizeComponent(
128685
129468
  components_xt_card_itemvue_type_script_lang_js,
128686
- xt_card_itemvue_type_template_id_4f375226_render,
128687
- xt_card_itemvue_type_template_id_4f375226_staticRenderFns,
129469
+ xt_card_itemvue_type_template_id_b2553886_render,
129470
+ xt_card_itemvue_type_template_id_b2553886_staticRenderFns,
128688
129471
  false,
128689
129472
  null,
128690
129473
  null,
@@ -128698,6 +129481,7 @@ var xt_card_item_component = normalizeComponent(
128698
129481
  /* harmony default export */ var components_xt_card_item = (xt_card_item);
128699
129482
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-config-provider/index.vue?vue&type=script&lang=js
128700
129483
 
129484
+
128701
129485
  /* harmony default export */ var xt_config_providervue_type_script_lang_js = ({
128702
129486
  name: 'XtConfigProvider',
128703
129487
  inheritAttrs: false,
@@ -128772,9 +129556,9 @@ var xt_card_item_component = normalizeComponent(
128772
129556
  props: {
128773
129557
  theme: {
128774
129558
  type: String,
128775
- default: 'light',
129559
+ default: 'white',
128776
129560
  validator: (value) => {
128777
- return ['light', 'dark', 'auto'].includes(value)
129561
+ return ['white', 'dark', 'auto'].includes(value)
128778
129562
  }
128779
129563
  },
128780
129564
  size: {
@@ -128838,9 +129622,9 @@ var xt_card_item_component = normalizeComponent(
128838
129622
  }
128839
129623
 
128840
129624
  const sizeMap = {
128841
- small: '12px',
128842
- medium: '14px',
128843
- large: '16px'
129625
+ small: '14px',
129626
+ medium: '16px',
129627
+ large: '18px'
128844
129628
  }
128845
129629
  if (sizeMap[this.size]) {
128846
129630
  result['--xt-font-size-base'] = sizeMap[this.size]
@@ -129007,6 +129791,9 @@ var xt_card_item_component = normalizeComponent(
129007
129791
 
129008
129792
  // 设置 data-theme 属性
129009
129793
  element.setAttribute('data-theme', this.theme)
129794
+
129795
+ // 更新图表颜色
129796
+ utils.changeAllTheme(this.theme, this.size, this.primaryColor)
129010
129797
 
129011
129798
  // 触发主题改变钩子(当主题实际发生变化时)
129012
129799
  if (prevTheme !== this.theme && typeof this.onThemeChange === 'function') {
@@ -129049,8 +129836,8 @@ var xt_card_item_component = normalizeComponent(
129049
129836
 
129050
129837
  // CONCATENATED MODULE: ./src/components/xt-config-provider/index.vue?vue&type=script&lang=js
129051
129838
  /* harmony default export */ var components_xt_config_providervue_type_script_lang_js = (xt_config_providervue_type_script_lang_js);
129052
- // EXTERNAL MODULE: ./src/components/xt-config-provider/index.vue?vue&type=style&index=0&id=279f5e29&prod&scoped=true&lang=css
129053
- var xt_config_providervue_type_style_index_0_id_279f5e29_prod_scoped_true_lang_css = __webpack_require__("3cd7");
129839
+ // EXTERNAL MODULE: ./src/components/xt-config-provider/index.vue?vue&type=style&index=0&id=a28a77e4&prod&scoped=true&lang=css
129840
+ var xt_config_providervue_type_style_index_0_id_a28a77e4_prod_scoped_true_lang_css = __webpack_require__("ab58");
129054
129841
 
129055
129842
  // CONCATENATED MODULE: ./src/components/xt-config-provider/index.vue
129056
129843
  var xt_config_provider_render, xt_config_provider_staticRenderFns
@@ -129067,7 +129854,7 @@ var xt_config_provider_component = normalizeComponent(
129067
129854
  xt_config_provider_staticRenderFns,
129068
129855
  false,
129069
129856
  null,
129070
- "279f5e29",
129857
+ "a28a77e4",
129071
129858
  null
129072
129859
 
129073
129860
  )
@@ -129077,18 +129864,18 @@ var xt_config_provider_component = normalizeComponent(
129077
129864
 
129078
129865
  /* harmony default export */ var components_xt_config_provider = (xt_config_provider);
129079
129866
 
129080
- // 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
129081
- var xt_textvue_type_template_id_2b4328b0_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-text",class:[
129867
+ // 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=7df75bea
129868
+ var xt_textvue_type_template_id_7df75bea_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-text",class:[
129082
129869
  _vm.type ? 'xt-text--' + _vm.type : '',
129083
129870
  'xt-text--' + _vm.size,
129084
129871
  { 'xt-text--bold': _vm.bold },
129085
- { 'xt-text--money': _vm.money }
129086
- ],style:(_vm.customStyle)},[_vm._t("default",function(){return [(_vm.money && _vm.displayValue !== undefined)?[_vm._v(_vm._s(_vm.displayValue))]:_vm._e()]})],2)
129872
+ { 'xt-text--money': _vm.format === 'money' }
129873
+ ],style:(_vm.customStyle)},[_vm._t("prefix",function(){return [_vm._v(_vm._s(_vm.prefix))]}),_vm._t("default",function(){return [(_vm.formattedValue !== undefined)?[_vm._v(_vm._s(_vm.formattedValue))]:_vm._e()]}),_vm._t("suffix",function(){return [_vm._v(_vm._s(_vm.suffix))]})],2)
129087
129874
  }
129088
- var xt_textvue_type_template_id_2b4328b0_staticRenderFns = []
129875
+ var xt_textvue_type_template_id_7df75bea_staticRenderFns = []
129089
129876
 
129090
129877
 
129091
- // CONCATENATED MODULE: ./src/components/xt-text/index.vue?vue&type=template&id=2b4328b0
129878
+ // CONCATENATED MODULE: ./src/components/xt-text/index.vue?vue&type=template&id=7df75bea
129092
129879
 
129093
129880
  // 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-text/index.vue?vue&type=script&lang=js
129094
129881
 
@@ -129117,7 +129904,15 @@ var xt_textvue_type_template_id_2b4328b0_staticRenderFns = []
129117
129904
  type: [String, Number],
129118
129905
  default: ''
129119
129906
  },
129120
- // 金额格式化相关属性
129907
+
129908
+ // 格式化模式:normal 普通 | thousand 千分位 | money 金额
129909
+ format: {
129910
+ type: String,
129911
+ default: 'normal',
129912
+ validator: (val) => ['normal', 'thousand', 'money'].includes(val)
129913
+ },
129914
+
129915
+ // 兼容旧属性 money(老项目继续使用)
129121
129916
  money: {
129122
129917
  type: Boolean,
129123
129918
  default: false
@@ -129154,6 +129949,11 @@ var xt_textvue_type_template_id_2b4328b0_staticRenderFns = []
129154
129949
  }
129155
129950
  },
129156
129951
  computed: {
129952
+ // 兼容旧 money 属性:如果传了 money=true,自动切为金额模式
129953
+ realFormat() {
129954
+ return this.money ? 'money' : this.format
129955
+ },
129956
+
129157
129957
  customStyle() {
129158
129958
  const style = {}
129159
129959
  if (this.letterSpacing) {
@@ -129161,39 +129961,53 @@ var xt_textvue_type_template_id_2b4328b0_staticRenderFns = []
129161
129961
  }
129162
129962
  return style
129163
129963
  },
129164
- displayValue() {
129165
- if (!this.money || this.value === '' || this.value === undefined || this.value === null) {
129964
+
129965
+ formattedValue() {
129966
+ const fmt = this.realFormat
129967
+ const { value } = this
129968
+
129969
+ if (value === '' || value === undefined || value === null) {
129166
129970
  return undefined
129167
129971
  }
129168
-
129169
- const numValue = typeof this.value === 'string' ? parseFloat(this.value) : this.value
129170
-
129972
+
129973
+ const numValue = typeof value === 'string' ? parseFloat(value) : value
129171
129974
  if (isNaN(numValue)) {
129172
- return this.value
129975
+ return value
129173
129976
  }
129174
-
129977
+
129175
129978
  try {
129176
- const formatter = new Intl.NumberFormat(this.locale, {
129177
- style: 'currency',
129178
- currency: this.currency,
129179
- minimumFractionDigits: this.decimals,
129180
- maximumFractionDigits: this.decimals,
129181
- signDisplay: this.showSign ? 'always' : 'auto'
129182
- })
129183
-
129184
- let result = formatter.format(numValue)
129185
-
129186
- // 处理前缀和后缀
129187
- if (this.prefix) {
129188
- result = this.prefix + result
129189
- }
129190
- if (this.suffix) {
129191
- result = result + this.suffix
129979
+ let result = ''
129980
+ const signOpt = this.showSign ? 'always' : 'auto'
129981
+
129982
+ switch (fmt) {
129983
+ // 千分位格式化(纯数字)
129984
+ case 'thousand':
129985
+ result = new Intl.NumberFormat(this.locale, {
129986
+ minimumFractionDigits: this.decimals,
129987
+ maximumFractionDigits: this.decimals,
129988
+ signDisplay: signOpt
129989
+ }).format(numValue)
129990
+ break
129991
+
129992
+ // 金额格式化(原有逻辑)
129993
+ case 'money':
129994
+ result = new Intl.NumberFormat(this.locale, {
129995
+ style: 'currency',
129996
+ currency: this.currency,
129997
+ minimumFractionDigits: this.decimals,
129998
+ maximumFractionDigits: this.decimals,
129999
+ signDisplay: signOpt
130000
+ }).format(numValue)
130001
+ break
130002
+
130003
+ // 普通文本,直接返回原值
130004
+ default:
130005
+ return undefined
129192
130006
  }
129193
-
130007
+
129194
130008
  return result
129195
130009
  } catch (e) {
129196
- return this.value
130010
+ return value
129197
130011
  }
129198
130012
  }
129199
130013
  }
@@ -129211,8 +130025,8 @@ var xt_textvue_type_template_id_2b4328b0_staticRenderFns = []
129211
130025
 
129212
130026
  var xt_text_component = normalizeComponent(
129213
130027
  components_xt_textvue_type_script_lang_js,
129214
- xt_textvue_type_template_id_2b4328b0_render,
129215
- xt_textvue_type_template_id_2b4328b0_staticRenderFns,
130028
+ xt_textvue_type_template_id_7df75bea_render,
130029
+ xt_textvue_type_template_id_7df75bea_staticRenderFns,
129216
130030
  false,
129217
130031
  null,
129218
130032
  null,
@@ -129817,13 +130631,13 @@ var xt_date_picker_component = normalizeComponent(
129817
130631
  // CONCATENATED MODULE: ./src/components/xt-date-picker/index.js
129818
130632
 
129819
130633
  /* harmony default export */ var components_xt_date_picker = (xt_date_picker);
129820
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44e6dca7-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-button/index.vue?vue&type=template&id=4c2fec21
129821
- var ex_buttonvue_type_template_id_4c2fec21_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)
130634
+ // 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
130635
+ var ex_buttonvue_type_template_id_1b7e9238_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-button',_vm._b({staticClass:"ex-button",class:_vm.buttonClasses,on:{"click":_vm.handleClick}},'el-button',_vm.$attrs,false),[_vm._t("default")],2)
129822
130636
  }
129823
- var ex_buttonvue_type_template_id_4c2fec21_staticRenderFns = []
130637
+ var ex_buttonvue_type_template_id_1b7e9238_staticRenderFns = []
129824
130638
 
129825
130639
 
129826
- // CONCATENATED MODULE: ./src/components/ex-button/index.vue?vue&type=template&id=4c2fec21
130640
+ // CONCATENATED MODULE: ./src/components/ex-button/index.vue?vue&type=template&id=1b7e9238
129827
130641
 
129828
130642
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-button/index.vue?vue&type=script&lang=js
129829
130643
 
@@ -129852,7 +130666,7 @@ var ex_buttonvue_type_template_id_4c2fec21_staticRenderFns = []
129852
130666
  size: {
129853
130667
  type: String,
129854
130668
  default: null,
129855
- validator: (val) => !val || ['small', 'medium', 'large'].includes(val)
130669
+ validator: (val) => !val || ['mini', 'small', 'medium', 'large'].includes(val)
129856
130670
  }
129857
130671
  },
129858
130672
  data() {
@@ -129895,8 +130709,8 @@ var ex_buttonvue_type_template_id_4c2fec21_staticRenderFns = []
129895
130709
 
129896
130710
  var ex_button_component = normalizeComponent(
129897
130711
  components_ex_buttonvue_type_script_lang_js,
129898
- ex_buttonvue_type_template_id_4c2fec21_render,
129899
- ex_buttonvue_type_template_id_4c2fec21_staticRenderFns,
130712
+ ex_buttonvue_type_template_id_1b7e9238_render,
130713
+ ex_buttonvue_type_template_id_1b7e9238_staticRenderFns,
129900
130714
  false,
129901
130715
  null,
129902
130716
  null,
@@ -129924,809 +130738,6 @@ var ExBarvue_type_template_id_10acd2fc_scoped_true_staticRenderFns = []
129924
130738
 
129925
130739
  // CONCATENATED MODULE: ./src/components/ex-chart/ExBar.vue?vue&type=template&id=10acd2fc&scoped=true
129926
130740
 
129927
- // CONCATENATED MODULE: ./src/components/ex-chart/theme/white.js
129928
- /* harmony default export */ var white = ({
129929
- color: ["#1890ff", "#37c3a4", "#29c0ce", "#6480D7", "#8cce6f", "#3a5dca", "#ffb74d"],
129930
- backgroundColor: "#ffffff",
129931
- textStyle: {
129932
- fontFamily: "Microsoft YaHei, sans-serif"
129933
- },
129934
- title: {
129935
- textStyle: {
129936
- color: "#333",
129937
- fontSize: 16
129938
- },
129939
- subtextStyle: {
129940
- color: "#666666",
129941
- fontSize: 12
129942
- }
129943
- },
129944
- line: {
129945
- itemStyle: {
129946
- },
129947
- lineStyle: {
129948
- width: 2
129949
- }
129950
- },
129951
- bar: {
129952
- itemStyle: {
129953
- borderRadius: 4
129954
- }
129955
- },
129956
- pie: {
129957
- roseType: "radius",
129958
- label: {
129959
- color: "#333"
129960
- }
129961
- },
129962
- radar: {
129963
- indicator: {
129964
- color: "#666666"
129965
- }
129966
- },
129967
- map: {
129968
- label: {
129969
- color: "#333"
129970
- },
129971
- itemStyle: {
129972
- borderColor: "#fff"
129973
- }
129974
- },
129975
- gauge: {
129976
- axisLine: {
129977
- lineStyle: {
129978
- color: [[1, "#5470c6"]]
129979
- }
129980
- }
129981
- },
129982
- toolbox: {
129983
- iconStyle: {
129984
- borderColor: "#666666"
129985
- }
129986
- },
129987
- xAxis: {
129988
- axisLine: {
129989
- lineStyle: {
129990
- color: "#DFE9EE"
129991
- }
129992
- },
129993
- axisTick: {
129994
- lineStyle: {
129995
- color: "#DFE9EE"
129996
- },
129997
- show: false
129998
- }
129999
- },
130000
- yAxis: {
130001
- axisLine: {
130002
- lineStyle: {
130003
- color: "#DFE9EE"
130004
- }
130005
- },
130006
- axisTick: {
130007
- lineStyle: {
130008
- color: "#DFE9EE"
130009
- }
130010
- },
130011
- splitLine: {
130012
- show: true,
130013
- lineStyle: {
130014
- type: "dashed",
130015
- color: "#DFE9EE"
130016
- }
130017
- }
130018
- },
130019
- splitArea: {
130020
- areaStyle: {
130021
- color: ["#f7f8fa", "#ffffff"]
130022
- }
130023
- },
130024
- legend: {
130025
- textStyle: {
130026
- color: "#333333"
130027
- }
130028
- },
130029
- tooltip: {
130030
- borderWidth: 1,
130031
- backgroundColor: "#ffffff",
130032
- textStyle: {
130033
- color: "#333333"
130034
- },
130035
- trigger: "axis"
130036
- }
130037
- });
130038
-
130039
- // CONCATENATED MODULE: ./src/components/ex-chart/theme/dark.js
130040
- /* harmony default export */ var dark = ({
130041
- color: ["#0de7ff", "#a782ff", "#fcdd60", "#0de7ff", "#ffc5a1", "#6291ae", "#13ce66"],
130042
- backgroundColor: "transparent",
130043
- textStyle: {
130044
- fontFamily: "Microsoft YaHei, sans-serif"
130045
- },
130046
- title: {
130047
- textStyle: {
130048
- color: "#333"
130049
- },
130050
- subtextStyle: {
130051
- color: "#666666"
130052
- }
130053
- },
130054
- line: {
130055
- itemStyle: {
130056
- },
130057
- lineStyle: {
130058
- width: 2
130059
- }
130060
- },
130061
- bar: {
130062
- itemStyle: {
130063
- borderRadius: 4
130064
- }
130065
- },
130066
- pie: {
130067
- roseType: "radius",
130068
- label: {
130069
- color: "#333"
130070
- }
130071
- },
130072
- radar: {
130073
- indicator: {
130074
- color: "#666666"
130075
- }
130076
- },
130077
- map: {
130078
- label: {
130079
- color: "#333"
130080
- },
130081
- itemStyle: {
130082
- borderColor: "#fff"
130083
- }
130084
- },
130085
- gauge: {
130086
- axisLine: {
130087
- lineStyle: {
130088
- color: [[1, "#5470c6"]]
130089
- }
130090
- }
130091
- },
130092
- toolbox: {
130093
- iconStyle: {
130094
- borderColor: "#666666"
130095
- }
130096
- },
130097
- axisLine: {
130098
- lineStyle: {
130099
- color: "#DCDFE6"
130100
- }
130101
- },
130102
- axisTick: {
130103
- lineStyle: {
130104
- color: "#DCDFE6"
130105
- }
130106
- },
130107
- splitLine: {
130108
- lineStyle: {
130109
- color: "#ebeef5"
130110
- }
130111
- },
130112
- splitArea: {
130113
- areaStyle: {
130114
- color: ["#f7f8fa", "#ffffff"]
130115
- }
130116
- },
130117
- legend: {
130118
- textStyle: {
130119
- color: "#666"
130120
- }
130121
- },
130122
- tooltip: {
130123
- backgroundColor: "rgba(255, 255, 255, 0.95)",
130124
- borderColor: "#DCDFE6",
130125
- borderWidth: 1,
130126
- textStyle: {
130127
- color: "#333"
130128
- }
130129
- }
130130
- });
130131
-
130132
- // CONCATENATED MODULE: ./src/components/ex-chart/theme/blue.js
130133
- /* harmony default export */ var blue = ({
130134
- color: ["#2CDEB3", "#A17EE6", "#E57E40", "#409EFF"],
130135
- backgroundColor: "#ffffff",
130136
- textStyle: {
130137
- fontFamily: "Microsoft YaHei, sans-serif"
130138
- },
130139
- title: {
130140
- textStyle: {
130141
- color: "#333"
130142
- },
130143
- subtextStyle: {
130144
- color: "#666666"
130145
- }
130146
- },
130147
- line: {
130148
- itemStyle: {
130149
- },
130150
- lineStyle: {
130151
- width: 2
130152
- }
130153
- },
130154
- bar: {
130155
- itemStyle: {
130156
- borderRadius: 4
130157
- }
130158
- },
130159
- pie: {
130160
- roseType: "radius",
130161
- label: {
130162
- color: "#333"
130163
- }
130164
- },
130165
- radar: {
130166
- indicator: {
130167
- color: "#666666"
130168
- }
130169
- },
130170
- map: {
130171
- label: {
130172
- color: "#333"
130173
- },
130174
- itemStyle: {
130175
- borderColor: "#fff"
130176
- }
130177
- },
130178
- gauge: {
130179
- axisLine: {
130180
- lineStyle: {
130181
- color: [[1, "#5470c6"]]
130182
- }
130183
- }
130184
- },
130185
- toolbox: {
130186
- iconStyle: {
130187
- borderColor: "#666666"
130188
- }
130189
- },
130190
- axisLine: {
130191
- lineStyle: {
130192
- color: "#DCDFE6"
130193
- }
130194
- },
130195
- axisTick: {
130196
- lineStyle: {
130197
- color: "#DCDFE6"
130198
- }
130199
- },
130200
- splitLine: {
130201
- lineStyle: {
130202
- color: "#ebeef5"
130203
- }
130204
- },
130205
- splitArea: {
130206
- areaStyle: {
130207
- color: ["#f7f8fa", "#ffffff"]
130208
- }
130209
- },
130210
- legend: {
130211
- textStyle: {
130212
- color: "#666"
130213
- }
130214
- },
130215
- tooltip: {
130216
- backgroundColor: "rgba(255, 255, 255, 0.95)",
130217
- borderColor: "#DCDFE6",
130218
- borderWidth: 1,
130219
- textStyle: {
130220
- color: "#333"
130221
- }
130222
- }
130223
- });
130224
-
130225
- // CONCATENATED MODULE: ./src/components/ex-chart/theme/starry.js
130226
- /* harmony default export */ var starry = ({
130227
- color: [
130228
- "#1685a9", // 石青
130229
- "#21a675", // 松柏绿
130230
- "#1bd1a5", // 飞燕草蓝
130231
- "#8c4356", // 绛紫
130232
- "#0dafc6", // 孔雀蓝
130233
- "#4b5cc4", // 宝蓝
130234
- "#758a99", // 墨灰
130235
- "#cca4e3", // 丁香色
130236
- "#205277", // 靛青色
130237
- "#d9b611", // 秋香色
130238
- "#ff8c31", // 杏红
130239
- "#9d2933", // 胭脂
130240
- "#0288c5", // 浅靛青蓝
130241
- "#44cef6" // 天蓝色
130242
- ],
130243
- backgroundColor: "#ffffff",
130244
- textStyle: {
130245
- fontFamily: "Microsoft YaHei, sans-serif"
130246
- },
130247
- title: {
130248
- textStyle: {
130249
- color: "#333"
130250
- },
130251
- subtextStyle: {
130252
- color: "#666666"
130253
- }
130254
- },
130255
- line: {
130256
- itemStyle: {
130257
- },
130258
- lineStyle: {
130259
- width: 2
130260
- }
130261
- },
130262
- bar: {
130263
- itemStyle: {
130264
- borderRadius: 4
130265
- }
130266
- },
130267
- pie: {
130268
- roseType: "radius",
130269
- label: {
130270
- color: "#333"
130271
- }
130272
- },
130273
- radar: {
130274
- indicator: {
130275
- color: "#666666"
130276
- }
130277
- },
130278
- map: {
130279
- label: {
130280
- color: "#333"
130281
- },
130282
- itemStyle: {
130283
- borderColor: "#fff"
130284
- }
130285
- },
130286
- gauge: {
130287
- axisLine: {
130288
- lineStyle: {
130289
- color: [[1, "#5470c6"]]
130290
- }
130291
- }
130292
- },
130293
- toolbox: {
130294
- iconStyle: {
130295
- borderColor: "#666666"
130296
- }
130297
- },
130298
- axisLine: {
130299
- lineStyle: {
130300
- color: "#DCDFE6"
130301
- }
130302
- },
130303
- axisTick: {
130304
- lineStyle: {
130305
- color: "#DCDFE6"
130306
- }
130307
- },
130308
- splitLine: {
130309
- lineStyle: {
130310
- color: "#ebeef5"
130311
- }
130312
- },
130313
- splitArea: {
130314
- areaStyle: {
130315
- color: ["#f7f8fa", "#ffffff"]
130316
- }
130317
- },
130318
- legend: {
130319
- textStyle: {
130320
- color: "#666"
130321
- }
130322
- },
130323
- tooltip: {
130324
- backgroundColor: "rgba(255, 255, 255, 0.95)",
130325
- borderColor: "#DCDFE6",
130326
- borderWidth: 1,
130327
- textStyle: {
130328
- color: "#333"
130329
- }
130330
- }
130331
- });
130332
-
130333
- // CONCATENATED MODULE: ./src/components/ex-chart/theme/orange.js
130334
- /* harmony default export */ var orange = ({
130335
- color: ["#e69419", "#A5b4da", "#F8792C", "#97bfb4", "#de747b", "#d6bac0", "#e62737", "#f35969", "#f1ccb0", "#b7394e", "#fe9c1c2"],
130336
- backgroundColor: "#ffffff",
130337
- textStyle: {
130338
- fontFamily: "Microsoft YaHei, sans-serif"
130339
- },
130340
- title: {
130341
- textStyle: {
130342
- color: "#333"
130343
- },
130344
- subtextStyle: {
130345
- color: "#666666"
130346
- }
130347
- },
130348
- line: {
130349
- itemStyle: {
130350
- color: "#e69419"
130351
- },
130352
- lineStyle: {
130353
- width: 2
130354
- }
130355
- },
130356
- bar: {
130357
- itemStyle: {
130358
- borderRadius: 4
130359
- }
130360
- },
130361
- pie: {
130362
- roseType: "radius",
130363
- label: {
130364
- color: "#333"
130365
- }
130366
- },
130367
- radar: {
130368
- indicator: {
130369
- color: "#666666"
130370
- }
130371
- },
130372
- map: {
130373
- label: {
130374
- color: "#333"
130375
- },
130376
- itemStyle: {
130377
- borderColor: "#fff"
130378
- }
130379
- },
130380
- gauge: {
130381
- axisLine: {
130382
- lineStyle: {
130383
- color: [[1, "#5470c6"]]
130384
- }
130385
- }
130386
- },
130387
- toolbox: {
130388
- iconStyle: {
130389
- borderColor: "#666666"
130390
- }
130391
- },
130392
- axisLine: {
130393
- lineStyle: {
130394
- color: "#DCDFE6"
130395
- }
130396
- },
130397
- axisTick: {
130398
- lineStyle: {
130399
- color: "#DCDFE6"
130400
- }
130401
- },
130402
- splitLine: {
130403
- lineStyle: {
130404
- color: "#ebeef5"
130405
- }
130406
- },
130407
- splitArea: {
130408
- areaStyle: {
130409
- color: ["#f7f8fa", "#ffffff"]
130410
- }
130411
- },
130412
- legend: {
130413
- textStyle: {
130414
- color: "#666"
130415
- }
130416
- },
130417
- tooltip: {
130418
- backgroundColor: "rgba(255, 255, 255, 0.95)",
130419
- borderColor: "#DCDFE6",
130420
- borderWidth: 1,
130421
- textStyle: {
130422
- color: "#333"
130423
- }
130424
- }
130425
- });
130426
-
130427
- // CONCATENATED MODULE: ./src/components/ex-chart/utils.js
130428
-
130429
-
130430
-
130431
-
130432
-
130433
-
130434
- const themeKeys = {
130435
- "default": white,
130436
- "white": white,
130437
- "dark": dark,
130438
- "blue": blue,
130439
- "starry": starry,
130440
- "orange": orange
130441
- };
130442
-
130443
- // echarts 仅在客户端加载,避免 SSR 编译/渲染报错
130444
- let echarts = null;
130445
-
130446
- function getEcharts() {
130447
- if (!echarts && typeof window !== 'undefined') {
130448
- try {
130449
- echarts = __webpack_require__("313e");
130450
- // 注册所有主题
130451
- for (const key in themeKeys) {
130452
- echarts.registerTheme(key, themeKeys[key]);
130453
- }
130454
- } catch (e) {
130455
- console.warn('[ExChart] echarts 加载失败:', e.message);
130456
- }
130457
- }
130458
- return echarts;
130459
- }
130460
-
130461
- // 字体大小配置
130462
- const fontSizeMap = {
130463
- small: {
130464
- title: 14,
130465
- subtitle: 11,
130466
- legend: 11,
130467
- axisLabel: 10,
130468
- tooltip: 11,
130469
- label: 11
130470
- },
130471
- medium: {
130472
- title: 16,
130473
- subtitle: 12,
130474
- legend: 12,
130475
- axisLabel: 12,
130476
- tooltip: 12,
130477
- label: 12
130478
- },
130479
- large: {
130480
- title: 18,
130481
- subtitle: 14,
130482
- legend: 14,
130483
- axisLabel: 14,
130484
- tooltip: 14,
130485
- label: 14
130486
- }
130487
- };
130488
-
130489
- function EchartsUtil() {}
130490
-
130491
- EchartsUtil.currentTheme = "default";
130492
- EchartsUtil.currentSize = "medium";
130493
- EchartsUtil.inverse = false;
130494
-
130495
- EchartsUtil.baseOption = {
130496
- backgroundColor: "transparent",
130497
- tooltip: {
130498
- trigger: "axis",
130499
- borderWidth: 1
130500
- },
130501
- legend: {
130502
- right: 20,
130503
- top: 0,
130504
- show: true,
130505
- textStyle: {
130506
- fontSize: 12
130507
- }
130508
- },
130509
- grid: {
130510
- top: "25%",
130511
- left: "40",
130512
- right: "15",
130513
- bottom: "40"
130514
- },
130515
- xAxis: {
130516
- type: "category",
130517
- boundaryGap: false,
130518
- axisTick: {
130519
- show: true,
130520
- length: 4
130521
- },
130522
- axisLabel: {
130523
- fontSize: 12,
130524
- interval: 0,
130525
- formatter: function(value) {
130526
- return !this.reverse && this.longLable ? value.replace(new RegExp(`(.{${this.longLableSplitNum}})`, "g"), `$1\n`) : value;
130527
- }
130528
- }
130529
- },
130530
- yAxis: {
130531
- type: "value",
130532
- axisTick: {
130533
- show: false
130534
- },
130535
- min: null,
130536
- max: null,
130537
- axisLabel: {
130538
- show: false
130539
- },
130540
- splitLine: {
130541
- lineStyle: {
130542
- type: "dashed",
130543
- width: 1
130544
- }
130545
- }
130546
- }
130547
- };
130548
-
130549
- EchartsUtil.chartInstanceList = [];
130550
-
130551
- EchartsUtil.mergeOptions = function(themeOption, customOption) {
130552
- return Object.assign({}, this.baseOption, themeOption, customOption);
130553
- };
130554
-
130555
- // 根据字体大小调整主题配置
130556
- EchartsUtil.applyFontSize = function(themeOption, size) {
130557
- const fontSizeConfig = fontSizeMap[size] || fontSizeMap.medium;
130558
-
130559
- const result = JSON.parse(JSON.stringify(themeOption));
130560
-
130561
- // 调整标题字体大小
130562
- if (result.title && result.title.textStyle) {
130563
- result.title.textStyle.fontSize = fontSizeConfig.title;
130564
- }
130565
- if (result.title && result.title.subtextStyle) {
130566
- result.title.subtextStyle.fontSize = fontSizeConfig.subtitle;
130567
- }
130568
-
130569
- // 调整图例字体大小
130570
- if (result.legend && result.legend.textStyle) {
130571
- result.legend.textStyle.fontSize = fontSizeConfig.legend;
130572
- }
130573
-
130574
- // 调整提示框字体大小
130575
- if (result.tooltip && result.tooltip.textStyle) {
130576
- result.tooltip.textStyle.fontSize = fontSizeConfig.tooltip;
130577
- }
130578
-
130579
- // 调整饼图标签字体大小
130580
- if (result.pie && result.pie.label) {
130581
- if (typeof result.pie.label === 'object') {
130582
- result.pie.label.fontSize = fontSizeConfig.label;
130583
- }
130584
- }
130585
-
130586
- // 调整雷达图指示器字体大小
130587
- if (result.radar && result.radar.indicator) {
130588
- if (typeof result.radar.indicator === 'object' && result.radar.indicator.textStyle) {
130589
- result.radar.indicator.textStyle.fontSize = fontSizeConfig.label;
130590
- }
130591
- }
130592
-
130593
- // 调整地图标签字体大小
130594
- if (result.map && result.map.label) {
130595
- if (typeof result.map.label === 'object') {
130596
- result.map.label.fontSize = fontSizeConfig.label;
130597
- }
130598
- }
130599
-
130600
- return result;
130601
- };
130602
-
130603
- EchartsUtil.init = function(dom, theme, customOption, size) {
130604
- const ec = getEcharts();
130605
- // SSR 环境下忽略初始化
130606
- if (!ec || !dom) return null;
130607
-
130608
- theme = theme || "default";
130609
- size = size || "medium";
130610
- customOption = customOption || {};
130611
-
130612
- const useTheme = this.currentTheme || theme;
130613
- const useSize = this.currentSize || size;
130614
-
130615
- this.currentTheme = useTheme;
130616
- this.currentSize = useSize;
130617
-
130618
- let themeOption = themeKeys[useTheme];
130619
- // 应用字体大小配置
130620
- themeOption = this.applyFontSize(themeOption, useSize);
130621
-
130622
- const option = this.mergeOptions(themeOption, customOption);
130623
-
130624
- const chart = ec.init(dom, useTheme);
130625
- chart.setOption(option, true);
130626
-
130627
- this.chartInstanceList.push({
130628
- dom,
130629
- chart,
130630
- customOption,
130631
- size: useSize
130632
- });
130633
-
130634
- this.bindResize(chart);
130635
- return chart;
130636
- };
130637
-
130638
- EchartsUtil.changeSingleTheme = function(dom, chartIns, customOption, newTheme) {
130639
- const ec = getEcharts();
130640
- if (!ec || !dom || !chartIns) return;
130641
-
130642
- customOption = customOption || {};
130643
- newTheme = newTheme || "default";
130644
-
130645
- this.currentTheme = newTheme;
130646
- chartIns.dispose();
130647
-
130648
- const newChart = ec.init(dom, newTheme, customOption);
130649
-
130650
- const item = this.chartInstanceList.find(function(v) {
130651
- return v.dom === dom;
130652
- });
130653
-
130654
- if (item) {
130655
- item.chart = newChart;
130656
- }
130657
-
130658
- return newChart;
130659
- };
130660
-
130661
- EchartsUtil.changeAllTheme = function(newTheme, newSize) {
130662
- const ec = getEcharts();
130663
- if (!ec || !newTheme) return;
130664
-
130665
- this.currentTheme = newTheme;
130666
- // 如果传入了新的 size,则更新全局 size
130667
- if (newSize) {
130668
- this.currentSize = newSize;
130669
- }
130670
-
130671
- this.chartInstanceList.forEach(function(item) {
130672
- const dom = item.dom;
130673
- const chart = item.chart;
130674
- const customOption = item.customOption;
130675
- // 使用图表自己的 size,如果没有则使用全局 size
130676
- const useSize = item.size || EchartsUtil.currentSize;
130677
-
130678
- if (chart) {
130679
- chart.dispose();
130680
- }
130681
-
130682
- const newChart = ec.init(dom, newTheme);
130683
- let themeOption = themeKeys[newTheme];
130684
- // 应用字体大小配置
130685
- themeOption = EchartsUtil.applyFontSize(themeOption, useSize);
130686
- const option = EchartsUtil.mergeOptions(themeOption, customOption);
130687
-
130688
- newChart.setOption(option, true);
130689
- item.chart = newChart;
130690
- // 更新图表的 size 记录
130691
- item.size = useSize;
130692
- EchartsUtil.bindResize(newChart);
130693
- });
130694
- };
130695
-
130696
- EchartsUtil.bindResize = function(chartIns) {
130697
- if (!chartIns || chartIns.resizeLocked) return;
130698
-
130699
- window.addEventListener("resize", function() {
130700
- chartIns.resize();
130701
- });
130702
-
130703
- chartIns._resizeLocked = true;
130704
- };
130705
-
130706
- EchartsUtil.destroy = function(chartIns) {
130707
- if (chartIns) {
130708
- chartIns.dispose();
130709
- }
130710
-
130711
- this.chartInstanceList = this.chartInstanceList.filter(function(item) {
130712
- return item.chart !== chartIns;
130713
- });
130714
- };
130715
-
130716
- EchartsUtil.destroyAll = function() {
130717
- this.chartInstanceList.forEach(function(item) {
130718
- if (item.chart) {
130719
- item.chart.dispose();
130720
- }
130721
- });
130722
-
130723
- this.chartInstanceList = [];
130724
- };
130725
-
130726
- /* harmony default export */ var ex_chart_utils = (EchartsUtil);
130727
-
130728
-
130729
-
130730
130741
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/ExBar.vue?vue&type=script&lang=js
130731
130742
 
130732
130743
 
@@ -130919,7 +130930,7 @@ EchartsUtil.destroyAll = function() {
130919
130930
  if (!this.markPoint) {
130920
130931
  this.$delete(option.series[0], "markPoint");
130921
130932
  }
130922
- this.myChart = ex_chart_utils.init(_self.$refs.barchart, this.theme, option, this.size);
130933
+ this.myChart = utils.init(_self.$refs.barchart, this.theme, option, this.size);
130923
130934
  }
130924
130935
  }
130925
130936
  });
@@ -131093,7 +131104,7 @@ var ExLinevue_type_template_id_386a9c5d_scoped_true_staticRenderFns = []
131093
131104
  }]
131094
131105
  };
131095
131106
 
131096
- this.myChart = ex_chart_utils.init(_self.$refs.linechart, this.theme, option, this.size);
131107
+ this.myChart = utils.init(_self.$refs.linechart, this.theme, option, this.size);
131097
131108
  }
131098
131109
  }
131099
131110
  });
@@ -131124,13 +131135,13 @@ var ExLine_component = normalizeComponent(
131124
131135
  )
131125
131136
 
131126
131137
  /* harmony default export */ var ExLine = (ExLine_component.exports);
131127
- // 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
131128
- 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"})
131138
+ // 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=2412b380&scoped=true
131139
+ var ExPievue_type_template_id_2412b380_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"piechart",staticClass:"pie-box"})
131129
131140
  }
131130
- var ExPievue_type_template_id_5100b648_scoped_true_staticRenderFns = []
131141
+ var ExPievue_type_template_id_2412b380_scoped_true_staticRenderFns = []
131131
131142
 
131132
131143
 
131133
- // CONCATENATED MODULE: ./src/components/ex-chart/ExPie.vue?vue&type=template&id=5100b648&scoped=true
131144
+ // CONCATENATED MODULE: ./src/components/ex-chart/ExPie.vue?vue&type=template&id=2412b380&scoped=true
131134
131145
 
131135
131146
  // 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/ExPie.vue?vue&type=script&lang=js
131136
131147
 
@@ -131235,10 +131246,7 @@ var ExPievue_type_template_id_5100b648_scoped_true_staticRenderFns = []
131235
131246
  legend: this.showLegend ? {
131236
131247
  top: "top",
131237
131248
  right: "20",
131238
- type: "scroll",
131239
- textStyle: {
131240
- color: "#808080"
131241
- }
131249
+ type: "scroll"
131242
131250
  } : null,
131243
131251
  grid: {
131244
131252
  left: 30,
@@ -131280,15 +131288,15 @@ var ExPievue_type_template_id_5100b648_scoped_true_staticRenderFns = []
131280
131288
  })
131281
131289
  }]
131282
131290
  };
131283
- this.myChart = ex_chart_utils.init(_self.$refs.piechart, this.theme, option, this.size);
131291
+ this.myChart = utils.init(_self.$refs.piechart, this.theme, option, this.size);
131284
131292
  }
131285
131293
  }
131286
131294
  });
131287
131295
 
131288
131296
  // CONCATENATED MODULE: ./src/components/ex-chart/ExPie.vue?vue&type=script&lang=js
131289
131297
  /* harmony default export */ var ex_chart_ExPievue_type_script_lang_js = (ExPievue_type_script_lang_js);
131290
- // EXTERNAL MODULE: ./src/components/ex-chart/ExPie.vue?vue&type=style&index=0&id=5100b648&prod&lang=scss&scoped=true
131291
- var ExPievue_type_style_index_0_id_5100b648_prod_lang_scss_scoped_true = __webpack_require__("e3c3");
131298
+ // EXTERNAL MODULE: ./src/components/ex-chart/ExPie.vue?vue&type=style&index=0&id=2412b380&prod&lang=scss&scoped=true
131299
+ var ExPievue_type_style_index_0_id_2412b380_prod_lang_scss_scoped_true = __webpack_require__("8629");
131292
131300
 
131293
131301
  // CONCATENATED MODULE: ./src/components/ex-chart/ExPie.vue
131294
131302
 
@@ -131301,11 +131309,11 @@ var ExPievue_type_style_index_0_id_5100b648_prod_lang_scss_scoped_true = __webpa
131301
131309
 
131302
131310
  var ExPie_component = normalizeComponent(
131303
131311
  ex_chart_ExPievue_type_script_lang_js,
131304
- ExPievue_type_template_id_5100b648_scoped_true_render,
131305
- ExPievue_type_template_id_5100b648_scoped_true_staticRenderFns,
131312
+ ExPievue_type_template_id_2412b380_scoped_true_render,
131313
+ ExPievue_type_template_id_2412b380_scoped_true_staticRenderFns,
131306
131314
  false,
131307
131315
  null,
131308
- "5100b648",
131316
+ "2412b380",
131309
131317
  null
131310
131318
 
131311
131319
  )
@@ -131540,7 +131548,7 @@ var ExMultivue_type_template_id_18661424_scoped_true_staticRenderFns = []
131540
131548
  ],
131541
131549
  series: this.getSeriesData()
131542
131550
  };
131543
- this.myChart = ex_chart_utils.init(_self.$refs.multilinechart, this.theme, option, this.size);
131551
+ this.myChart = utils.init(_self.$refs.multilinechart, this.theme, option, this.size);
131544
131552
  },
131545
131553
  getSeriesData() {
131546
131554
  // 创建 24小时 时间数据填充对象
@@ -131719,7 +131727,7 @@ var ExTrendvue_type_template_id_36cddc14_scoped_true_staticRenderFns = []
131719
131727
  const _self = this;
131720
131728
  // 数据处理
131721
131729
  const option = this.getOption();
131722
- this.myChart = ex_chart_utils.init(_self.$refs.barchart, this.theme, option, this.size);
131730
+ this.myChart = utils.init(_self.$refs.barchart, this.theme, option, this.size);
131723
131731
  }
131724
131732
  }
131725
131733
  });
@@ -132005,13 +132013,13 @@ ex_card.install = function (Vue) {
132005
132013
 
132006
132014
  /* harmony default export */ var components_ex_card = (ex_card);
132007
132015
 
132008
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"44e6dca7-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-table/index.vue?vue&type=template&id=78d2b726&scoped=true
132009
- var ex_tablevue_type_template_id_78d2b726_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.computedHeight)?_c('div',{ref:"fixedHeader",staticClass:"ex-table-fixed-header"},[_c('el-table',{ref:"headerTable",staticClass:"ex-table ex-table-header-only",attrs:{"data":_vm.headerTableData}},[(_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}}):_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 || child.prop},'el-table-column',_vm.getColumnProps(child),false))}),1):_c('el-table-column',_vm._b({key:col._key},'el-table-column',_vm.getColumnProps(col),false))]})],2)],1):_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,"max-height":_vm.computedMaxHeight,"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()])
132016
+ // 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
132017
+ var ex_tablevue_type_template_id_f6bc1634_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"ex-table-wrapper"},[(_vm.title || _vm.$slots.toolbar)?_c('div',{staticClass:"ex-table-header"},[(_vm.title)?_c('span',{staticClass:"ex-table-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_c('div',{staticClass:"ex-table-toolbar"},[_vm._t("toolbar")],2)]):_vm._e(),_c('div',{staticClass:"ex-table-body"},[_c('VirtualElTable',_vm._g(_vm._b({ref:"table",staticClass:"ex-table",attrs:{"data":_vm.processedTableData,"height":_vm.computedHeight,"max-height":_vm.computedMaxHeight,"virtual-scroll":_vm.virtualScroll,"row-height":_vm.rowInitHeight,"buffer-size":_vm.bufferSize,"span-method":_vm.groupColumns.length ? _vm.handleSpanMethod : undefined,"row-class-name":_vm.getRowClassName},on:{"selection-change":_vm.handleSelectionChange,"sort-change":_vm.handleSortChange}},'VirtualElTable',_vm.$attrs,false),_vm.$listeners),[(_vm.selection)?_c('el-table-column',{attrs:{"type":"selection","width":"55","fixed":_vm.selectionFixed}}):_vm._e(),(_vm.showIndex)?_c('el-table-column',{attrs:{"type":"index","width":"60","label":"#","fixed":_vm.indexFixed,"index":_vm.indexMethod}}):_vm._e(),_vm._l((_vm.flattenedColumns),function(col){return [(col.children && col.children.length)?_c('el-table-column',_vm._b({key:col._key},'el-table-column',_vm.getColumnProps(col),false),[_vm._l((col.children),function(child){return [_c('el-table-column',_vm._b({key:child._key,scopedSlots:_vm._u([(child.render)?{key:"default",fn:function(scope){return [_vm._v(_vm._s(child.render(scope)))]}}:(child.formatter)?{key:"default",fn:function(scope){return [_c('ExTableCell',{attrs:{"row":scope.row,"index":scope.$index,"formatter":child.formatter,"column":child}})]}}:(child.slot)?{key:"default",fn:function(scope){return [_vm._t(child.slot,null,{"row":scope.row,"index":scope.$index,"column":child})]}}:null],null,true)},'el-table-column',_vm.getColumnProps(child),false))]})],2):_c('el-table-column',_vm._b({key:col._key,scopedSlots:_vm._u([(col.render)?{key:"default",fn:function(scope){return [_vm._v(_vm._s(col.render(scope)))]}}:(col.formatter)?{key:"default",fn:function(scope){return [_c('ExTableCell',{attrs:{"row":scope.row,"index":scope.$index,"formatter":col.formatter,"column":col}})]}}:(col.slot)?{key:"default",fn:function(scope){return [_vm._t(col.slot,null,{"row":scope.row,"index":scope.$index,"column":col})]}}:null],null,true)},'el-table-column',_vm.getColumnProps(col),false))]})],2)],1),(_vm.showPagination)?_c('div',{staticClass:"ex-table-footer"},[_c('el-pagination',{attrs:{"current-page":_vm.pagination.PageNum,"page-size":_vm.pagination.PageSize,"total":_vm.total,"page-sizes":_vm.pagination.PageSizes || [10, 20, 50, 100],"layout":"total, sizes, prev, pager, next, jumper"},on:{"size-change":_vm.handleSizeChange,"current-change":_vm.handleCurrentChange}})],1):_vm._e()])
132010
132018
  }
132011
- var ex_tablevue_type_template_id_78d2b726_scoped_true_staticRenderFns = []
132019
+ var ex_tablevue_type_template_id_f6bc1634_scoped_true_staticRenderFns = []
132012
132020
 
132013
132021
 
132014
- // CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=template&id=78d2b726&scoped=true
132022
+ // CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=template&id=f6bc1634&scoped=true
132015
132023
 
132016
132024
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-table/ExTableCell.vue?vue&type=script&lang=js
132017
132025
 
@@ -132030,9 +132038,10 @@ var ex_tablevue_type_template_id_78d2b726_scoped_true_staticRenderFns = []
132030
132038
  index: ctx.props.index
132031
132039
  }
132032
132040
  if (ctx.props.column) params.column = ctx.props.column
132033
- const isVnode = (it) => typeof it === 'object' && it.hasOwnProperty('componentOptions')
132041
+ const isVnode = (it) => it !== null && it !== undefined && typeof it === 'object' && it.hasOwnProperty('componentOptions')
132034
132042
  const renderNode = ctx.props.formatter(h, params)
132035
- return isVnode(renderNode) ? renderNode : h('span', renderNode)
132043
+ if (renderNode === null || renderNode === undefined || renderNode === '') return h('span', '')
132044
+ return isVnode(renderNode) ? renderNode : h('span', String(renderNode))
132036
132045
  }
132037
132046
  });
132038
132047
 
@@ -132058,74 +132067,293 @@ var ExTableCell_component = normalizeComponent(
132058
132067
  )
132059
132068
 
132060
132069
  /* harmony default export */ var ExTableCell = (ExTableCell_component.exports);
132061
- // EXTERNAL MODULE: external "ElementUI"
132062
- var external_ElementUI_ = __webpack_require__("5f72");
132070
+ // 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
132071
+ 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)
132072
+ }
132073
+ var VirtualElTablevue_type_template_id_5eb34e1c_scoped_true_staticRenderFns = []
132074
+
132075
+
132076
+ // CONCATENATED MODULE: ./src/components/ex-table/VirtualElTable.vue?vue&type=template&id=5eb34e1c&scoped=true
132077
+
132078
+ // 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
132079
+
132080
+ /* harmony default export */ var VirtualElTablevue_type_script_lang_js = ({
132081
+ name: 'VirtualElTable',
132082
+ inheritAttrs: false,
132083
+
132084
+ props: {
132085
+ virtualScroll: {
132086
+ type: Boolean,
132087
+ default: false
132088
+ },
132089
+ rowHeight: {
132090
+ type: Number,
132091
+ default: 48
132092
+ },
132093
+ bufferSize: {
132094
+ type: Number,
132095
+ default: 5
132096
+ }
132097
+ },
132098
+
132099
+ data() {
132100
+ return {
132101
+ scrollWrap: null,
132102
+ phantomDom: null,
132103
+ scrollTop: 0,
132104
+ // 根据数据量与容器高度预先估算一个合理的 endIndex,避免首屏只渲染 0 行
132105
+ startIndex: 0,
132106
+ endIndex: 20,
132107
+ rafId: null,
132108
+ unwatchPhantom: null,
132109
+ layoutTimer: null,
132110
+ retryTimers: []
132111
+ }
132112
+ },
132113
+
132114
+ computed: {
132115
+ originData() {
132116
+ return this.$attrs.data || []
132117
+ },
132118
+ renderList() {
132119
+ if (!this.virtualScroll) return this.originData
132120
+ const start = Math.max(0, this.startIndex - this.bufferSize)
132121
+ const end = Math.min(this.originData.length, this.endIndex + this.bufferSize)
132122
+ return this.originData.slice(start, end)
132123
+ },
132124
+ totalListHeight() {
132125
+ return this.originData.length * this.rowHeight
132126
+ },
132127
+ contentOffsetY() {
132128
+ return Math.max(0, this.startIndex - this.bufferSize) * this.rowHeight
132129
+ }
132130
+ },
132131
+
132132
+ watch: {
132133
+ renderList() {
132134
+ this.scheduleLayout()
132135
+ },
132136
+ originData: {
132137
+ handler(val) {
132138
+ if (!this.virtualScroll) return
132139
+ if (val && val.length) {
132140
+ this.$nextTick(() => {
132141
+ this.calcVisibleRange()
132142
+ })
132143
+ }
132144
+ }
132145
+ }
132146
+ },
132147
+
132148
+ mounted() {
132149
+ this.$nextTick(() => {
132150
+ this.initVirtualScroll()
132151
+ })
132152
+ },
132153
+
132154
+ beforeDestroy() {
132155
+ this.unbindScrollEvent()
132156
+ if (this.rafId) {
132157
+ cancelAnimationFrame(this.rafId)
132158
+ this.rafId = null
132159
+ }
132160
+ if (this.unwatchPhantom) {
132161
+ this.unwatchPhantom()
132162
+ this.unwatchPhantom = null
132163
+ }
132164
+ if (this.layoutTimer) {
132165
+ clearTimeout(this.layoutTimer)
132166
+ this.layoutTimer = null
132167
+ }
132168
+ this.retryTimers.forEach(t => clearTimeout(t))
132169
+ this.retryTimers = []
132170
+ },
132171
+
132172
+ methods: {
132173
+ initVirtualScroll() {
132174
+ if (!this.virtualScroll) return
132175
+ this.scrollWrap = this.$refs.innerTable.$el.querySelector('.el-table__body-wrapper')
132176
+ if (!this.scrollWrap) {
132177
+ console.warn('[VirtualElTable] 无法找到滚动容器,虚拟滚动功能已禁用')
132178
+ this.virtualScroll = false
132179
+ return
132180
+ }
132181
+
132182
+ this.scrollWrap.style.overflowY = 'auto'
132183
+ this.scrollWrap.style.overflowX = 'auto'
132184
+
132185
+ this.wrapTableBody()
132186
+ this.scrollWrap.addEventListener('scroll', this.onScroll, { passive: true })
132187
+
132188
+ // 首次可见范围计算 + 多次重试:
132189
+ // ElementUI 的 el-table 在 mounted 后仍会异步完成列宽/高度布局,
132190
+ // 单次 $nextTick 可能拿到 clientHeight=0,导致计算失败且无法恢复。
132191
+ // 以递增延迟多次调用,直到 scrollWrap.clientHeight 获得稳定值。
132192
+ this.calcVisibleRange()
132193
+ const delays = [100, 300, 600, 1000]
132194
+ delays.forEach(ms => {
132195
+ const timer = setTimeout(() => {
132196
+ this.calcVisibleRange()
132197
+ }, ms)
132198
+ this.retryTimers.push(timer)
132199
+ })
132200
+ },
132201
+
132202
+ wrapTableBody() {
132203
+ const bodyDom = this.scrollWrap.querySelector('.el-table__body')
132204
+ if (!bodyDom || bodyDom.querySelector('.vs-phantom')) return
132205
+
132206
+ // phantom 采用标准 block 布局:
132207
+ // - height = 总数据高度,确保撑开 body-wrapper 的滚动条
132208
+ // - padding-top = 可见区域偏移量,将 table 推到正确位置
132209
+ // - min-width: 100%(不设 width),允许 table 自然撑开,保证列宽生效
132210
+ const phantom = document.createElement('div')
132211
+ phantom.className = 'vs-phantom'
132212
+ phantom.style.position = 'relative'
132213
+ phantom.style.minWidth = '100%'
132214
+ phantom.style.boxSizing = 'border-box'
132215
+ phantom.style.zIndex = '1'
132216
+ this.phantomDom = phantom
132217
+
132218
+ const table = bodyDom.querySelector('table')
132219
+ phantom.appendChild(table)
132220
+ bodyDom.appendChild(phantom)
132221
+
132222
+ this.unwatchPhantom = this.$watch(
132223
+ ['totalListHeight', 'contentOffsetY'],
132224
+ () => {
132225
+ if (this.phantomDom) {
132226
+ this.phantomDom.style.height = `${this.totalListHeight}px`
132227
+ this.phantomDom.style.paddingTop = `${this.contentOffsetY}px`
132228
+ }
132229
+ },
132230
+ { immediate: true }
132231
+ )
132232
+ },
132233
+
132234
+ onScroll() {
132235
+ this.scrollTop = this.scrollWrap.scrollTop
132236
+ if (this.rafId) return
132237
+ this.rafId = requestAnimationFrame(() => {
132238
+ this.calcVisibleRange()
132239
+ this.rafId = null
132240
+ })
132241
+ },
132242
+
132243
+ calcVisibleRange() {
132244
+ if (!this.scrollWrap) return
132245
+ let viewHeight = this.scrollWrap.clientHeight
132246
+
132247
+ // 关键兜底:ElementUI 异步布局尚未完成时,clientHeight 可能为 0,
132248
+ // 此时用组件接收到的 height / max-height 作为估算值,确保至少能渲染正确数量的行。
132249
+ if (!viewHeight) {
132250
+ const h = this.$attrs.height || this.$attrs.maxHeight
132251
+ if (h) {
132252
+ viewHeight = typeof h === 'number' ? h : parseInt(String(h), 10)
132253
+ }
132254
+ }
132255
+ if (!viewHeight || viewHeight <= 0) return
132256
+
132257
+ const visibleRowCount = Math.ceil(viewHeight / this.rowHeight)
132258
+ const newStart = Math.floor(this.scrollTop / this.rowHeight)
132259
+ const newEnd = Math.min(this.originData.length, newStart + visibleRowCount)
132260
+
132261
+ if (newStart !== this.startIndex || newEnd !== this.endIndex) {
132262
+ this.startIndex = newStart
132263
+ this.endIndex = newEnd
132264
+ }
132265
+ },
132266
+
132267
+ unbindScrollEvent() {
132268
+ if (this.scrollWrap) {
132269
+ this.scrollWrap.removeEventListener('scroll', this.onScroll)
132270
+ }
132271
+ },
132272
+
132273
+ scheduleLayout() {
132274
+ if (this.layoutTimer) return
132275
+ this.layoutTimer = setTimeout(() => {
132276
+ if (this.$refs.innerTable) {
132277
+ this.$refs.innerTable.doLayout()
132278
+ }
132279
+ this.layoutTimer = null
132280
+ }, 0)
132281
+ },
132282
+
132283
+ clearSelection() {
132284
+ return this.$refs.innerTable.clearSelection()
132285
+ },
132286
+ toggleRowSelection() {
132287
+ return this.$refs.innerTable.toggleRowSelection()
132288
+ },
132289
+ doLayout() {
132290
+ return this.$refs.innerTable.doLayout()
132291
+ }
132292
+ }
132293
+ });
132294
+
132295
+ // CONCATENATED MODULE: ./src/components/ex-table/VirtualElTable.vue?vue&type=script&lang=js
132296
+ /* harmony default export */ var ex_table_VirtualElTablevue_type_script_lang_js = (VirtualElTablevue_type_script_lang_js);
132297
+ // EXTERNAL MODULE: ./src/components/ex-table/VirtualElTable.vue?vue&type=style&index=0&id=5eb34e1c&prod&scoped=true&lang=css
132298
+ var VirtualElTablevue_type_style_index_0_id_5eb34e1c_prod_scoped_true_lang_css = __webpack_require__("ac06");
132299
+
132300
+ // CONCATENATED MODULE: ./src/components/ex-table/VirtualElTable.vue
132301
+
132302
+
132303
+
132304
+
132305
+
132306
+
132307
+ /* normalize component */
132308
+
132309
+ var VirtualElTable_component = normalizeComponent(
132310
+ ex_table_VirtualElTablevue_type_script_lang_js,
132311
+ VirtualElTablevue_type_template_id_5eb34e1c_scoped_true_render,
132312
+ VirtualElTablevue_type_template_id_5eb34e1c_scoped_true_staticRenderFns,
132313
+ false,
132314
+ null,
132315
+ "5eb34e1c",
132316
+ null
132317
+
132318
+ )
132063
132319
 
132320
+ /* harmony default export */ var VirtualElTable = (VirtualElTable_component.exports);
132064
132321
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-table/index.vue?vue&type=script&lang=js
132065
132322
 
132066
132323
 
132067
- // 内部导入 element-ui 组件,避免与外部 element-ui 冲突
132068
132324
 
132069
132325
 
132070
132326
  /* harmony default export */ var ex_tablevue_type_script_lang_js = ({
132071
132327
  name: 'ExTable',
132072
132328
  inheritAttrs: false,
132073
- components: { ExTableCell: ExTableCell, ElTable: external_ElementUI_["Table"], ElTableColumn: external_ElementUI_["TableColumn"] },
132329
+ components: { ExTableCell: ExTableCell, VirtualElTable: VirtualElTable },
132330
+
132074
132331
  props: {
132075
- // 表格数据
132076
132332
  tableData: { type: Array, default: () => [] },
132077
- // 列配置(支持 children 多级表头)
132078
132333
  columns: { type: Array, default: () => [] },
132079
- // 分组列配置(按配置的层级合并单元格)
132080
132334
  groupColumns: { type: Array, default: () => [] },
132081
- // 标题
132082
132335
  title: { type: String, default: '' },
132083
- // 高度
132084
132336
  height: { type: [Number, String], default: null },
132085
- // 最大高度(非虚拟滚动时与 height 二选一,均支持固定表头)
132086
132337
  maxHeight: { type: [Number, String], default: null },
132087
- // 虚拟滚动
132088
132338
  virtualScroll: { type: Boolean, default: false },
132089
- // 预估行高
132090
132339
  rowInitHeight: { type: Number, default: 48 },
132091
- // 缓冲区行数
132092
132340
  bufferSize: { type: Number, default: 5 },
132093
- // 分页配置
132094
132341
  pagination: { type: Object, default: null },
132095
- // 总条数
132096
132342
  total: { type: Number, default: 0 },
132097
- // 是否显示序号
132098
132343
  showIndex: { type: Boolean, default: false },
132099
- // 是否可选
132100
132344
  selection: { type: Boolean, default: false },
132101
- // 选择列固定位置
132102
132345
  selectionFixed: { type: [String, Boolean], default: false },
132103
- // 序号列固定位置
132104
132346
  indexFixed: { type: [String, Boolean], default: false },
132105
- // 加载状态
132106
132347
  loading: { type: Boolean, default: false },
132107
- // 空数据文案
132108
132348
  emptyText: { type: String, default: '暂无数据' },
132109
- // 小计配置
132110
132349
  subtotalConfig: { type: Object, default: () => ({ enabled: false }) },
132111
- // 总计配置
132112
132350
  totalConfig: { type: Object, default: () => ({ enabled: false }) }
132113
132351
  },
132114
132352
 
132115
132353
  data() {
132116
132354
  return {
132117
- // 虚拟滚动相关
132118
- scrollTop: 0,
132119
- scrollLeft: 0,
132120
- rowHeight: 48,
132121
- visibleStartIndex: 0,
132122
- visibleEndIndex: 0,
132123
- visibleCount: 0,
132124
- // 分组合并缓存
132125
132355
  spanCache: {},
132126
- // 列扁平化缓存
132127
132356
  flattenedColumnsCache: [],
132128
- // 选中数据
132129
132357
  selectedRows: []
132130
132358
  }
132131
132359
  },
@@ -132134,75 +132362,44 @@ var external_ElementUI_ = __webpack_require__("5f72");
132134
132362
  showPagination() {
132135
132363
  return this.pagination && this.total > 0
132136
132364
  },
132137
-
132138
132365
  computedHeight() {
132139
- if (this.virtualScroll) {
132140
- return this.height || this.maxHeight || 400
132141
- }
132142
132366
  return this.height || undefined
132143
132367
  },
132144
-
132145
132368
  computedMaxHeight() {
132146
- if (this.virtualScroll || this.height) return undefined
132147
- return this.maxHeight || undefined
132148
- },
132149
-
132150
- // 虚拟滚动固定表头占位数据(仅渲染表头,不渲染 body 行)
132151
- headerTableData() {
132152
- return []
132369
+ return this.height ? undefined : this.maxHeight || undefined
132153
132370
  },
132154
132371
 
132155
- // 处理后的数据(注入小计/总计行)
132372
+ // 处理小计、总计后的最终数据
132156
132373
  processedTableData() {
132157
132374
  if (!this.tableData.length) return []
132158
-
132159
132375
  let data = [...this.tableData]
132160
132376
  const hasSubtotal = this.subtotalConfig && this.subtotalConfig.enabled
132161
132377
  const hasTotal = this.totalConfig && this.totalConfig.enabled
132162
132378
 
132163
132379
  if (!hasSubtotal && !hasTotal) return data
132164
132380
 
132165
- // 找到第一个数据列作为标签列
132166
132381
  const labelColumn = this.findLabelColumn()
132167
-
132168
132382
  let result = []
132169
132383
 
132170
132384
  if (hasSubtotal && this.subtotalConfig.groupBy && this.subtotalConfig.groupBy.length) {
132171
- // 按 groupBy 分组
132172
132385
  const groups = this.groupData(data, this.subtotalConfig.groupBy)
132173
- groups.forEach((groupRows, groupKey) => {
132174
- // 插入数据行
132386
+ groups.forEach((groupRows) => {
132175
132387
  result.push(...groupRows)
132176
- // 插入小计行
132177
- const subtotalRow = this.createSubtotalRow(groupRows, groupKey)
132388
+ const subtotalRow = this.createSubtotalRow(groupRows)
132178
132389
  result.push(subtotalRow)
132179
132390
  })
132180
132391
  } else {
132181
132392
  result = data
132182
132393
  }
132183
132394
 
132184
- // 插入总计行
132185
132395
  if (hasTotal) {
132186
132396
  const totalRow = this.createTotalRow(data)
132187
132397
  result.push(totalRow)
132188
132398
  }
132189
-
132190
132399
  return result
132191
132400
  },
132192
132401
 
132193
- // 虚拟滚动总高度
132194
- virtualTotalHeight() {
132195
- const data = this.processedTableData
132196
- return data.length * this.rowHeight
132197
- },
132198
-
132199
- // 虚拟滚动偏移量
132200
- virtualOffsetY() {
132201
- const start = Math.max(0, this.visibleStartIndex - this.bufferSize)
132202
- return start * this.rowHeight
132203
- },
132204
-
132205
- // 扁平化列配置(为每级列补充 _key)
132402
+ // 扁平化列配置,添加唯一 key
132206
132403
  flattenedColumns() {
132207
132404
  if (this.flattenedColumnsCache.length) return this.flattenedColumnsCache
132208
132405
  const assignKeys = (cols, parentPath = '') => {
@@ -132218,91 +132415,47 @@ var external_ElementUI_ = __webpack_require__("5f72");
132218
132415
  }
132219
132416
  this.flattenedColumnsCache = assignKeys(this.columns)
132220
132417
  return this.flattenedColumnsCache
132221
- },
132222
-
132223
- // 虚拟滚动时的可见数据(附带 _realIndex 供序号列使用)
132224
- visibleData() {
132225
- const data = this.processedTableData
132226
- if (!this.virtualScroll || data.length === 0) {
132227
- return data
132228
- }
132229
- const start = Math.max(0, this.visibleStartIndex - this.bufferSize)
132230
- const end = Math.min(data.length, this.visibleEndIndex + this.bufferSize)
132231
- return data.slice(start, end).map((row, i) => ({
132232
- ...row,
132233
- _realIndex: start + i
132234
- }))
132235
132418
  }
132236
132419
  },
132237
132420
 
132238
132421
  watch: {
132239
- tableData: {
132240
- handler() {
132241
- this.spanCache = {}
132242
- this.flattenedColumnsCache = []
132243
- if (this.virtualScroll) {
132244
- this.$nextTick(() => {
132245
- this.measureRowHeight()
132246
- this.updateVisibleRange()
132247
- this.syncTableLayout()
132248
- })
132249
- }
132250
- },
132251
- immediate: false
132422
+ tableData() {
132423
+ this.spanCache = {}
132424
+ this.flattenedColumnsCache = []
132252
132425
  },
132253
-
132254
132426
  columns: {
132255
132427
  handler() {
132256
132428
  this.flattenedColumnsCache = []
132257
- if (this.virtualScroll) {
132258
- this.$nextTick(() => this.syncTableLayout())
132259
- }
132429
+ this.spanCache = {}
132260
132430
  },
132261
132431
  deep: true
132262
132432
  },
132263
-
132264
- height() {
132265
- if (this.virtualScroll) {
132266
- this.$nextTick(() => this.syncTableLayout())
132267
- }
132268
- },
132269
-
132270
- maxHeight() {
132271
- if (this.virtualScroll) {
132272
- this.$nextTick(() => this.syncTableLayout())
132273
- }
132274
- },
132275
-
132276
- virtualScroll(val) {
132277
- if (val) {
132278
- this.$nextTick(() => this.initVirtualScroll())
132279
- } else {
132280
- this.destroyVirtualScroll()
132281
- }
132433
+ groupColumns: {
132434
+ handler() {
132435
+ this.spanCache = {}
132436
+ },
132437
+ deep: true
132282
132438
  }
132283
132439
  },
132284
132440
 
132285
132441
  mounted() {
132286
- if (this.virtualScroll) {
132287
- this.$nextTick(() => this.initVirtualScroll())
132288
- }
132289
- // 监听窗口resize,更新表格宽度
132290
- this.resizeHandler = () => {
132291
- if (this.virtualScroll) {
132292
- this.$nextTick(() => this.syncTableLayout())
132293
- }
132294
- }
132295
- window.addEventListener('resize', this.resizeHandler)
132442
+ this.$nextTick(() => {
132443
+ window.addEventListener('resize', this.handleResize)
132444
+ })
132296
132445
  },
132297
132446
 
132298
132447
  beforeDestroy() {
132299
- this.destroyVirtualScroll()
132300
- window.removeEventListener('resize', this.resizeHandler)
132448
+ window.removeEventListener('resize', this.handleResize)
132301
132449
  },
132302
132450
 
132303
132451
  methods: {
132304
- // ==================== 小计/总计工具函数 ====================
132305
- // 找到第一个数据列(非 selection/index),用于显示"小计"/"总计"标签
132452
+ handleResize() {
132453
+ this.$nextTick(() => {
132454
+ this.$refs.table && this.$refs.table.doLayout()
132455
+ })
132456
+ },
132457
+
132458
+ // ========== 小计 / 总计 相关 ==========
132306
132459
  findLabelColumn() {
132307
132460
  for (const col of this.columns) {
132308
132461
  if (col.children && col.children.length) {
@@ -132316,33 +132469,25 @@ var external_ElementUI_ = __webpack_require__("5f72");
132316
132469
  return { prop: '', label: '' }
132317
132470
  },
132318
132471
 
132319
- // 按指定字段分组(保持分组顺序)
132320
132472
  groupData(data, groupBy) {
132321
132473
  const map = new Map()
132322
132474
  data.forEach(row => {
132323
132475
  const key = groupBy.map(f => row[f]).join('|||')
132324
- if (!map.has(key)) {
132325
- map.set(key, [])
132326
- }
132476
+ if (!map.has(key)) map.set(key, [])
132327
132477
  map.get(key).push(row)
132328
132478
  })
132329
132479
  return map
132330
132480
  },
132331
132481
 
132332
- // 计算单列的聚合值
132333
132482
  _calcValue(rows, calc) {
132334
- // 自定义函数
132335
132483
  if (typeof calc === 'function') return calc(rows)
132336
-
132337
- // 字符串:'sum' | 'avg' | 'count' | 'min' | 'max'(需配合 prop 使用)
132338
-
132339
- // 对象:{ prop: 'field', type: 'sum' } 或 { prop: 'field' } (默认 sum)
132340
132484
  const prop = calc.prop
132341
132485
  const type = calc.type || 'sum'
132342
132486
  const vals = prop ? rows.map(r => parseFloat(r[prop]) || 0) : []
132343
132487
  switch (type) {
132344
132488
  case 'sum': return vals.reduce((s, v) => s + v, 0)
132345
- case 'avg': case 'average': return vals.length ? (vals.reduce((s, v) => s + v, 0) / vals.length) : 0
132489
+ case 'avg':
132490
+ case 'average': return vals.length ? vals.reduce((s, v) => s + v, 0) / vals.length : 0
132346
132491
  case 'count': return rows.length
132347
132492
  case 'min': return vals.length ? Math.min(...vals) : 0
132348
132493
  case 'max': return vals.length ? Math.max(...vals) : 0
@@ -132350,20 +132495,16 @@ var external_ElementUI_ = __webpack_require__("5f72");
132350
132495
  }
132351
132496
  },
132352
132497
 
132353
- // 创建小计行
132354
- createSubtotalRow(groupRows, groupKey) {
132498
+ createSubtotalRow(groupRows) {
132355
132499
  const config = this.subtotalConfig
132356
132500
  const rawLabelProp = this.findLabelColumn()
132357
-
132358
- // 获取第一个 groupBy 列的值显示
132359
132501
  const labelField = config.groupBy ? config.groupBy[0] : ''
132360
- const groupValue = groupRows[0] ? groupRows[0][labelField] : groupKey
132502
+ const groupValue = groupRows[0] ? groupRows[0][labelField] : ''
132361
132503
  const labelText = config.labelText || `${groupValue} 小计`
132362
132504
 
132363
- const row = { _rowType: 'subtotal', _groupKey: groupKey }
132505
+ const row = { _rowType: 'subtotal' }
132364
132506
  row[rawLabelProp.prop] = labelText
132365
132507
 
132366
- // 计算各列的聚合值
132367
132508
  if (config.columns) {
132368
132509
  Object.keys(config.columns).forEach(prop => {
132369
132510
  const calc = config.columns[prop]
@@ -132372,11 +132513,9 @@ var external_ElementUI_ = __webpack_require__("5f72");
132372
132513
  : this._calcValue(groupRows, calc)
132373
132514
  })
132374
132515
  }
132375
-
132376
132516
  return row
132377
132517
  },
132378
132518
 
132379
- // 创建总计行
132380
132519
  createTotalRow(allRows) {
132381
132520
  const config = this.totalConfig
132382
132521
  const rawLabelProp = this.findLabelColumn()
@@ -132385,7 +132524,6 @@ var external_ElementUI_ = __webpack_require__("5f72");
132385
132524
  const row = { _rowType: 'total' }
132386
132525
  row[rawLabelProp.prop] = labelText
132387
132526
 
132388
- // 计算各列的聚合值
132389
132527
  if (config.columns) {
132390
132528
  Object.keys(config.columns).forEach(prop => {
132391
132529
  const calc = config.columns[prop]
@@ -132394,55 +132532,40 @@ var external_ElementUI_ = __webpack_require__("5f72");
132394
132532
  : this._calcValue(allRows, calc)
132395
132533
  })
132396
132534
  }
132397
-
132398
132535
  return row
132399
132536
  },
132400
132537
 
132401
- // 行类名(小计/总计行样式)
132402
132538
  getRowClassName({ row }) {
132403
- if (!row) return ''
132404
132539
  if (row._rowType === 'subtotal') return 'ex-table-row-subtotal'
132405
132540
  if (row._rowType === 'total') return 'ex-table-row-total'
132406
132541
  return ''
132407
132542
  },
132408
132543
 
132409
- // ==================== 列配置 ====================
132544
+ // ========== 列处理 ==========
132410
132545
  getColumnProps(col) {
132411
132546
  const { _key, children, render, formatter, slot, ...props } = col
132412
132547
  return props
132413
132548
  },
132414
132549
 
132415
- // ==================== 序号方法 ====================
132416
132550
  indexMethod(index) {
132417
- if (this.virtualScroll && this.visibleData.length > 0) {
132418
- const row = this.visibleData[index]
132419
- if (row && row._realIndex !== undefined) {
132420
- return row._realIndex + 1
132421
- }
132422
- }
132423
132551
  return index + 1
132424
132552
  },
132425
132553
 
132426
- // ==================== 分组合并 ====================
132554
+ // ========== 合并单元格 ==========
132427
132555
  handleSpanMethod({ row, column, rowIndex }) {
132428
- // 跳过小计/总计行,不做合并
132429
132556
  if (row._rowType === 'subtotal' || row._rowType === 'total') {
132430
132557
  return { rowspan: 1, colspan: 1 }
132431
132558
  }
132432
-
132433
132559
  if (!this.groupColumns.length) return { rowspan: 1, colspan: 1 }
132434
132560
 
132435
- const data = this.virtualScroll ? this.visibleData : this.processedTableData
132561
+ const data = this.processedTableData
132436
132562
  const prop = column.property
132437
132563
  const groupIndex = this.groupColumns.indexOf(prop)
132438
-
132439
132564
  if (groupIndex === -1) return { rowspan: 1, colspan: 1 }
132440
132565
 
132441
- // 检查缓存
132442
132566
  const cacheKey = `${rowIndex}_${prop}`
132443
132567
  if (this.spanCache[cacheKey]) return this.spanCache[cacheKey]
132444
132568
 
132445
- // 判断当前行是否与前一行在分组列上完全相同
132446
132569
  if (rowIndex > 0) {
132447
132570
  const prevRow = data[rowIndex - 1]
132448
132571
  let isSame = true
@@ -132454,156 +132577,74 @@ var external_ElementUI_ = __webpack_require__("5f72");
132454
132577
  }
132455
132578
  }
132456
132579
  if (isSame) {
132457
- const result = { rowspan: 0, colspan: 1 }
132458
- this.spanCache[cacheKey] = result
132459
- return result
132580
+ const res = { rowspan: 0, colspan: 1 }
132581
+ this.spanCache[cacheKey] = res
132582
+ return res
132460
132583
  }
132461
132584
  }
132462
132585
 
132463
- // 向下扫描计算合并行数
132464
132586
  let count = 1
132465
132587
  for (let i = rowIndex + 1; i < data.length; i++) {
132466
132588
  const nextRow = data[i]
132467
- let isSame = true
132589
+ let same = true
132468
132590
  for (let j = 0; j <= groupIndex; j++) {
132469
132591
  const gp = this.groupColumns[j]
132470
132592
  if (nextRow[gp] !== row[gp]) {
132471
- isSame = false
132593
+ same = false
132472
132594
  break
132473
132595
  }
132474
132596
  }
132475
- if (isSame) {
132476
- count++
132477
- } else {
132478
- break
132479
- }
132597
+ if (same) count++
132598
+ else break
132480
132599
  }
132481
132600
 
132482
- const result = { rowspan: count > 1 ? count : 1, colspan: 1 }
132483
- this.spanCache[cacheKey] = result
132484
- return result
132601
+ const res = { rowspan: count > 1 ? count : 1, colspan: 1 }
132602
+ this.spanCache[cacheKey] = res
132603
+ return res
132485
132604
  },
132486
132605
 
132487
- // ==================== 选择 ====================
132606
+ // ========== 选择、排序、分页 ==========
132488
132607
  handleSelectionChange(rows) {
132489
- // 过滤掉小计/总计行
132490
132608
  this.selectedRows = rows.filter(r => !r._rowType)
132491
132609
  this.$emit('selection-change', this.selectedRows)
132492
132610
  },
132493
-
132494
- // ==================== 排序 ====================
132495
- handleSortChange({ prop, order }) {
132496
- this.$emit('sort-change', { prop, order })
132611
+ handleSortChange(info) {
132612
+ this.$emit('sort-change', info)
132497
132613
  },
132498
-
132499
- // ==================== 分页 ====================
132500
132614
  handleSizeChange(size) {
132501
132615
  this.$emit('size-change', size)
132502
132616
  },
132503
-
132504
132617
  handleCurrentChange(page) {
132505
132618
  this.$emit('page-change', page)
132506
132619
  },
132507
132620
 
132508
- // ==================== 公开方法 ====================
132621
+ // ========== 对外暴露方法 ==========
132509
132622
  getSelection() {
132510
132623
  return this.selectedRows
132511
132624
  },
132512
-
132513
132625
  clearSelection() {
132514
132626
  this.$refs.table && this.$refs.table.clearSelection()
132515
132627
  this.selectedRows = []
132516
132628
  },
132517
-
132518
132629
  toggleRowSelection(row, selected) {
132519
132630
  this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
132520
132631
  },
132521
-
132522
132632
  toggleRowsSelection(rows, selected) {
132523
- if (rows && rows.length) {
132524
- rows.forEach(row => {
132525
- this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
132526
- })
132527
- }
132633
+ if (!rows || !rows.length) return
132634
+ rows.forEach(row => {
132635
+ this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
132636
+ })
132528
132637
  },
132529
-
132530
132638
  doLayout() {
132531
- this.syncTableLayout()
132532
- },
132533
-
132534
- // ==================== 虚拟滚动固定表头 ====================
132535
- syncTableLayout() {
132536
- const bodyTable = this.$refs.table
132537
- const headerTable = this.$refs.headerTable
132538
- if (bodyTable) bodyTable.doLayout()
132539
- if (headerTable) headerTable.doLayout()
132540
- this.syncHeaderScroll(this.scrollLeft)
132541
- },
132542
-
132543
- syncHeaderScroll(scrollLeft) {
132544
- const headerTable = this.$refs.headerTable
132545
- if (!headerTable) return
132546
- const headerWrapper = headerTable.$el.querySelector('.el-table__header-wrapper')
132547
- if (headerWrapper) {
132548
- headerWrapper.scrollLeft = scrollLeft
132549
- }
132550
- },
132551
-
132552
- // ==================== 虚拟滚动 ====================
132553
- initVirtualScroll() {
132554
- this.rowHeight = this.rowInitHeight
132555
- this.measureRowHeight()
132556
- if (this.processedTableData.length > 0) {
132557
- this.updateVisibleRange()
132558
- }
132559
- this.syncTableLayout()
132560
- },
132561
-
132562
- measureRowHeight() {
132563
- const el = this.$refs.table && this.$refs.table.$el
132564
- if (!el) return
132565
- const row = el.querySelector('.el-table__row')
132566
- if (row) {
132567
- this.rowHeight = row.offsetHeight || this.rowInitHeight
132568
- }
132569
- },
132570
-
132571
- handleBodyScroll(event) {
132572
- const target = event.target
132573
- this.scrollLeft = target.scrollLeft
132574
- if (this.virtualScroll) {
132575
- this.scrollTop = target.scrollTop
132576
- this.updateVisibleRange()
132577
- this.syncHeaderScroll(target.scrollLeft)
132578
- }
132579
- },
132580
-
132581
- updateVisibleRange() {
132582
- const totalCount = this.processedTableData.length
132583
- if (totalCount === 0 || this.rowHeight === 0) return
132584
-
132585
- const visibleCount = Math.ceil((this.computedHeight || 400) / this.rowHeight)
132586
-
132587
- this.visibleStartIndex = Math.max(0, Math.floor(this.scrollTop / this.rowHeight))
132588
- this.visibleEndIndex = Math.min(
132589
- totalCount,
132590
- this.visibleStartIndex + visibleCount
132591
- )
132592
- this.visibleCount = visibleCount
132593
- },
132594
-
132595
- destroyVirtualScroll() {
132596
- this.scrollTop = 0
132597
- this.visibleStartIndex = 0
132598
- this.visibleEndIndex = 0
132639
+ this.$refs.table && this.$refs.table.doLayout()
132599
132640
  }
132600
132641
  }
132601
132642
  });
132602
132643
 
132603
132644
  // CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=script&lang=js
132604
132645
  /* harmony default export */ var components_ex_tablevue_type_script_lang_js = (ex_tablevue_type_script_lang_js);
132605
- // EXTERNAL MODULE: ./src/components/ex-table/index.vue?vue&type=style&index=0&id=78d2b726&prod&scoped=true&lang=css
132606
- var ex_tablevue_type_style_index_0_id_78d2b726_prod_scoped_true_lang_css = __webpack_require__("93f4");
132646
+ // EXTERNAL MODULE: ./src/components/ex-table/index.vue?vue&type=style&index=0&id=f6bc1634&prod&scoped=true&lang=css
132647
+ var ex_tablevue_type_style_index_0_id_f6bc1634_prod_scoped_true_lang_css = __webpack_require__("a0ef");
132607
132648
 
132608
132649
  // CONCATENATED MODULE: ./src/components/ex-table/index.vue
132609
132650
 
@@ -132616,11 +132657,11 @@ var ex_tablevue_type_style_index_0_id_78d2b726_prod_scoped_true_lang_css = __web
132616
132657
 
132617
132658
  var ex_table_component = normalizeComponent(
132618
132659
  components_ex_tablevue_type_script_lang_js,
132619
- ex_tablevue_type_template_id_78d2b726_scoped_true_render,
132620
- ex_tablevue_type_template_id_78d2b726_scoped_true_staticRenderFns,
132660
+ ex_tablevue_type_template_id_f6bc1634_scoped_true_render,
132661
+ ex_tablevue_type_template_id_f6bc1634_scoped_true_staticRenderFns,
132621
132662
  false,
132622
132663
  null,
132623
- "78d2b726",
132664
+ "f6bc1634",
132624
132665
  null
132625
132666
 
132626
132667
  )
@@ -132817,10 +132858,10 @@ const virtualScrollColumns = [
132817
132858
 
132818
132859
 
132819
132860
  // ES Module 默认导出需要通过 .default 访问
132820
- const src_utils = utils.default || utils
132861
+ const src_utils_0 = src_utils.default || src_utils
132821
132862
 
132822
132863
  // 从 utils 导入配置管理函数(仅用于存储配置)
132823
- const { getConfig: src_getConfig, setConfig: src_setConfig, getTheme: src_getTheme, getSize: src_getSize, getPrimaryColor: src_getPrimaryColor, resetConfig: src_resetConfig, onConfigChange: src_onConfigChange, setTheme: src_setTheme, setSize: src_setSize, setPrimaryColor: src_setPrimaryColor } = src_utils
132864
+ const { getConfig: src_getConfig, setConfig: src_setConfig, getTheme: src_getTheme, getSize: src_getSize, getPrimaryColor: src_getPrimaryColor, resetConfig: src_resetConfig, onConfigChange: src_onConfigChange, setTheme: src_setTheme, setSize: src_setSize, setPrimaryColor: src_setPrimaryColor } = src_utils_0
132824
132865
 
132825
132866
  // 导入组件
132826
132867