xt-element-ui 1.1.7 → 1.1.9

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.
@@ -308,17 +308,6 @@ function startOfDay (dirtyDate) {
308
308
  module.exports = startOfDay
309
309
 
310
310
 
311
- /***/ }),
312
-
313
- /***/ "0b58":
314
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
315
-
316
- "use strict";
317
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_209e311e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7de5");
318
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_209e311e_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_index_vue_vue_type_style_index_0_id_209e311e_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
319
- /* unused harmony reexport * */
320
-
321
-
322
311
  /***/ }),
323
312
 
324
313
  /***/ "0d3e":
@@ -2144,6 +2133,13 @@ function isThisMinute (dirtyDate) {
2144
2133
  module.exports = isThisMinute
2145
2134
 
2146
2135
 
2136
+ /***/ }),
2137
+
2138
+ /***/ "3f1a":
2139
+ /***/ (function(module, exports, __webpack_require__) {
2140
+
2141
+ // extracted by mini-css-extract-plugin
2142
+
2147
2143
  /***/ }),
2148
2144
 
2149
2145
  /***/ "4175":
@@ -3600,13 +3596,6 @@ function addWeeks (dirtyDate, dirtyAmount) {
3600
3596
  module.exports = addWeeks
3601
3597
 
3602
3598
 
3603
- /***/ }),
3604
-
3605
- /***/ "7de5":
3606
- /***/ (function(module, exports, __webpack_require__) {
3607
-
3608
- // extracted by mini-css-extract-plugin
3609
-
3610
3599
  /***/ }),
3611
3600
 
3612
3601
  /***/ "7eea":
@@ -6114,6 +6103,17 @@ function isSameISOWeek (dirtyDateLeft, dirtyDateRight) {
6114
6103
  module.exports = isSameISOWeek
6115
6104
 
6116
6105
 
6106
+ /***/ }),
6107
+
6108
+ /***/ "cdf7":
6109
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
6110
+
6111
+ "use strict";
6112
+ /* 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_216b80f8_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3f1a");
6113
+ /* 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_216b80f8_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_216b80f8_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
6114
+ /* unused harmony reexport * */
6115
+
6116
+
6117
6117
  /***/ }),
6118
6118
 
6119
6119
  /***/ "ce3d":
@@ -7484,7 +7484,7 @@ const onConfigChange = function(listener) {
7484
7484
  onConfigChange
7485
7485
  });
7486
7486
 
7487
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-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
7487
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-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
7488
7488
  var render = function render(){var _vm=this,_c=_vm._self._c;return _c('button',{staticClass:"el-button xt-button",class:[
7489
7489
  _vm.type ?'xt-button--' + _vm.type: '',
7490
7490
  _vm.size ? 'xt-button--' + _vm.size : '',
@@ -7565,7 +7565,7 @@ var component = Object(componentNormalizer["a" /* default */])(
7565
7565
  // CONCATENATED MODULE: ./src/components/xt-button/index.js
7566
7566
 
7567
7567
  /* harmony default export */ var components_xt_button = (xt_button);
7568
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-input/index.vue?vue&type=template&id=f11783a2
7568
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-input/index.vue?vue&type=template&id=f11783a2
7569
7569
  var xt_inputvue_type_template_id_f11783a2_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-input"},[_c('el-input',{style:(_vm.inputStyle),attrs:{"value":_vm.value,"placeholder":_vm.placeholder},on:{"input":function($event){return _vm.$emit('input', $event)}}})],1)
7570
7570
  }
7571
7571
  var xt_inputvue_type_template_id_f11783a2_staticRenderFns = []
@@ -7625,7 +7625,7 @@ var xt_input_component = Object(componentNormalizer["a" /* default */])(
7625
7625
  // CONCATENATED MODULE: ./src/components/xt-input/index.js
7626
7626
 
7627
7627
  /* harmony default export */ var components_xt_input = (xt_input);
7628
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-flex-box/index.vue?vue&type=template&id=21429280
7628
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-flex-box/index.vue?vue&type=template&id=21429280
7629
7629
  var xt_flex_boxvue_type_template_id_21429280_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-flex-box",class:_vm.classAttrs,style:(_vm.flexStyle)},[_vm._t("default")],2)
7630
7630
  }
7631
7631
  var xt_flex_boxvue_type_template_id_21429280_staticRenderFns = []
@@ -7687,13 +7687,13 @@ var xt_flex_box_component = Object(componentNormalizer["a" /* default */])(
7687
7687
  // CONCATENATED MODULE: ./src/components/xt-flex-box/index.js
7688
7688
 
7689
7689
  /* harmony default export */ var components_xt_flex_box = (xt_flex_box);
7690
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-card/index.vue?vue&type=template&id=bb709dd8
7691
- var xt_cardvue_type_template_id_bb709dd8_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-card",class:{'no-padding': _vm.noPadding }},[(_vm.title)?_c('div',{staticClass:"card__header"},[_vm._t("title",function(){return [_vm._v(_vm._s(_vm.title))]})],2):_vm._e(),_c('div',{staticClass:"card__body"},[_vm._t("default",function(){return [_c('span',{staticClass:"value"},[_vm._t("value",function(){return [_vm._v(_vm._s(_vm.value))]})],2),_c('span',{staticClass:"unit"},[_vm._v(_vm._s(_vm.unit))])]})],2)])
7690
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-card/index.vue?vue&type=template&id=bc9ed1fa
7691
+ var xt_cardvue_type_template_id_bc9ed1fa_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-card",class:{'no-padding': _vm.noPadding }},[(_vm.title)?_c('div',{staticClass:"card__header"},[_vm._t("icon",function(){return [_vm._v(_vm._s(_vm.icon))]}),_vm._t("title",function(){return [_vm._v(_vm._s(_vm.title))]})],2):_vm._e(),_c('div',{staticClass:"card__body"},[_vm._t("default",function(){return [_c('span',{staticClass:"value"},[_vm._t("value",function(){return [_vm._v(_vm._s(_vm.value))]})],2),_c('span',{staticClass:"unit"},[_vm._v(_vm._s(_vm.unit))])]})],2)])
7692
7692
  }
7693
- var xt_cardvue_type_template_id_bb709dd8_staticRenderFns = []
7693
+ var xt_cardvue_type_template_id_bc9ed1fa_staticRenderFns = []
7694
7694
 
7695
7695
 
7696
- // CONCATENATED MODULE: ./src/components/xt-card/index.vue?vue&type=template&id=bb709dd8
7696
+ // CONCATENATED MODULE: ./src/components/xt-card/index.vue?vue&type=template&id=bc9ed1fa
7697
7697
 
7698
7698
  // 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/index.vue?vue&type=script&lang=js
7699
7699
 
@@ -7722,8 +7722,8 @@ var xt_cardvue_type_template_id_bb709dd8_staticRenderFns = []
7722
7722
 
7723
7723
  var xt_card_component = Object(componentNormalizer["a" /* default */])(
7724
7724
  components_xt_cardvue_type_script_lang_js,
7725
- xt_cardvue_type_template_id_bb709dd8_render,
7726
- xt_cardvue_type_template_id_bb709dd8_staticRenderFns,
7725
+ xt_cardvue_type_template_id_bc9ed1fa_render,
7726
+ xt_cardvue_type_template_id_bc9ed1fa_staticRenderFns,
7727
7727
  false,
7728
7728
  null,
7729
7729
  null,
@@ -7735,7 +7735,7 @@ var xt_card_component = Object(componentNormalizer["a" /* default */])(
7735
7735
  // CONCATENATED MODULE: ./src/components/xt-card/index.js
7736
7736
 
7737
7737
  /* harmony default export */ var components_xt_card = (xt_card);
7738
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-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
7738
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-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
7739
7739
  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)
7740
7740
  }
7741
7741
  var xt_card_itemvue_type_template_id_4f375226_staticRenderFns = []
@@ -8208,7 +8208,7 @@ var xt_config_provider_component = Object(componentNormalizer["a" /* default */]
8208
8208
 
8209
8209
  /* harmony default export */ var components_xt_config_provider = (xt_config_provider);
8210
8210
 
8211
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-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
8211
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-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
8212
8212
  var xt_textvue_type_template_id_2b4328b0_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-text",class:[
8213
8213
  _vm.type ? 'xt-text--' + _vm.type : '',
8214
8214
  'xt-text--' + _vm.size,
@@ -8355,7 +8355,7 @@ var xt_text_component = Object(componentNormalizer["a" /* default */])(
8355
8355
  // CONCATENATED MODULE: ./src/components/xt-text/index.js
8356
8356
 
8357
8357
  /* harmony default export */ var components_xt_text = (xt_text);
8358
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-grid-box/index.vue?vue&type=template&id=67e197c4
8358
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-grid-box/index.vue?vue&type=template&id=67e197c4
8359
8359
  var xt_grid_boxvue_type_template_id_67e197c4_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-grid-box",style:(_vm.styleAttrs)},[_vm._t("default")],2)
8360
8360
  }
8361
8361
  var xt_grid_boxvue_type_template_id_67e197c4_staticRenderFns = []
@@ -8519,7 +8519,7 @@ var xt_grid_box_component = Object(componentNormalizer["a" /* default */])(
8519
8519
 
8520
8520
  /* harmony default export */ var components_xt_grid_box = (xt_grid_box);
8521
8521
 
8522
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-grid-item/index.vue?vue&type=template&id=5318efc6&scoped=true
8522
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-grid-item/index.vue?vue&type=template&id=5318efc6&scoped=true
8523
8523
  var xt_grid_itemvue_type_template_id_5318efc6_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-grid-item",style:(_vm.styleAttrs)},[_vm._t("default")],2)
8524
8524
  }
8525
8525
  var xt_grid_itemvue_type_template_id_5318efc6_scoped_true_staticRenderFns = []
@@ -8652,7 +8652,7 @@ var xt_grid_item_component = Object(componentNormalizer["a" /* default */])(
8652
8652
  // CONCATENATED MODULE: ./src/components/xt-grid-item/index.js
8653
8653
 
8654
8654
  /* harmony default export */ var components_xt_grid_item = (xt_grid_item);
8655
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-date-picker/index.vue?vue&type=template&id=6a59ddb5&scoped=true
8655
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-date-picker/index.vue?vue&type=template&id=6a59ddb5&scoped=true
8656
8656
  var xt_date_pickervue_type_template_id_6a59ddb5_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticStyle:{"display":"inline-block"}},[(_vm.dateType=='quarter')?_c('FlexBox',{staticClass:"xt-date-picker",class:{focus: _vm.isfocus},style:(_vm.width?{width: `${_vm.width}px`}:{}),attrs:{"type":"inline-flex"}},[_c('Quarter',{attrs:{"format":_vm.format,"placeholder":"开始时间","quarter-type":"quarter-start","clearable":""},model:{value:(_vm.timeStart),callback:function ($$v) {_vm.timeStart=$$v},expression:"timeStart"}}),_c('span',{staticClass:"separator"},[_vm._v(_vm._s(_vm.separator))]),_c('Quarter',{attrs:{"format":_vm.format,"placeholder":"结束时间","quarter-type":"quarter-end","clearable":""},model:{value:(_vm.timeEnd),callback:function ($$v) {_vm.timeEnd=$$v},expression:"timeEnd"}})],1):_c('FlexBox',{staticClass:"xt-date",class:{focus: _vm.isfocus},style:(_vm.width?{width: `${_vm.width}px`}:{}),attrs:{"type":"inline-flex"}},[_c('el-date-picker',{key:"startSelect",ref:"timeStart",attrs:{"size":"small","disabled":_vm.disabled,"append-to-body":"","picker-options":_vm.startTimeRange,"format":_vm.format,"type":_vm.dateType,"placeholder":"开始时间","clearable":""},on:{"blur":function($event){return _vm.$emit('blur')},"focus":function($event){return _vm.$emit('focus')}},model:{value:(_vm.timeStart),callback:function ($$v) {_vm.timeStart=$$v},expression:"timeStart"}}),_c('span',{staticClass:"separator"},[_vm._v(_vm._s(_vm.separator))]),_c('el-date-picker',{key:"endSelect",ref:"timeEnd",attrs:{"size":"small","disabled":_vm.disabled,"append-to-body":"","picker-options":_vm.endTimeRange,"format":_vm.format,"type":_vm.dateType,"placeholder":"结束时间","clearable":""},on:{"blur":function($event){return _vm.$emit('blur')},"focus":function($event){return _vm.$emit('focus')}},model:{value:(_vm.timeEnd),callback:function ($$v) {_vm.timeEnd=$$v},expression:"timeEnd"}})],1)],1)
8657
8657
  }
8658
8658
  var xt_date_pickervue_type_template_id_6a59ddb5_scoped_true_staticRenderFns = []
@@ -8660,7 +8660,7 @@ var xt_date_pickervue_type_template_id_6a59ddb5_scoped_true_staticRenderFns = []
8660
8660
 
8661
8661
  // CONCATENATED MODULE: ./src/components/xt-date-picker/index.vue?vue&type=template&id=6a59ddb5&scoped=true
8662
8662
 
8663
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-date-picker/quarter.vue?vue&type=template&id=4e3cbf9a
8663
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-date-picker/quarter.vue?vue&type=template&id=4e3cbf9a
8664
8664
  var quartervue_type_template_id_4e3cbf9a_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-popover',{attrs:{"trigger":"click","disabled":_vm.disabled,"transition":"el-zoom-in-top","placement":_vm.placement,"width":_vm.popoverWidth},on:{"hide":_vm.handleBlur},model:{value:(_vm.popoverVisible),callback:function ($$v) {_vm.popoverVisible=$$v},expression:"popoverVisible"}},[_c('div',{staticClass:"quarter-wrapper"},[_c('BaseFlexBox',{attrs:{"content":"between"}},[_c('i',{staticClass:"el-icon-d-arrow-left",on:{"click":_vm.prev}}),_c('span',[_vm._v(_vm._s(_vm.selectYear))]),_c('i',{staticClass:"el-icon-d-arrow-right",on:{"click":_vm.after}})]),_c('BaseFlexBox',{staticStyle:{"margin-top":"10px"},attrs:{"content":"between"}},_vm._l((_vm.quarterList),function(item){return _c('el-button',{key:item.value,attrs:{"disabled":_vm.getDisable(item),"type":_vm.currentyear==_vm.selectYear&&item.value == _vm.currentQuarter ?'primary':'',"size":"mini","round":""},on:{"click":function($event){return _vm.setCurrent(item)}}},[_vm._v(_vm._s(item.label))])}),1)],1),_c('el-input',{ref:"reference",attrs:{"slot":"reference","size":"small","value":_vm.quarterLabel,"readonly":"","title":_vm.value,"placeholder":_vm.placeholder,"prefix-icon":"el-icon-date","clearable":""},slot:"reference"})],1)
8665
8665
  }
8666
8666
  var quartervue_type_template_id_4e3cbf9a_staticRenderFns = []
@@ -8948,7 +8948,7 @@ var xt_date_picker_component = Object(componentNormalizer["a" /* default */])(
8948
8948
  // CONCATENATED MODULE: ./src/components/xt-date-picker/index.js
8949
8949
 
8950
8950
  /* harmony default export */ var components_xt_date_picker = (xt_date_picker);
8951
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-button/index.vue?vue&type=template&id=39655574
8951
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-button/index.vue?vue&type=template&id=39655574
8952
8952
  var ex_buttonvue_type_template_id_39655574_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-button',_vm._b({staticClass:"ex-button",class:_vm.buttonClasses,on:{"click":_vm.handleClick}},'el-button',_vm.$attrs,false),[_vm._t("default")],2)
8953
8953
  }
8954
8954
  var ex_buttonvue_type_template_id_39655574_staticRenderFns = []
@@ -9033,7 +9033,7 @@ var ex_button_component = Object(componentNormalizer["a" /* default */])(
9033
9033
  // CONCATENATED MODULE: ./src/components/ex-button/index.js
9034
9034
 
9035
9035
  /* harmony default export */ var components_ex_button = (ex_button);
9036
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/index.vue?vue&type=template&id=1fe36744
9036
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-chart/index.vue?vue&type=template&id=1fe36744
9037
9037
  var ex_chartvue_type_template_id_1fe36744_render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.type=='bar')?_c('ex-bar',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-bar',_vm.$attrs,false)):(_vm.type=='line')?_c('ex-line',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-line',_vm.$attrs,false)):(_vm.type=='pie')?_c('ex-pie',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-pie',_vm.$attrs,false)):(_vm.type=='multi')?_c('ex-multi',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-multi',_vm.$attrs,false)):(_vm.type=='trend')?_c('ex-trend',_vm._b({attrs:{"theme":_vm.myTheme,"size":_vm.mySize}},'ex-trend',_vm.$attrs,false)):_vm._e()
9038
9038
  }
9039
9039
  var ex_chartvue_type_template_id_1fe36744_staticRenderFns = []
@@ -9195,7 +9195,7 @@ var ex_chart_component = Object(componentNormalizer["a" /* default */])(
9195
9195
 
9196
9196
  /* harmony default export */ var components_ex_chart = (ex_chart);
9197
9197
 
9198
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-card/index.vue?vue&type=template&id=2073f658&scoped=true
9198
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ex-card/index.vue?vue&type=template&id=2073f658&scoped=true
9199
9199
  var ex_cardvue_type_template_id_2073f658_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-card',_vm._b({staticClass:"ex-card",class:_vm.cardClasses,scopedSlots:_vm._u([(_vm.$slots.header || _vm.title)?{key:"header",fn:function(){return [_vm._t("header",function(){return [_vm._v(_vm._s(_vm.title))]})]},proxy:true}:null],null,true)},'el-card',_vm.$attrs,false),[_vm._t("default")],2)
9200
9200
  }
9201
9201
  var ex_cardvue_type_template_id_2073f658_scoped_true_staticRenderFns = []
@@ -9294,113 +9294,51 @@ ex_card.install = function (Vue) {
9294
9294
 
9295
9295
  /* harmony default export */ var components_ex_card = (ex_card);
9296
9296
 
9297
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-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=209e311e&scoped=true
9298
- var ex_tablevue_type_template_id_209e311e_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"ExTable"},[_vm._t("title",function(){return [_c('XtFlexBox',{staticStyle:{"padding":"0 10px"},attrs:{"content":"between"}},[(_vm.title)?_c('ExText',{staticStyle:{"padding":"10px"},attrs:{"size":"medium"}},[_vm._v(_vm._s(_vm.title))]):_vm._e(),(typeof _vm.toolExport === 'function')?_c('el-button',{attrs:{"size":"small","type":"primary","plain":"","icon":"el-icon-download"},on:{"click":_vm.exportTableData}},[_vm._v("导出")]):_vm._e()],1)]}),_c('el-table',_vm._g(_vm._b({directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}],ref:"ExtendTable",attrs:{"element-loading-text":"加载中...","data":_vm.spanFields ? _vm.spanTableData : _vm.tableData},on:{"current-change":_vm.rowChange,"row-click":_vm.rowClick,"sort-change":_vm.changeTableSort,"selection-change":_vm.selectionChange},scopedSlots:_vm._u([{key:"empty",fn:function(){return [_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.hasLoadData&&!_vm.loading),expression:"hasLoadData&&!loading"}],staticStyle:{"text-align":"center"}},[_c('div',{staticClass:"empty-title"},[_vm._v("暂无数据")]),_c('div',{staticClass:"empty-subtitle"},[_vm._v(_vm._s(_vm.emptSubTitle))])])]},proxy:true}])},'el-table',_vm.getAttrs(),false),_vm.$listeners),[((_vm.hasLoad || !_vm.tbId) ? _vm.expand : false)?_c('el-table-column',{attrs:{"type":"expand","fixed":_vm.defaultColumnsFixed},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._t("expand",null,{"scopeData":scope,"row":scope.row,"column":scope.column,"index":scope.$index})]}}],null,true)}):_vm._e(),((_vm.hasLoad || !_vm.tbId) && _vm.showIndex)?_c('el-table-column',{attrs:{"type":"index","align":"center","width":"80","fixed":_vm.defaultColumnsFixed?'left':null,"index":_vm.showRealIndex ? _vm.realIndexRender : _vm.indexRender},scopedSlots:_vm._u([{key:"header",fn:function(scope){return [(_vm.showColumsFilter)?_c('el-popover',{attrs:{"width":"170","trigger":"click","placement":"bottom-start"}},[_c('el-checkbox-group',{staticClass:"drop-body",model:{value:(_vm.checkedColumns),callback:function ($$v) {_vm.checkedColumns=$$v},expression:"checkedColumns"}},_vm._l((_vm.diyColumns),function(item,ind){return _c('el-checkbox',{directives:[{name:"show",rawName:"v-show",value:(item.prop),expression:"item.prop"}],key:ind,staticClass:"checkli",attrs:{"label":item.prop},on:{"change":(v) => _vm.handleToggle(v, item)}},[_vm._v(_vm._s(item.label))])}),1),_c('i',{staticClass:"el-icon-s-operation",staticStyle:{"cursor":"pointer"},attrs:{"slot":"reference","title":"定制列"},slot:"reference"})],1):_c('div',[_vm._v("序号")])]}}],null,false,802683213)}):_vm._e(),((_vm.hasLoad || !_vm.tbId) && _vm.selection)?_c('el-table-column',{attrs:{"type":"selection","align":"center","width":"50","fixed":_vm.defaultColumnsFixed?'left':null}}):_vm._e(),_vm._l((_vm.groupColumns),function(group,groupIndex){return [_c('el-table-column',_vm._b({key:`group-${groupIndex}`,scopedSlots:_vm._u([{key:"default",fn:function({row}){return [_c('span',[_vm._v(_vm._s(row[group.prop]))])]}}],null,true)},'el-table-column',_vm.setAttrs(group),false))]}),_vm._l((_vm.tableColumns),function(column,index){return [(column.slotName ||column.formatter)?_c('el-table-column',_vm._b({key:index,scopedSlots:_vm._u([{key:"header",fn:function(scope){return [_vm._t(column.slotHeader || 'header',function(){return [_c('span',[_vm._v(" "+_vm._s(scope.column.label))])]},{"column":scope.column})]}},{key:"default",fn:function(scope){return (column.slotName)?[_vm._t(column.slotName,null,{"scopeData":scope,"row":scope.row,"column":scope.column,"index":scope.$index})]:undefined}}],null,true)},'el-table-column',_vm.setAttrs(column),false)):(column.children && column.children.length)?_c('ExColumn',{key:index,attrs:{"column":column}}):_c('el-table-column',_vm._b({key:index,attrs:{"prop":column.prop,"label":column.label},scopedSlots:_vm._u([{key:"header",fn:function(scope){return [_vm._t(column.slotHeader || 'header',function(){return [_c('span',[_vm._v(" "+_vm._s(scope.column.label))])]},{"column":scope.column})]}}],null,true)},'el-table-column',_vm.setAttrs(column),false))]})],2),_c('div',{ref:"toolBar",staticClass:"toolBar left"},[_vm._t("pagination",function(){return [(_vm.pagination)?_c('el-pagination',{attrs:{"total":_vm.total,"page-sizes":_vm.pageSizes,"page-size":_vm.pagination.PageSize,"current-page":_vm.pagination.PageNum},on:{"current-change":_vm.pageChange,"size-change":_vm.sizeChange}}):_vm._e()]})],2)],2)
9297
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3d759d14-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=216b80f8&scoped=true
9298
+ var ex_tablevue_type_template_id_216b80f8_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"ex-table-wrapper"},[(_vm.title || _vm.$slots.toolbar)?_c('div',{staticClass:"ex-table-header"},[(_vm.title)?_c('span',{staticClass:"ex-table-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_c('div',{staticClass:"ex-table-toolbar"},[_vm._t("toolbar")],2)]):_vm._e(),(_vm.virtualScroll && _vm.headerRows.length)?_c('div',{ref:"fixedHeader",staticClass:"ex-table-fixed-header",style:({ marginLeft: -_vm.scrollLeft + 'px' })},[_c('table',{staticClass:"ex-table-fixed-header-table"},[_c('colgroup',[_vm._l((_vm.headerCols),function(col){return _c('col',{key:col._key,attrs:{"name":col._key,"width":col._width,"min-width":col._minWidth}})}),_c('col',{attrs:{"name":"gutter","width":"12"}})],2),_c('thead',_vm._l((_vm.headerRows),function(row,rowIdx){return _c('tr',{key:rowIdx},[_vm._l((row),function(cell){return [(!cell._hidden)?_c('th',{key:cell._key,style:(cell._style || {}),attrs:{"rowspan":cell._rowspan,"colspan":cell._colspan}},[_vm._v(_vm._s(cell.label))]):_vm._e()]})],2)}),0)])]):_vm._e(),_c('div',{ref:"tableBody",staticClass:"ex-table-body",class:{ 'ex-table-virtual': _vm.virtualScroll },style:(_vm.virtualScroll ? { height: _vm.computedHeight + 'px' } : {}),on:{"scroll":_vm.handleBodyScroll}},[(_vm.virtualScroll)?_c('div',{staticClass:"ex-table-virtual-inner",style:({ height: _vm.virtualTotalHeight + 'px' })},[_c('div',{style:({ transform: 'translateY(' + _vm.virtualOffsetY + 'px)' })},[_c('el-table',_vm._g(_vm._b({ref:"table",staticClass:"ex-table",attrs:{"data":_vm.visibleData,"span-method":_vm.groupColumns.length ? _vm.handleSpanMethod : undefined,"row-class-name":_vm.getRowClassName,"show-header":false},on:{"selection-change":_vm.handleSelectionChange,"sort-change":_vm.handleSortChange}},'el-table',_vm.$attrs,false),_vm.$listeners),[(_vm.selection)?_c('el-table-column',{attrs:{"type":"selection","width":"55","fixed":_vm.selectionFixed}}):_vm._e(),(_vm.showIndex)?_c('el-table-column',{attrs:{"type":"index","width":"60","label":"#","fixed":_vm.indexFixed,"index":_vm.indexMethod}}):_vm._e(),_vm._l((_vm.flattenedColumns),function(col){return [(col.children && col.children.length)?_c('el-table-column',_vm._b({key:col._key},'el-table-column',_vm.getColumnProps(col),false),[_vm._l((col.children),function(child){return [_c('el-table-column',_vm._b({key:child._key,scopedSlots:_vm._u([(child.render)?{key:"default",fn:function(scope){return [_vm._v(_vm._s(child.render(scope)))]}}:(child.formatter)?{key:"default",fn:function(scope){return [_c('ExTableCell',{attrs:{"row":scope.row,"index":scope.$index,"formatter":child.formatter,"column":child}})]}}:(child.slot)?{key:"default",fn:function(scope){return [_vm._t(child.slot,null,{"row":scope.row,"index":scope.$index,"column":child})]}}:null],null,true)},'el-table-column',_vm.getColumnProps(child),false))]})],2):_c('el-table-column',_vm._b({key:col._key,scopedSlots:_vm._u([(col.render)?{key:"default",fn:function(scope){return [_vm._v(_vm._s(col.render(scope)))]}}:(col.formatter)?{key:"default",fn:function(scope){return [_c('ExTableCell',{attrs:{"row":scope.row,"index":scope.$index,"formatter":col.formatter,"column":col}})]}}:(col.slot)?{key:"default",fn:function(scope){return [_vm._t(col.slot,null,{"row":scope.row,"index":scope.$index,"column":col})]}}:null],null,true)},'el-table-column',_vm.getColumnProps(col),false))]})],2)],1)]):_c('el-table',_vm._g(_vm._b({ref:"table",staticClass:"ex-table",attrs:{"data":_vm.visibleData,"height":_vm.computedHeight,"span-method":_vm.groupColumns.length ? _vm.handleSpanMethod : undefined,"row-class-name":_vm.getRowClassName},on:{"selection-change":_vm.handleSelectionChange,"sort-change":_vm.handleSortChange}},'el-table',_vm.$attrs,false),_vm.$listeners),[(_vm.selection)?_c('el-table-column',{attrs:{"type":"selection","width":"55","fixed":_vm.selectionFixed}}):_vm._e(),(_vm.showIndex)?_c('el-table-column',{attrs:{"type":"index","width":"60","label":"#","fixed":_vm.indexFixed,"index":_vm.indexMethod}}):_vm._e(),_vm._l((_vm.flattenedColumns),function(col){return [(col.children && col.children.length)?_c('el-table-column',_vm._b({key:col._key},'el-table-column',_vm.getColumnProps(col),false),[_vm._l((col.children),function(child){return [_c('el-table-column',_vm._b({key:child._key,scopedSlots:_vm._u([(child.render)?{key:"default",fn:function(scope){return [_vm._v(_vm._s(child.render(scope)))]}}:(child.formatter)?{key:"default",fn:function(scope){return [_c('ExTableCell',{attrs:{"row":scope.row,"index":scope.$index,"formatter":child.formatter,"column":child}})]}}:(child.slot)?{key:"default",fn:function(scope){return [_vm._t(child.slot,null,{"row":scope.row,"index":scope.$index,"column":child})]}}:null],null,true)},'el-table-column',_vm.getColumnProps(child),false))]})],2):_c('el-table-column',_vm._b({key:col._key,scopedSlots:_vm._u([(col.render)?{key:"default",fn:function(scope){return [_vm._v(_vm._s(col.render(scope)))]}}:(col.formatter)?{key:"default",fn:function(scope){return [_c('ExTableCell',{attrs:{"row":scope.row,"index":scope.$index,"formatter":col.formatter,"column":col}})]}}:(col.slot)?{key:"default",fn:function(scope){return [_vm._t(col.slot,null,{"row":scope.row,"index":scope.$index,"column":col})]}}:null],null,true)},'el-table-column',_vm.getColumnProps(col),false))]})],2)],1),(_vm.showPagination)?_c('div',{staticClass:"ex-table-footer"},[_c('el-pagination',{attrs:{"current-page":_vm.pagination.PageNum,"page-size":_vm.pagination.PageSize,"total":_vm.total,"page-sizes":_vm.pagination.PageSizes || [10, 20, 50, 100],"layout":"total, sizes, prev, pager, next, jumper"},on:{"size-change":_vm.handleSizeChange,"current-change":_vm.handleCurrentChange}})],1):_vm._e()])
9299
9299
  }
9300
- var ex_tablevue_type_template_id_209e311e_scoped_true_staticRenderFns = []
9300
+ var ex_tablevue_type_template_id_216b80f8_scoped_true_staticRenderFns = []
9301
9301
 
9302
9302
 
9303
- // CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=template&id=209e311e&scoped=true
9304
-
9305
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"48ae0d99-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/ExColumn.vue?vue&type=template&id=57358dae
9306
- var ExColumnvue_type_template_id_57358dae_render = function render(){var _vm=this,_c=_vm._self._c;return _c('el-table-column',_vm._b({scopedSlots:_vm._u([{key:"header",fn:function(scope){return [_vm._t(_vm.column.slotHeader || 'header',function(){return [_c('span',[_vm._v(" "+_vm._s(scope.column.label))])]},{"column":scope.column})]}}],null,true)},'el-table-column',_vm.setAttrs(_vm.column),false),_vm._l((_vm.column.children),function(child,index){return _c('ExColumn',{key:index,attrs:{"column":child}})}),1)
9307
- }
9308
- var ExColumnvue_type_template_id_57358dae_staticRenderFns = []
9303
+ // CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=template&id=216b80f8&scoped=true
9309
9304
 
9305
+ // 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
9310
9306
 
9311
- // CONCATENATED MODULE: ./src/components/ex-table/ExColumn.vue?vue&type=template&id=57358dae
9312
-
9313
- // 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/ExColumn.vue?vue&type=script&lang=js
9314
-
9315
- /* harmony default export */ var ExColumnvue_type_script_lang_js = ({
9316
- name: "ExColumn",
9317
- props: {
9318
- column: {
9319
- type: Object,
9320
- default: () => {
9321
- return undefined;
9322
- },
9323
- required: true
9324
- }
9325
- },
9326
- methods: {
9327
- setAttrs(params) {
9328
- const { ...options } = params;
9329
- if (!options.align) {
9330
- options.align = "center";
9331
- }
9332
- if (options.showTip) {
9333
- options.showOverflowTooltip = true;
9334
- }
9335
- return { ...options };
9336
- }
9337
- }
9338
- });
9339
-
9340
- // CONCATENATED MODULE: ./src/components/ex-table/ExColumn.vue?vue&type=script&lang=js
9341
- /* harmony default export */ var ex_table_ExColumnvue_type_script_lang_js = (ExColumnvue_type_script_lang_js);
9342
- // CONCATENATED MODULE: ./src/components/ex-table/ExColumn.vue
9343
-
9344
-
9345
-
9346
-
9347
-
9348
- /* normalize component */
9349
-
9350
- var ExColumn_component = Object(componentNormalizer["a" /* default */])(
9351
- ex_table_ExColumnvue_type_script_lang_js,
9352
- ExColumnvue_type_template_id_57358dae_render,
9353
- ExColumnvue_type_template_id_57358dae_staticRenderFns,
9354
- false,
9355
- null,
9356
- null,
9357
- null
9358
-
9359
- )
9360
-
9361
- /* harmony default export */ var ExColumn = (ExColumn_component.exports);
9362
- // 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/ExCell.vue?vue&type=script&lang=js
9363
-
9364
- /* harmony default export */ var ExCellvue_type_script_lang_js = ({
9365
- name: "ExCell",
9366
- functional: true,
9367
- props: {
9368
- row: Object,
9369
- index: Number,
9370
- formatter: Function,
9371
- column: {
9372
- type: Object,
9373
- default: null
9374
- }
9375
- },
9376
- render: (h, ctx) => {
9377
- const params = {
9378
- row: ctx.props.row,
9379
- index: ctx.props.index
9380
- };
9381
- debugger
9382
- if (ctx.props.column) params.column = ctx.props.column;
9383
- const isVnode = (it) => typeof it === "object" && it.hasOwnProperty("componentOptions");
9384
- const renderNode = ctx.props.formatter(h, params);
9385
- // 非Vnode 字符处理
9386
- return isVnode(renderNode) ? renderNode : h("span", renderNode);
9387
- }
9388
- });
9307
+ /* harmony default export */ var ExTableCellvue_type_script_lang_js = ({
9308
+ name: 'ExTableCell',
9309
+ functional: true,
9310
+ props: {
9311
+ row: Object,
9312
+ index: Number,
9313
+ formatter: Function,
9314
+ column: { type: Object, default: null }
9315
+ },
9316
+ render: (h, ctx) => {
9317
+ const params = {
9318
+ row: ctx.props.row,
9319
+ index: ctx.props.index
9320
+ }
9321
+ if (ctx.props.column) params.column = ctx.props.column
9322
+ const isVnode = (it) => typeof it === 'object' && it.hasOwnProperty('componentOptions')
9323
+ const renderNode = ctx.props.formatter(h, params)
9324
+ return isVnode(renderNode) ? renderNode : h('span', renderNode)
9325
+ }
9326
+ });
9389
9327
 
9390
- // CONCATENATED MODULE: ./src/components/ex-table/ExCell.vue?vue&type=script&lang=js
9391
- /* harmony default export */ var ex_table_ExCellvue_type_script_lang_js = (ExCellvue_type_script_lang_js);
9392
- // CONCATENATED MODULE: ./src/components/ex-table/ExCell.vue
9393
- var ExCell_render, ExCell_staticRenderFns
9328
+ // CONCATENATED MODULE: ./src/components/ex-table/ExTableCell.vue?vue&type=script&lang=js
9329
+ /* harmony default export */ var ex_table_ExTableCellvue_type_script_lang_js = (ExTableCellvue_type_script_lang_js);
9330
+ // CONCATENATED MODULE: ./src/components/ex-table/ExTableCell.vue
9331
+ var ExTableCell_render, ExTableCell_staticRenderFns
9394
9332
 
9395
9333
 
9396
9334
 
9397
9335
 
9398
9336
  /* normalize component */
9399
9337
 
9400
- var ExCell_component = Object(componentNormalizer["a" /* default */])(
9401
- ex_table_ExCellvue_type_script_lang_js,
9402
- ExCell_render,
9403
- ExCell_staticRenderFns,
9338
+ var ExTableCell_component = Object(componentNormalizer["a" /* default */])(
9339
+ ex_table_ExTableCellvue_type_script_lang_js,
9340
+ ExTableCell_render,
9341
+ ExTableCell_staticRenderFns,
9404
9342
  false,
9405
9343
  null,
9406
9344
  null,
@@ -9408,515 +9346,715 @@ var ExCell_component = Object(componentNormalizer["a" /* default */])(
9408
9346
 
9409
9347
  )
9410
9348
 
9411
- /* harmony default export */ var ExCell = (ExCell_component.exports);
9349
+ /* harmony default export */ var ExTableCell = (ExTableCell_component.exports);
9412
9350
  // 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
9413
9351
 
9414
9352
 
9415
9353
 
9416
-
9417
-
9418
9354
  /* harmony default export */ var ex_tablevue_type_script_lang_js = ({
9419
- name: "ExTable",
9420
- components: {
9421
- ExCell: ExCell,
9422
- ExColumn: ExColumn,
9423
- ExText: components_xt_text,
9424
- XtFlexBox: components_xt_flex_box
9425
- },
9355
+ name: 'ExTable',
9426
9356
  inheritAttrs: false,
9357
+ components: { ExTableCell: ExTableCell },
9427
9358
  props: {
9428
- tbId: {
9429
- type: [Number, String],
9430
- default: ""
9359
+ // 表格数据
9360
+ tableData: { type: Array, default: () => [] },
9361
+ // 列配置(支持 children 多级表头)
9362
+ columns: { type: Array, default: () => [] },
9363
+ // 分组列配置(按配置的层级合并单元格)
9364
+ groupColumns: { type: Array, default: () => [] },
9365
+ // 标题
9366
+ title: { type: String, default: '' },
9367
+ // 高度
9368
+ height: { type: [Number, String], default: null },
9369
+ // 虚拟滚动
9370
+ virtualScroll: { type: Boolean, default: false },
9371
+ // 预估行高
9372
+ rowInitHeight: { type: Number, default: 48 },
9373
+ // 缓冲区行数
9374
+ bufferSize: { type: Number, default: 5 },
9375
+ // 分页配置
9376
+ pagination: { type: Object, default: null },
9377
+ // 总条数
9378
+ total: { type: Number, default: 0 },
9379
+ // 是否显示序号
9380
+ showIndex: { type: Boolean, default: false },
9381
+ // 是否可选
9382
+ selection: { type: Boolean, default: false },
9383
+ // 选择列固定位置
9384
+ selectionFixed: { type: [String, Boolean], default: false },
9385
+ // 序号列固定位置
9386
+ indexFixed: { type: [String, Boolean], default: false },
9387
+ // 加载状态
9388
+ loading: { type: Boolean, default: false },
9389
+ // 空数据文案
9390
+ emptyText: { type: String, default: '暂无数据' },
9391
+ // 小计配置
9392
+ subtotalConfig: { type: Object, default: () => ({ enabled: false }) },
9393
+ // 总计配置
9394
+ totalConfig: { type: Object, default: () => ({ enabled: false }) }
9395
+ },
9396
+
9397
+ data() {
9398
+ return {
9399
+ // 虚拟滚动相关
9400
+ scrollTop: 0,
9401
+ scrollLeft: 0,
9402
+ rowHeight: 48,
9403
+ visibleStartIndex: 0,
9404
+ visibleEndIndex: 0,
9405
+ visibleCount: 0,
9406
+ // 表格宽度(用于自适应列宽计算)
9407
+ tableWidth: 0,
9408
+ // 分组合并缓存
9409
+ spanCache: {},
9410
+ // 列扁平化缓存
9411
+ flattenedColumnsCache: [],
9412
+ // 选中数据
9413
+ selectedRows: []
9414
+ }
9415
+ },
9416
+
9417
+ computed: {
9418
+ showPagination() {
9419
+ return this.pagination && this.total > 0
9431
9420
  },
9432
- tableData: {
9433
- type: Array,
9434
- default() {
9435
- return [];
9421
+
9422
+ computedHeight() {
9423
+ if (this.virtualScroll) {
9424
+ return this.height || 400
9436
9425
  }
9426
+ return this.height || undefined
9437
9427
  },
9438
- height: {
9439
- type: [Number, String, Function],
9440
- default: () => null
9441
- },
9442
- elementLoadingText: {
9443
- type: String,
9444
- default: "拼命加载中"
9445
- },
9446
- headerCellStyle: {
9447
- type: Object,
9448
- default: () => {
9449
- return {
9450
- background: "#F8F8F9",
9451
- color: "#606266"
9452
- };
9428
+
9429
+ // 计算固定列总宽度(selection + index + fixed列)
9430
+ fixedColumnWidth() {
9431
+ let width = 0
9432
+ // 选择列
9433
+ if (this.selection) width += 55
9434
+ // 序号列
9435
+ if (this.showIndex) width += 60
9436
+ // fixed 列
9437
+ const sumFixedWidth = (cols) => {
9438
+ cols.forEach(c => {
9439
+ if (c.fixed && (c.width || c.minWidth)) {
9440
+ width += typeof c.width === 'number' ? c.width : (typeof c.minWidth === 'number' ? c.minWidth : 100)
9441
+ }
9442
+ if (c.children && c.children.length) sumFixedWidth(c.children)
9443
+ })
9453
9444
  }
9445
+ sumFixedWidth(this.columns)
9446
+ return width
9454
9447
  },
9455
- loading: {
9456
- type: Boolean,
9457
- default: false
9458
- },
9459
- pageSizes: {
9460
- type: Array,
9461
- default: () => [20, 50, 100, 200]
9448
+
9449
+ // 计算非固定列中已设置width的总宽度
9450
+ nonFixedColumnWidthWithWidth() {
9451
+ let width = 0
9452
+ const sumWidth = (cols) => {
9453
+ cols.forEach(c => {
9454
+ if (!c.fixed && c.width) {
9455
+ width += typeof c.width === 'number' ? c.width : parseInt(c.width) || 0
9456
+ }
9457
+ if (c.children && c.children.length) sumWidth(c.children)
9458
+ })
9459
+ }
9460
+ sumWidth(this.columns)
9461
+ return width
9462
9462
  },
9463
- pagination: {
9464
- type: Object,
9465
- default: null
9463
+
9464
+ // 计算需要自适应的列数(非固定列且未设置width)
9465
+ autoColumnCount() {
9466
+ let count = 0
9467
+ const countCols = (cols) => {
9468
+ cols.forEach(c => {
9469
+ if (!c.fixed) {
9470
+ if (c.children && c.children.length) {
9471
+ countCols(c.children)
9472
+ } else if (!c.width) {
9473
+ // 只有未设置width的非固定列才参与自适应
9474
+ count++
9475
+ }
9476
+ }
9477
+ })
9478
+ }
9479
+ countCols(this.columns)
9480
+ return count
9466
9481
  },
9467
- total: {
9468
- type: Number,
9469
- default: 0
9482
+
9483
+ // 自适应列宽(未设置width的非固定列均分剩余宽度)
9484
+ autoColumnWidth() {
9485
+ const totalWidth = this.tableWidth || 1000
9486
+ const gutter = 12 // el-table 默认 gutter
9487
+ const fixedWidth = this.fixedColumnWidth
9488
+ const nonFixedWithWidth = this.nonFixedColumnWidthWithWidth
9489
+ const autoCount = this.autoColumnCount
9490
+
9491
+ if (autoCount <= 0) return 100 // 默认宽度
9492
+
9493
+ // 自适应宽度 = (总宽度 - gutter - 固定列宽度 - 非固定列中已设置的width)/ 需要自适应的列数
9494
+ const availableWidth = totalWidth - gutter - fixedWidth - nonFixedWithWidth
9495
+ return Math.max(80, Math.floor(availableWidth / autoCount)) // 最小80px
9470
9496
  },
9471
- columns: {
9472
- type: Array,
9473
- default() {
9474
- return [];
9497
+
9498
+ // 表头列定义(用于 colgroup,与 headerRows 列数保持一致)
9499
+ headerCols() {
9500
+ const cols = []
9501
+
9502
+ // 选择列
9503
+ if (this.selection) {
9504
+ cols.push({ _key: 'prepend_selection', _width: 55, _minWidth: 55 })
9475
9505
  }
9476
- },
9477
- insertColumns: {
9478
- type: Array,
9479
- default() {
9480
- return [];
9506
+
9507
+ // 序号列
9508
+ if (this.showIndex) {
9509
+ cols.push({ _key: 'prepend_index', _width: 60, _minWidth: 60 })
9481
9510
  }
9482
- },
9483
- selectable: {
9484
- type: Function,
9485
- default() {
9486
- return () => true;
9511
+
9512
+ // 数据列(只取叶子节点,使用一致的key生成)
9513
+ const addLeafCols = (columns, parentPath = '') => {
9514
+ columns.forEach((col, index) => {
9515
+ const path = parentPath ? `${parentPath}_${index}` : String(index)
9516
+ const key = this.generateColKey(col, path)
9517
+
9518
+ if (col.children && col.children.length) {
9519
+ addLeafCols(col.children, path)
9520
+ } else {
9521
+ cols.push({
9522
+ _key: key,
9523
+ _width: this.getColumnWidth(col),
9524
+ _minWidth: col.minWidth
9525
+ })
9526
+ }
9527
+ })
9487
9528
  }
9529
+ addLeafCols(this.columns)
9530
+
9531
+ return cols
9488
9532
  },
9489
- selection: {
9490
- type: Boolean,
9491
- default: false
9492
- },
9493
- showIndex: {
9494
- type: Boolean,
9495
- default: true
9496
- },
9497
- showRealIndex: {
9498
- type: Boolean,
9499
- default: true
9500
- },
9501
- expand: {
9502
- type: Boolean,
9503
- default: false
9504
- },
9505
- showColumsFilter: {
9506
- type: Boolean,
9507
- default: false
9508
- },
9509
- defaultColumnsFixed: {
9510
- type: Boolean,
9511
- default: true
9512
- },
9513
- autoSetHeight: {
9514
- type: Boolean,
9515
- default: true
9533
+
9534
+ // 表头层级结构(用于自定义固定表头渲染)
9535
+ headerRows() {
9536
+ const rows = []
9537
+ let maxDepth = 1
9538
+
9539
+ // 计算最大深度
9540
+ const calcDepth = (cols, depth) => {
9541
+ maxDepth = Math.max(maxDepth, depth)
9542
+ cols.forEach(c => { if (c.children && c.children.length) calcDepth(c.children, depth + 1) })
9543
+ }
9544
+ if (this.columns.length) calcDepth(this.columns, 1)
9545
+
9546
+ // 初始化行
9547
+ for (let i = 0; i < maxDepth; i++) rows.push([])
9548
+
9549
+ // 计算叶子数量
9550
+ const countLeaves = (cols) => {
9551
+ let n = 0
9552
+ cols.forEach(c => {
9553
+ if (c.children && c.children.length) n += countLeaves(c.children)
9554
+ else n++
9555
+ })
9556
+ return n
9557
+ }
9558
+
9559
+ // 选择列 / 序号列占位(仅第一行,rowspan 跨所有行)
9560
+ if (this.selection) {
9561
+ rows[0].push({
9562
+ _key: 'prepend_selection',
9563
+ _rowspan: maxDepth,
9564
+ _colspan: 1,
9565
+ _style: { width: '55px' },
9566
+ _hidden: false,
9567
+ label: ''
9568
+ })
9569
+ for (let i = 1; i < maxDepth; i++) {
9570
+ rows[i].push({ _key: 'prepend_selection_' + i, _rowspan: 0, _colspan: 1, _hidden: true, label: '' })
9571
+ }
9572
+ }
9573
+ if (this.showIndex) {
9574
+ rows[0].push({
9575
+ _key: 'prepend_index',
9576
+ _rowspan: maxDepth,
9577
+ _colspan: 1,
9578
+ _style: { width: '60px' },
9579
+ _hidden: false,
9580
+ label: '#'
9581
+ })
9582
+ for (let i = 1; i < maxDepth; i++) {
9583
+ rows[i].push({ _key: 'prepend_index_' + i, _rowspan: 0, _colspan: 1, _hidden: true, label: '' })
9584
+ }
9585
+ }
9586
+
9587
+ // 填充列
9588
+ if (this.columns.length) {
9589
+ const fill = (cols, depth, parentPath = '') => {
9590
+ cols.forEach((c, index) => {
9591
+ const path = parentPath ? `${parentPath}_${index}` : String(index)
9592
+ const key = this.generateColKey(c, path)
9593
+ const hasKids = c.children && c.children.length
9594
+ const style = {}
9595
+
9596
+ // 如果有固定宽度,使用固定宽度;否则使用自适应宽度
9597
+ if (c.width) {
9598
+ style.width = typeof c.width === 'number' ? c.width + 'px' : c.width
9599
+ } else if (!c.fixed && this.virtualScroll) {
9600
+ // 非固定列且虚拟滚动时使用自适应宽度
9601
+ style.width = this.autoColumnWidth + 'px'
9602
+ }
9603
+
9604
+ if (c.minWidth) style.minWidth = typeof c.minWidth === 'number' ? c.minWidth + 'px' : c.minWidth
9605
+
9606
+ rows[depth].push({
9607
+ _key: key,
9608
+ _rowspan: hasKids ? 1 : maxDepth - depth,
9609
+ _colspan: hasKids ? countLeaves(c.children) : 1,
9610
+ _style: style,
9611
+ _hidden: !c.label && !c.prop,
9612
+ label: c.label || ''
9613
+ })
9614
+ if (hasKids) fill(c.children, depth + 1, path)
9615
+ })
9616
+ }
9617
+ fill(this.columns, 0)
9618
+ }
9619
+
9620
+ return rows
9516
9621
  },
9517
- simplePage: {
9518
- type: Boolean,
9519
- default: false
9622
+
9623
+ // 处理后的数据(注入小计/总计行)
9624
+ processedTableData() {
9625
+ if (!this.tableData.length) return []
9626
+
9627
+ let data = [...this.tableData]
9628
+ const hasSubtotal = this.subtotalConfig && this.subtotalConfig.enabled
9629
+ const hasTotal = this.totalConfig && this.totalConfig.enabled
9630
+
9631
+ if (!hasSubtotal && !hasTotal) return data
9632
+
9633
+ // 找到第一个数据列作为标签列
9634
+ const labelColumn = this.findLabelColumn()
9635
+
9636
+ let result = []
9637
+
9638
+ if (hasSubtotal && this.subtotalConfig.groupBy && this.subtotalConfig.groupBy.length) {
9639
+ // 按 groupBy 分组
9640
+ const groups = this.groupData(data, this.subtotalConfig.groupBy)
9641
+ groups.forEach((groupRows, groupKey) => {
9642
+ // 插入数据行
9643
+ result.push(...groupRows)
9644
+ // 插入小计行
9645
+ const subtotalRow = this.createSubtotalRow(groupRows, groupKey)
9646
+ result.push(subtotalRow)
9647
+ })
9648
+ } else {
9649
+ result = data
9650
+ }
9651
+
9652
+ // 插入总计行
9653
+ if (hasTotal) {
9654
+ const totalRow = this.createTotalRow(data)
9655
+ result.push(totalRow)
9656
+ }
9657
+
9658
+ return result
9520
9659
  },
9521
- border: {
9522
- type: Boolean,
9523
- default: true
9660
+
9661
+ // 虚拟滚动总高度
9662
+ virtualTotalHeight() {
9663
+ const data = this.processedTableData
9664
+ return data.length * this.rowHeight
9524
9665
  },
9525
- indexRender: Function,
9526
- spanFields: {
9527
- type: Object
9666
+
9667
+ // 虚拟滚动偏移量
9668
+ virtualOffsetY() {
9669
+ const start = Math.max(0, this.visibleStartIndex - this.bufferSize)
9670
+ return start * this.rowHeight
9528
9671
  },
9529
- groupColumns: {
9530
- type: Array,
9531
- default() {
9532
- return [];
9672
+
9673
+ // 扁平化列配置(处理 children 嵌套)
9674
+ flattenedColumns() {
9675
+ if (this.flattenedColumnsCache.length) return this.flattenedColumnsCache
9676
+ const result = []
9677
+ const flatten = (cols) => {
9678
+ cols.forEach(col => {
9679
+ const key = col.prop || col.label || Math.random().toString(36).slice(2)
9680
+ result.push({ ...col, _key: key })
9681
+ })
9533
9682
  }
9683
+ flatten(this.columns)
9684
+ this.flattenedColumnsCache = result
9685
+ return result
9534
9686
  },
9535
- title: {},
9536
- emptSubTitle: {},
9537
- toolExport: {
9538
- type: Function,
9539
- default: null
9540
- }
9541
- },
9542
- data() {
9543
- return {
9544
- startIndex: 0,
9545
- inTableHeight: 0,
9546
- dropvisible: false,
9547
- hasLoad: true,
9548
- hasLoadData: false,
9549
- diyColumns: this.columns || [],
9550
- checkedColumns: [],
9551
- tableColumns: []
9552
- };
9553
- },
9554
- computed: {
9555
- spanTableData() {
9556
- return this.calculateGroupSpans(this.tableData, this.spanFields);
9557
- },
9558
- constColums() {
9559
- const _isFixed = this.defaultColumnsFixed ? "left" : null;
9560
- const _index = { type: "index", align: "center", label: this.showColumsFilter ? "" : "序号", width: "80", fixed: _isFixed, index: this.indexRender };
9561
- const _selection = { type: "selection", align: "center", width: "50", fixed: _isFixed };
9562
- if (this.hasLoad || !this.tbId) {
9563
- return this.selection ? this.showIndex ? [_index, _selection] : [_selection] : (this.showIndex ? [_index] : []);
9564
- } else {
9565
- return [];
9687
+
9688
+ // 虚拟滚动时的可见数据
9689
+ visibleData() {
9690
+ const data = this.processedTableData
9691
+ if (!this.virtualScroll || data.length === 0) {
9692
+ return data
9566
9693
  }
9694
+ const start = Math.max(0, this.visibleStartIndex - this.bufferSize)
9695
+ const end = Math.min(data.length, this.visibleEndIndex + this.bufferSize)
9696
+ return data.slice(start, end)
9567
9697
  }
9568
9698
  },
9699
+
9569
9700
  watch: {
9570
- height(val) {
9571
- this.changeTableHight();
9572
- },
9573
- insertColumns: {
9574
- deep: true,
9575
- handler(val) {
9576
- this.getTableColumns().then(list => {
9577
- this.diyColumns = list;
9578
- const _insertColumns = this.insertColumns;
9579
- _insertColumns.forEach(custom => {
9580
- list.splice(custom.insertIndex, 0, {
9581
- type: "custom",
9582
- ...custom
9583
- });
9584
- });
9585
- this.tableColumns = list.filter(item => (item.show === undefined ? true : item.show));
9586
- this.checkedColumns = this.updateCheckColumns(this.tableColumns);
9587
- this.changeTableHight();
9588
- });
9589
- }
9701
+ tableData: {
9702
+ handler() {
9703
+ this.spanCache = {}
9704
+ this.flattenedColumnsCache = []
9705
+ if (this.virtualScroll) {
9706
+ this.$nextTick(() => {
9707
+ this.measureRowHeight()
9708
+ this.updateVisibleRange()
9709
+ })
9710
+ }
9711
+ },
9712
+ immediate: false
9590
9713
  },
9714
+
9591
9715
  columns: {
9592
- deep: true,
9593
- immediate: true,
9594
- handler(val) {
9595
- this.getTableColumns().then(list => {
9596
- this.diyColumns = list;
9597
- this.tableColumns = list.filter(item => (item.show === undefined ? true : item.show));
9598
- this.checkedColumns = this.updateCheckColumns(this.tableColumns);
9599
- this.changeTableHight();
9600
- });
9601
- }
9716
+ handler() {
9717
+ this.flattenedColumnsCache = []
9718
+ },
9719
+ deep: true
9602
9720
  },
9603
- tableData: {
9604
- handler(val) {
9605
- this.$nextTick(() => {
9606
- this.changeTableHight();
9607
- this.hasLoadData = true;
9608
- });
9721
+
9722
+ virtualScroll(val) {
9723
+ if (val) {
9724
+ this.$nextTick(() => this.initVirtualScroll())
9725
+ } else {
9726
+ this.destroyVirtualScroll()
9609
9727
  }
9610
9728
  }
9611
9729
  },
9730
+
9612
9731
  mounted() {
9613
- this.$nextTick(() => {
9614
- this.changeTableHight();
9615
- if (!this.height) {
9616
- window.onresize = () => {
9617
- this.changeTableHight();
9618
- };
9732
+ if (this.virtualScroll) {
9733
+ this.$nextTick(() => this.initVirtualScroll())
9734
+ }
9735
+ // 监听窗口resize,更新表格宽度
9736
+ this.resizeHandler = () => {
9737
+ if (this.virtualScroll) {
9738
+ this.$nextTick(() => this.updateTableWidth())
9619
9739
  }
9620
- });
9621
- },
9622
- activated() {
9623
- this.doLayout();
9740
+ }
9741
+ window.addEventListener('resize', this.resizeHandler)
9624
9742
  },
9743
+
9625
9744
  beforeDestroy() {
9626
- document.removeEventListener("click", this.handleDocumentClick);
9745
+ this.destroyVirtualScroll()
9746
+ window.removeEventListener('resize', this.resizeHandler)
9627
9747
  },
9748
+
9628
9749
  methods: {
9629
- realIndexRender(index) {
9630
- if (this.pagination) {
9631
- return this.pagination.PageSize * (this.pagination.PageNum - 1) + index + 1;
9750
+ // ==================== 小计/总计工具函数 ====================
9751
+ // 找到第一个数据列(非 selection/index),用于显示"小计"/"总计"标签
9752
+ findLabelColumn() {
9753
+ for (const col of this.columns) {
9754
+ if (col.children && col.children.length) {
9755
+ for (const child of col.children) {
9756
+ if (child.prop) return { prop: child.prop, label: child.label }
9757
+ }
9758
+ } else if (col.prop) {
9759
+ return { prop: col.prop, label: col.label }
9760
+ }
9632
9761
  }
9633
- return index + 1;
9762
+ return { prop: '', label: '' }
9634
9763
  },
9635
- updateCheckColumns(columnsData) {
9636
- const checkArr = [];
9637
- columnsData.forEach(item => {
9638
- const { prop, show } = item;
9639
- if (prop) {
9640
- const isHidden = (show !== undefined) && !show;
9641
- !isHidden && checkArr.push(prop);
9764
+
9765
+ // 按指定字段分组(保持分组顺序)
9766
+ groupData(data, groupBy) {
9767
+ const map = new Map()
9768
+ data.forEach(row => {
9769
+ const key = groupBy.map(f => row[f]).join('|||')
9770
+ if (!map.has(key)) {
9771
+ map.set(key, [])
9642
9772
  }
9643
- });
9644
- return checkArr;
9773
+ map.get(key).push(row)
9774
+ })
9775
+ return map
9645
9776
  },
9646
- getTableColumns() {
9647
- const _columns = [];
9648
- return new Promise((resolve, reject) => {
9649
- if (!this.hasLoad && this.tbId) {
9650
- resolve(this.columns);
9651
- this.$emit("update:showColumsFilter", false);
9652
- } else {
9653
- resolve(this.columns);
9654
- this.$emit("update:showColumsFilter", false);
9655
- }
9656
- });
9657
- },
9658
- handleDropVisible() {
9659
- this.dropvisible = !this.dropvisible;
9660
- if (this.dropvisible) {
9661
- document.addEventListener("click", this.handleDocumentClick);
9662
- } else {
9663
- document.removeEventListener("click", this.handleDocumentClick);
9777
+
9778
+ // 计算单列的聚合值
9779
+ _calcValue(rows, calc) {
9780
+ // 自定义函数
9781
+ if (typeof calc === 'function') return calc(rows)
9782
+
9783
+ // 字符串:'sum' | 'avg' | 'count' | 'min' | 'max'(需配合 prop 使用)
9784
+
9785
+ // 对象:{ prop: 'field', type: 'sum' } 或 { prop: 'field' } (默认 sum)
9786
+ const prop = calc.prop
9787
+ const type = calc.type || 'sum'
9788
+ const vals = prop ? rows.map(r => parseFloat(r[prop]) || 0) : []
9789
+ switch (type) {
9790
+ case 'sum': return vals.reduce((s, v) => s + v, 0)
9791
+ case 'avg': case 'average': return vals.length ? (vals.reduce((s, v) => s + v, 0) / vals.length) : 0
9792
+ case 'count': return rows.length
9793
+ case 'min': return vals.length ? Math.min(...vals) : 0
9794
+ case 'max': return vals.length ? Math.max(...vals) : 0
9795
+ default: return ''
9664
9796
  }
9665
9797
  },
9666
- handleDocumentClick(event) {
9667
- const popoverEl = document.querySelector(".filter-tool");
9668
- if (!popoverEl.contains(event.target)) {
9669
- this.dropvisible = false;
9670
- document.removeEventListener("click", this.handleDocumentClick);
9798
+
9799
+ // 创建小计行
9800
+ createSubtotalRow(groupRows, groupKey) {
9801
+ const config = this.subtotalConfig
9802
+ const rawLabelProp = this.findLabelColumn()
9803
+
9804
+ // 获取第一个 groupBy 列的值显示
9805
+ const labelField = config.groupBy ? config.groupBy[0] : ''
9806
+ const groupValue = groupRows[0] ? groupRows[0][labelField] : groupKey
9807
+ const labelText = config.labelText || `${groupValue} 小计`
9808
+
9809
+ const row = { _rowType: 'subtotal', _groupKey: groupKey }
9810
+ row[rawLabelProp.prop] = labelText
9811
+
9812
+ // 计算各列的聚合值
9813
+ if (config.columns) {
9814
+ Object.keys(config.columns).forEach(prop => {
9815
+ const calc = config.columns[prop]
9816
+ row[prop] = typeof calc === 'string'
9817
+ ? this._calcValue(groupRows, { prop, type: calc })
9818
+ : this._calcValue(groupRows, calc)
9819
+ })
9671
9820
  }
9821
+
9822
+ return row
9672
9823
  },
9673
- handleToggle(show, item) {
9674
- if (this.checkedColumns.length === 0) {
9675
- this.$message.warning("至少选择一列显示!");
9676
- return;
9824
+
9825
+ // 创建总计行
9826
+ createTotalRow(allRows) {
9827
+ const config = this.totalConfig
9828
+ const rawLabelProp = this.findLabelColumn()
9829
+ const labelText = config.labelText || '总计'
9830
+
9831
+ const row = { _rowType: 'total' }
9832
+ row[rawLabelProp.prop] = labelText
9833
+
9834
+ // 计算各列的聚合值
9835
+ if (config.columns) {
9836
+ Object.keys(config.columns).forEach(prop => {
9837
+ const calc = config.columns[prop]
9838
+ row[prop] = typeof calc === 'string'
9839
+ ? this._calcValue(allRows, { prop, type: calc })
9840
+ : this._calcValue(allRows, calc)
9841
+ })
9677
9842
  }
9678
- this.$emit("update:loading", true);
9679
- item.show = show;
9680
- this.tableColumns = this.diyColumns.filter(item => (item.show === undefined ? true : item.show));
9681
- this.checkedColumns = this.updateCheckColumns(this.tableColumns);
9682
- this.dropvisible = false;
9683
- this.changeTableHight();
9684
- this.$nextTick(() => {
9685
- this.doLayout();
9686
- });
9843
+
9844
+ return row
9687
9845
  },
9688
- doLayout() {
9689
- this.$refs.ExtendTable && this.$refs.ExtendTable.doLayout();
9846
+
9847
+ // 行类名(小计/总计行样式)
9848
+ getRowClassName({ row }) {
9849
+ if (!row) return ''
9850
+ if (row._rowType === 'subtotal') return 'ex-table-row-subtotal'
9851
+ if (row._rowType === 'total') return 'ex-table-row-total'
9852
+ return ''
9690
9853
  },
9691
- getAttrs() {
9692
- return {
9693
- height: this.autoSetHeight ? this.inTableHeight : undefined,
9694
- border: this.border,
9695
- stripe: true,
9696
- highlightCurrentRow: true,
9697
- headerCellStyle: this.headerCellStyle,
9698
- elementLoadingText: this.elementLoadingText,
9699
- spanMethod: this.spanFields || this.groupColumns.length ? this.handleSpanMethod : null,
9700
- ...this.$attrs
9701
- };
9854
+
9855
+ // ==================== 列配置 ====================
9856
+ getColumnProps(col) {
9857
+ const { _key, children, render, formatter, slot, ...props } = col
9858
+ return props
9702
9859
  },
9703
- handleSpanMethod({ row, column, rowIndex, columnIndex }) {
9704
- if (this.spanFields) {
9705
- const field = this.spanFields[columnIndex];
9706
- if (field && row[`_${field}_start`]) {
9707
- return {
9708
- rowspan: row[`_${field}_span`],
9709
- colspan: 1
9710
- };
9711
- } else if (field && !row[`_${field}_start`]) {
9712
- return {
9713
- rowspan: 0,
9714
- colspan: 0
9715
- };
9716
- }
9717
- }
9718
- if (this.groupColumns.length) {
9719
- const leftIndex = (Number(this.selection) + Number(this.showIndex));
9720
- const groupColumnIndex = columnIndex - leftIndex;
9721
- if (columnIndex >= leftIndex && columnIndex < leftIndex + this.groupColumns.length) {
9722
- const groupIndex = groupColumnIndex;
9723
- if (groupIndex >= 0 && groupColumnIndex < this.groupColumns.length) {
9724
- return this.getSpan(rowIndex, groupIndex);
9725
- }
9860
+
9861
+ // ==================== 序号方法 ====================
9862
+ indexMethod(index) {
9863
+ if (this.virtualScroll && this.visibleData.length > 0) {
9864
+ const row = this.visibleData[index]
9865
+ if (row && row._realIndex !== undefined) {
9866
+ return row._realIndex + 1
9726
9867
  }
9727
- return { rowspan: 1, colspan: 1 };
9728
9868
  }
9869
+ return index + 1
9729
9870
  },
9730
- getSpan(rowIndex, groupIndex) {
9731
- const spans = this.calculateSpans();
9732
- if (spans[rowIndex] && spans[rowIndex][groupIndex]) {
9733
- return spans[rowIndex][groupIndex];
9734
- }
9735
- return { rowspan: 1, colspan: 1 };
9736
- },
9737
- calculateSpans() {
9738
- const spans = [];
9739
- const rowCount = this.tableData.length;
9740
-
9741
- if (rowCount === 0) return spans;
9742
9871
 
9743
- for (let i = 0; i < rowCount; i++) {
9744
- spans[i] = [];
9745
- for (let j = 0; j < this.groupColumns.length; j++) {
9746
- spans[i][j] = { rowspan: 1, colspan: 1 };
9747
- }
9872
+ // ==================== 分组合并 ====================
9873
+ handleSpanMethod({ row, column, rowIndex }) {
9874
+ // 跳过小计/总计行,不做合并
9875
+ if (row._rowType === 'subtotal' || row._rowType === 'total') {
9876
+ return { rowspan: 1, colspan: 1 }
9748
9877
  }
9749
9878
 
9750
- for (let level = 0; level < this.groupColumns.length; level++) {
9751
- let pos = 0;
9752
- while (pos < rowCount) {
9753
- const startPos = pos;
9879
+ if (!this.groupColumns.length) return { rowspan: 1, colspan: 1 }
9754
9880
 
9755
- let endPos = startPos;
9756
- const currentValue = this.tableData[startPos][this.groupColumns[level].prop];
9881
+ const data = this.virtualScroll ? this.visibleData : this.processedTableData
9882
+ const prop = column.property
9883
+ const groupIndex = this.groupColumns.indexOf(prop)
9757
9884
 
9758
- let sameParent = true;
9885
+ if (groupIndex === -1) return { rowspan: 1, colspan: 1 }
9759
9886
 
9760
- for (let parentLevel = 0; parentLevel < level; parentLevel++) {
9761
- if (this.tableData[startPos][this.groupColumns[parentLevel].prop] !== this.tableData[endPos][this.groupColumns[parentLevel].prop]) {
9762
- sameParent = false;
9763
- break;
9764
- }
9765
- }
9766
-
9767
- if (sameParent) {
9768
- while (endPos + 1 < rowCount && this.tableData[endPos + 1][this.groupColumns[level].prop] === currentValue && this.checkParentSame(startPos, endPos + 1, level)) {
9769
- endPos++;
9770
- }
9771
- }
9887
+ // 检查缓存
9888
+ const cacheKey = `${rowIndex}_${prop}`
9889
+ if (this.spanCache[cacheKey]) return this.spanCache[cacheKey]
9772
9890
 
9773
- if (endPos > startPos) {
9774
- spans[startPos][level].rowspan = endPos - startPos + 1;
9775
- for (let i = startPos + 1; i <= endPos; i++) {
9776
- spans[i][level].rowspan = 0;
9777
- spans[i][level].colspan = 0;
9778
- }
9891
+ // 判断当前行是否与前一行在分组列上完全相同
9892
+ if (rowIndex > 0) {
9893
+ const prevRow = data[rowIndex - 1]
9894
+ let isSame = true
9895
+ for (let i = 0; i <= groupIndex; i++) {
9896
+ const gp = this.groupColumns[i]
9897
+ if (prevRow[gp] !== row[gp]) {
9898
+ isSame = false
9899
+ break
9779
9900
  }
9780
-
9781
- pos = endPos + 1;
9782
9901
  }
9783
- }
9784
- return spans;
9785
- },
9786
- checkParentSame(rowIndex1, rowIndex2, currentLevel) {
9787
- for (let level = 0; level < currentLevel; level++) {
9788
- const prop = this.groupColumns[level].prop;
9789
- if (this.tableData[rowIndex1][prop] != this.tableData[rowIndex2][prop]) {
9790
- return false;
9902
+ if (isSame) {
9903
+ const result = { rowspan: 0, colspan: 1 }
9904
+ this.spanCache[cacheKey] = result
9905
+ return result
9791
9906
  }
9792
9907
  }
9793
- return true;
9794
- },
9795
- calculateGroupSpans(data, spanFields) {
9796
- const result = data.map(item => ({ ...item }));
9797
- for (const fieldIndex in spanFields) {
9798
- const field = spanFields[fieldIndex];
9799
- let currentValue = null;
9800
- let startIndex = 0;
9801
9908
 
9802
- result.forEach((row, index) => {
9803
- if (row[field] !== currentValue) {
9804
- currentValue = row[field];
9805
- startIndex = index;
9909
+ // 向下扫描计算合并行数
9910
+ let count = 1
9911
+ for (let i = rowIndex + 1; i < data.length; i++) {
9912
+ const nextRow = data[i]
9913
+ let isSame = true
9914
+ for (let j = 0; j <= groupIndex; j++) {
9915
+ const gp = this.groupColumns[j]
9916
+ if (nextRow[gp] !== row[gp]) {
9917
+ isSame = false
9918
+ break
9806
9919
  }
9920
+ }
9921
+ if (isSame) {
9922
+ count++
9923
+ } else {
9924
+ break
9925
+ }
9926
+ }
9807
9927
 
9808
- row[`_${field}_span`] = 0;
9809
- row[`_${field}_start`] = false;
9810
-
9811
- let endIndex = index;
9928
+ const result = { rowspan: count > 1 ? count : 1, colspan: 1 }
9929
+ this.spanCache[cacheKey] = result
9930
+ return result
9931
+ },
9812
9932
 
9813
- while (endIndex + 1 < result.length && result[endIndex + 1][field] === currentValue) {
9814
- endIndex++;
9815
- }
9816
- if (index === startIndex) {
9817
- row[`_${field}_span`] = endIndex - startIndex + 1;
9818
- row[`_${field}_start`] = true;
9819
- }
9820
- });
9821
- }
9822
- return result;
9933
+ // ==================== 选择 ====================
9934
+ handleSelectionChange(rows) {
9935
+ // 过滤掉小计/总计行
9936
+ this.selectedRows = rows.filter(r => !r._rowType)
9937
+ this.$emit('selection-change', this.selectedRows)
9823
9938
  },
9824
- changeTableHight() {
9825
- try {
9826
- if (!this.autoSetHeight) return;
9827
- if (this.height) {
9828
- this.inTableHeight = (this.height - 1 - (this.title ? 40 : 0));
9829
- this.$nextTick(() => {
9830
- this.doLayout();
9831
- });
9832
- return;
9833
- }
9834
- let tableHeight = window.innerHeight || document.body.clientHeight;
9835
- const disTop = this.$refs.ExtendTable.$el;
9836
- tableHeight -= (disTop.getBoundingClientRect().top + 20 + 1);
9837
- tableHeight -= this.$refs.toolBar.offsetHeight;
9838
- this.inTableHeight = tableHeight;
9839
- this.doLayout();
9840
- } catch (err) {
9841
- console.log(err);
9842
- }
9939
+
9940
+ // ==================== 排序 ====================
9941
+ handleSortChange({ prop, order }) {
9942
+ this.$emit('sort-change', { prop, order })
9843
9943
  },
9844
- setAttrs(params) {
9845
- const { ...options } = params;
9846
- if (!options.align) {
9847
- options.align = "center";
9848
- }
9849
- if (options.showTip) {
9850
- options.showOverflowTooltip = true;
9851
- }
9852
- return { ...options };
9944
+
9945
+ // ==================== 分页 ====================
9946
+ handleSizeChange(size) {
9947
+ this.$emit('size-change', size)
9853
9948
  },
9854
- changeTableSort(column) {
9855
- const sortingType = column.order;
9856
- const sidx = sortingType ? column.prop : "";
9857
- let sord = "";
9858
- if (sortingType === "descending") {
9859
- sord = "desc";
9860
- } else if (sortingType === "ascending") {
9861
- sord = "asc";
9862
- }
9863
- this.$emit("changeTableSort", sidx, sord);
9949
+
9950
+ handleCurrentChange(page) {
9951
+ this.$emit('page-change', page)
9864
9952
  },
9953
+
9954
+ // ==================== 公开方法 ====================
9865
9955
  getSelection() {
9866
- return this.$refs.ExtendTable.store.states.selection;
9956
+ return this.selectedRows
9867
9957
  },
9958
+
9868
9959
  clearSelection() {
9869
- this.$refs.ExtendTable.store.clearSelection();
9870
- this.$refs.ExtendTable.store.updateAllSelected();
9871
- return this;
9960
+ this.$refs.table && this.$refs.table.clearSelection()
9961
+ this.selectedRows = []
9872
9962
  },
9873
- toggleRowSelection(rows, selected) {
9874
- this.$refs.ExtendTable.toggleRowSelection(rows, true);
9963
+
9964
+ toggleRowSelection(row, selected) {
9965
+ this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
9875
9966
  },
9967
+
9876
9968
  toggleRowsSelection(rows, selected) {
9877
- if (rows instanceof Array) {
9969
+ if (rows && rows.length) {
9878
9970
  rows.forEach(row => {
9879
- this.$refs.ExtendTable.store.toggleRowSelection(row, selected, true);
9880
- });
9881
- } else {
9882
- this.$refs.ExtendTable.store.toggleRowSelection(rows, selected, true);
9971
+ this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
9972
+ })
9883
9973
  }
9884
- this.$refs.ExtendTable.store.updateAllSelected();
9885
9974
  },
9886
- rowChange(newVal, oldVal) {
9887
- this.$emit("currentChange", newVal, oldVal);
9975
+
9976
+ doLayout() {
9977
+ this.$refs.table && this.$refs.table.doLayout()
9888
9978
  },
9889
- rowClick(row) {
9890
- this.$emit("rowClick", row);
9979
+
9980
+ // 获取列宽度(支持自适应)
9981
+ getColumnWidth(col) {
9982
+ // 如果有固定宽度,使用固定宽度
9983
+ if (col.width) {
9984
+ return typeof col.width === 'number' ? col.width : col.width.replace('px', '')
9985
+ }
9986
+ // 非固定列且虚拟滚动时使用自适应宽度
9987
+ if (!col.fixed && this.virtualScroll) {
9988
+ return this.autoColumnWidth
9989
+ }
9990
+ // 默认宽度
9991
+ if (col.minWidth) {
9992
+ return typeof col.minWidth === 'number' ? col.minWidth : col.minWidth.replace('px', '')
9993
+ }
9994
+ return 100
9891
9995
  },
9892
- pageChange(val) {
9893
- this.$emit("pageChange", val);
9996
+
9997
+ // 更新表格宽度(用于自适应列宽计算)
9998
+ updateTableWidth() {
9999
+ const tableWrapper = this.$refs.tableBody
10000
+ if (tableWrapper) {
10001
+ this.tableWidth = tableWrapper.offsetWidth || 1000
10002
+ }
9894
10003
  },
9895
- sizeChange(val) {
9896
- this.$emit("sizeChange", val);
10004
+
10005
+ // ==================== 虚拟滚动 ====================
10006
+ initVirtualScroll() {
10007
+ this.updateTableWidth()
10008
+ this.measureRowHeight()
10009
+ if (this.processedTableData.length > 0) {
10010
+ this.updateVisibleRange()
10011
+ }
9897
10012
  },
9898
- selectionChange(selections) {
9899
- this.$emit("selectionChange", selections);
10013
+
10014
+ measureRowHeight() {
10015
+ const el = this.$refs.table && this.$refs.table.$el
10016
+ if (!el) return
10017
+ const row = el.querySelector('.el-table__row')
10018
+ if (row) {
10019
+ this.rowHeight = row.offsetHeight || this.rowInitHeight
10020
+ }
9900
10021
  },
9901
- exportTableData() {
9902
- const title = this.title;
9903
- const list = [...this.tableData];
9904
-
9905
- if (typeof this.toolExport === 'function') {
9906
- try {
9907
- this.toolExport(list, title, this.columns);
9908
- } catch (error) {
9909
- console.error('Export hook error:', error);
9910
- }
10022
+
10023
+ handleBodyScroll(event) {
10024
+ const target = event.target
10025
+ this.scrollLeft = target.scrollLeft
10026
+ if (this.virtualScroll) {
10027
+ this.scrollTop = target.scrollTop
10028
+ this.updateVisibleRange()
9911
10029
  }
10030
+ },
10031
+
10032
+ updateVisibleRange() {
10033
+ const totalCount = this.processedTableData.length
10034
+ if (totalCount === 0 || this.rowHeight === 0) return
10035
+
10036
+ const visibleCount = Math.ceil((this.computedHeight || 400) / this.rowHeight)
10037
+
10038
+ this.visibleStartIndex = Math.max(0, Math.floor(this.scrollTop / this.rowHeight))
10039
+ this.visibleEndIndex = Math.min(
10040
+ totalCount,
10041
+ this.visibleStartIndex + visibleCount
10042
+ )
10043
+ this.visibleCount = visibleCount
10044
+ },
10045
+
10046
+ destroyVirtualScroll() {
10047
+ this.scrollTop = 0
10048
+ this.visibleStartIndex = 0
10049
+ this.visibleEndIndex = 0
9912
10050
  }
9913
10051
  }
9914
10052
  });
9915
10053
 
9916
10054
  // CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=script&lang=js
9917
10055
  /* harmony default export */ var components_ex_tablevue_type_script_lang_js = (ex_tablevue_type_script_lang_js);
9918
- // EXTERNAL MODULE: ./src/components/ex-table/index.vue?vue&type=style&index=0&id=209e311e&prod&lang=scss&scoped=true
9919
- var ex_tablevue_type_style_index_0_id_209e311e_prod_lang_scss_scoped_true = __webpack_require__("0b58");
10056
+ // EXTERNAL MODULE: ./src/components/ex-table/index.vue?vue&type=style&index=0&id=216b80f8&prod&scoped=true&lang=css
10057
+ var ex_tablevue_type_style_index_0_id_216b80f8_prod_scoped_true_lang_css = __webpack_require__("cdf7");
9920
10058
 
9921
10059
  // CONCATENATED MODULE: ./src/components/ex-table/index.vue
9922
10060
 
@@ -9929,11 +10067,11 @@ var ex_tablevue_type_style_index_0_id_209e311e_prod_lang_scss_scoped_true = __we
9929
10067
 
9930
10068
  var ex_table_component = Object(componentNormalizer["a" /* default */])(
9931
10069
  components_ex_tablevue_type_script_lang_js,
9932
- ex_tablevue_type_template_id_209e311e_scoped_true_render,
9933
- ex_tablevue_type_template_id_209e311e_scoped_true_staticRenderFns,
10070
+ ex_tablevue_type_template_id_216b80f8_scoped_true_render,
10071
+ ex_tablevue_type_template_id_216b80f8_scoped_true_staticRenderFns,
9934
10072
  false,
9935
10073
  null,
9936
- "209e311e",
10074
+ "216b80f8",
9937
10075
  null
9938
10076
 
9939
10077
  )