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.
- package/README.md +84 -16
- package/lib/index.common.2.js +1 -1
- package/lib/index.common.3.js +1 -1
- package/lib/index.common.4.js +1 -1
- package/lib/index.common.5.js +1 -1
- package/lib/index.common.6.js +1 -1
- package/lib/index.common.js +685 -547
- package/lib/index.css +1 -1
- package/lib/index.umd.2.js +1 -1
- package/lib/index.umd.3.js +1 -1
- package/lib/index.umd.4.js +1 -1
- package/lib/index.umd.5.js +1 -1
- package/lib/index.umd.6.js +1 -1
- package/lib/index.umd.js +685 -547
- package/lib/index.umd.min.js +1 -1
- package/package.json +6 -6
- package/src/components/ex-table/ExTableCell.vue +22 -0
- package/src/components/ex-table/index.js +2 -2
- package/src/components/ex-table/index.vue +901 -576
- package/src/components/xt-card/index.vue +1 -0
- package/src/components/ex-table/ExCell.vue +0 -27
- package/src/components/ex-table/ExColumn.vue +0 -36
- package/src/components/ex-table/processor.js +0 -380
package/lib/index.umd.js
CHANGED
|
@@ -317,17 +317,6 @@ function startOfDay (dirtyDate) {
|
|
|
317
317
|
module.exports = startOfDay
|
|
318
318
|
|
|
319
319
|
|
|
320
|
-
/***/ }),
|
|
321
|
-
|
|
322
|
-
/***/ "0b58":
|
|
323
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
324
|
-
|
|
325
|
-
"use strict";
|
|
326
|
-
/* 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");
|
|
327
|
-
/* 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__);
|
|
328
|
-
/* unused harmony reexport * */
|
|
329
|
-
|
|
330
|
-
|
|
331
320
|
/***/ }),
|
|
332
321
|
|
|
333
322
|
/***/ "0d3e":
|
|
@@ -2153,6 +2142,13 @@ function isThisMinute (dirtyDate) {
|
|
|
2153
2142
|
module.exports = isThisMinute
|
|
2154
2143
|
|
|
2155
2144
|
|
|
2145
|
+
/***/ }),
|
|
2146
|
+
|
|
2147
|
+
/***/ "3f1a":
|
|
2148
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2149
|
+
|
|
2150
|
+
// extracted by mini-css-extract-plugin
|
|
2151
|
+
|
|
2156
2152
|
/***/ }),
|
|
2157
2153
|
|
|
2158
2154
|
/***/ "4175":
|
|
@@ -3610,13 +3606,6 @@ function addWeeks (dirtyDate, dirtyAmount) {
|
|
|
3610
3606
|
module.exports = addWeeks
|
|
3611
3607
|
|
|
3612
3608
|
|
|
3613
|
-
/***/ }),
|
|
3614
|
-
|
|
3615
|
-
/***/ "7de5":
|
|
3616
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
3617
|
-
|
|
3618
|
-
// extracted by mini-css-extract-plugin
|
|
3619
|
-
|
|
3620
3609
|
/***/ }),
|
|
3621
3610
|
|
|
3622
3611
|
/***/ "7eea":
|
|
@@ -6124,6 +6113,17 @@ function isSameISOWeek (dirtyDateLeft, dirtyDateRight) {
|
|
|
6124
6113
|
module.exports = isSameISOWeek
|
|
6125
6114
|
|
|
6126
6115
|
|
|
6116
|
+
/***/ }),
|
|
6117
|
+
|
|
6118
|
+
/***/ "cdf7":
|
|
6119
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6120
|
+
|
|
6121
|
+
"use strict";
|
|
6122
|
+
/* 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");
|
|
6123
|
+
/* 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__);
|
|
6124
|
+
/* unused harmony reexport * */
|
|
6125
|
+
|
|
6126
|
+
|
|
6127
6127
|
/***/ }),
|
|
6128
6128
|
|
|
6129
6129
|
/***/ "ce3d":
|
|
@@ -7494,7 +7494,7 @@ const onConfigChange = function(listener) {
|
|
|
7494
7494
|
onConfigChange
|
|
7495
7495
|
});
|
|
7496
7496
|
|
|
7497
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
7497
|
+
// 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
|
|
7498
7498
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('button',{staticClass:"el-button xt-button",class:[
|
|
7499
7499
|
_vm.type ?'xt-button--' + _vm.type: '',
|
|
7500
7500
|
_vm.size ? 'xt-button--' + _vm.size : '',
|
|
@@ -7575,7 +7575,7 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
7575
7575
|
// CONCATENATED MODULE: ./src/components/xt-button/index.js
|
|
7576
7576
|
|
|
7577
7577
|
/* harmony default export */ var components_xt_button = (xt_button);
|
|
7578
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
7578
|
+
// 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
|
|
7579
7579
|
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)
|
|
7580
7580
|
}
|
|
7581
7581
|
var xt_inputvue_type_template_id_f11783a2_staticRenderFns = []
|
|
@@ -7635,7 +7635,7 @@ var xt_input_component = Object(componentNormalizer["a" /* default */])(
|
|
|
7635
7635
|
// CONCATENATED MODULE: ./src/components/xt-input/index.js
|
|
7636
7636
|
|
|
7637
7637
|
/* harmony default export */ var components_xt_input = (xt_input);
|
|
7638
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
7638
|
+
// 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
|
|
7639
7639
|
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)
|
|
7640
7640
|
}
|
|
7641
7641
|
var xt_flex_boxvue_type_template_id_21429280_staticRenderFns = []
|
|
@@ -7697,13 +7697,13 @@ var xt_flex_box_component = Object(componentNormalizer["a" /* default */])(
|
|
|
7697
7697
|
// CONCATENATED MODULE: ./src/components/xt-flex-box/index.js
|
|
7698
7698
|
|
|
7699
7699
|
/* harmony default export */ var components_xt_flex_box = (xt_flex_box);
|
|
7700
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
7701
|
-
var
|
|
7700
|
+
// 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
|
|
7701
|
+
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)])
|
|
7702
7702
|
}
|
|
7703
|
-
var
|
|
7703
|
+
var xt_cardvue_type_template_id_bc9ed1fa_staticRenderFns = []
|
|
7704
7704
|
|
|
7705
7705
|
|
|
7706
|
-
// CONCATENATED MODULE: ./src/components/xt-card/index.vue?vue&type=template&id=
|
|
7706
|
+
// CONCATENATED MODULE: ./src/components/xt-card/index.vue?vue&type=template&id=bc9ed1fa
|
|
7707
7707
|
|
|
7708
7708
|
// 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
|
|
7709
7709
|
|
|
@@ -7732,8 +7732,8 @@ var xt_cardvue_type_template_id_bb709dd8_staticRenderFns = []
|
|
|
7732
7732
|
|
|
7733
7733
|
var xt_card_component = Object(componentNormalizer["a" /* default */])(
|
|
7734
7734
|
components_xt_cardvue_type_script_lang_js,
|
|
7735
|
-
|
|
7736
|
-
|
|
7735
|
+
xt_cardvue_type_template_id_bc9ed1fa_render,
|
|
7736
|
+
xt_cardvue_type_template_id_bc9ed1fa_staticRenderFns,
|
|
7737
7737
|
false,
|
|
7738
7738
|
null,
|
|
7739
7739
|
null,
|
|
@@ -7745,7 +7745,7 @@ var xt_card_component = Object(componentNormalizer["a" /* default */])(
|
|
|
7745
7745
|
// CONCATENATED MODULE: ./src/components/xt-card/index.js
|
|
7746
7746
|
|
|
7747
7747
|
/* harmony default export */ var components_xt_card = (xt_card);
|
|
7748
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
7748
|
+
// 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
|
|
7749
7749
|
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)
|
|
7750
7750
|
}
|
|
7751
7751
|
var xt_card_itemvue_type_template_id_4f375226_staticRenderFns = []
|
|
@@ -8218,7 +8218,7 @@ var xt_config_provider_component = Object(componentNormalizer["a" /* default */]
|
|
|
8218
8218
|
|
|
8219
8219
|
/* harmony default export */ var components_xt_config_provider = (xt_config_provider);
|
|
8220
8220
|
|
|
8221
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
8221
|
+
// 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
|
|
8222
8222
|
var xt_textvue_type_template_id_2b4328b0_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-text",class:[
|
|
8223
8223
|
_vm.type ? 'xt-text--' + _vm.type : '',
|
|
8224
8224
|
'xt-text--' + _vm.size,
|
|
@@ -8365,7 +8365,7 @@ var xt_text_component = Object(componentNormalizer["a" /* default */])(
|
|
|
8365
8365
|
// CONCATENATED MODULE: ./src/components/xt-text/index.js
|
|
8366
8366
|
|
|
8367
8367
|
/* harmony default export */ var components_xt_text = (xt_text);
|
|
8368
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
8368
|
+
// 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
|
|
8369
8369
|
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)
|
|
8370
8370
|
}
|
|
8371
8371
|
var xt_grid_boxvue_type_template_id_67e197c4_staticRenderFns = []
|
|
@@ -8529,7 +8529,7 @@ var xt_grid_box_component = Object(componentNormalizer["a" /* default */])(
|
|
|
8529
8529
|
|
|
8530
8530
|
/* harmony default export */ var components_xt_grid_box = (xt_grid_box);
|
|
8531
8531
|
|
|
8532
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
8532
|
+
// 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
|
|
8533
8533
|
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)
|
|
8534
8534
|
}
|
|
8535
8535
|
var xt_grid_itemvue_type_template_id_5318efc6_scoped_true_staticRenderFns = []
|
|
@@ -8662,7 +8662,7 @@ var xt_grid_item_component = Object(componentNormalizer["a" /* default */])(
|
|
|
8662
8662
|
// CONCATENATED MODULE: ./src/components/xt-grid-item/index.js
|
|
8663
8663
|
|
|
8664
8664
|
/* harmony default export */ var components_xt_grid_item = (xt_grid_item);
|
|
8665
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
8665
|
+
// 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
|
|
8666
8666
|
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)
|
|
8667
8667
|
}
|
|
8668
8668
|
var xt_date_pickervue_type_template_id_6a59ddb5_scoped_true_staticRenderFns = []
|
|
@@ -8670,7 +8670,7 @@ var xt_date_pickervue_type_template_id_6a59ddb5_scoped_true_staticRenderFns = []
|
|
|
8670
8670
|
|
|
8671
8671
|
// CONCATENATED MODULE: ./src/components/xt-date-picker/index.vue?vue&type=template&id=6a59ddb5&scoped=true
|
|
8672
8672
|
|
|
8673
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
8673
|
+
// 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
|
|
8674
8674
|
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)
|
|
8675
8675
|
}
|
|
8676
8676
|
var quartervue_type_template_id_4e3cbf9a_staticRenderFns = []
|
|
@@ -8958,7 +8958,7 @@ var xt_date_picker_component = Object(componentNormalizer["a" /* default */])(
|
|
|
8958
8958
|
// CONCATENATED MODULE: ./src/components/xt-date-picker/index.js
|
|
8959
8959
|
|
|
8960
8960
|
/* harmony default export */ var components_xt_date_picker = (xt_date_picker);
|
|
8961
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
8961
|
+
// 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
|
|
8962
8962
|
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)
|
|
8963
8963
|
}
|
|
8964
8964
|
var ex_buttonvue_type_template_id_39655574_staticRenderFns = []
|
|
@@ -9043,7 +9043,7 @@ var ex_button_component = Object(componentNormalizer["a" /* default */])(
|
|
|
9043
9043
|
// CONCATENATED MODULE: ./src/components/ex-button/index.js
|
|
9044
9044
|
|
|
9045
9045
|
/* harmony default export */ var components_ex_button = (ex_button);
|
|
9046
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
9046
|
+
// 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
|
|
9047
9047
|
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()
|
|
9048
9048
|
}
|
|
9049
9049
|
var ex_chartvue_type_template_id_1fe36744_staticRenderFns = []
|
|
@@ -9205,7 +9205,7 @@ var ex_chart_component = Object(componentNormalizer["a" /* default */])(
|
|
|
9205
9205
|
|
|
9206
9206
|
/* harmony default export */ var components_ex_chart = (ex_chart);
|
|
9207
9207
|
|
|
9208
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
9208
|
+
// 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
|
|
9209
9209
|
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)
|
|
9210
9210
|
}
|
|
9211
9211
|
var ex_cardvue_type_template_id_2073f658_scoped_true_staticRenderFns = []
|
|
@@ -9304,113 +9304,51 @@ ex_card.install = function (Vue) {
|
|
|
9304
9304
|
|
|
9305
9305
|
/* harmony default export */ var components_ex_card = (ex_card);
|
|
9306
9306
|
|
|
9307
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
9308
|
-
var
|
|
9307
|
+
// 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
|
|
9308
|
+
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()])
|
|
9309
9309
|
}
|
|
9310
|
-
var
|
|
9310
|
+
var ex_tablevue_type_template_id_216b80f8_scoped_true_staticRenderFns = []
|
|
9311
9311
|
|
|
9312
9312
|
|
|
9313
|
-
// CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=template&id=
|
|
9314
|
-
|
|
9315
|
-
// 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
|
|
9316
|
-
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)
|
|
9317
|
-
}
|
|
9318
|
-
var ExColumnvue_type_template_id_57358dae_staticRenderFns = []
|
|
9313
|
+
// CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=template&id=216b80f8&scoped=true
|
|
9319
9314
|
|
|
9315
|
+
// 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
|
|
9320
9316
|
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
column: {
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
}
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
}
|
|
9342
|
-
if (options.showTip) {
|
|
9343
|
-
options.showOverflowTooltip = true;
|
|
9344
|
-
}
|
|
9345
|
-
return { ...options };
|
|
9346
|
-
}
|
|
9347
|
-
}
|
|
9348
|
-
});
|
|
9349
|
-
|
|
9350
|
-
// CONCATENATED MODULE: ./src/components/ex-table/ExColumn.vue?vue&type=script&lang=js
|
|
9351
|
-
/* harmony default export */ var ex_table_ExColumnvue_type_script_lang_js = (ExColumnvue_type_script_lang_js);
|
|
9352
|
-
// CONCATENATED MODULE: ./src/components/ex-table/ExColumn.vue
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
/* normalize component */
|
|
9359
|
-
|
|
9360
|
-
var ExColumn_component = Object(componentNormalizer["a" /* default */])(
|
|
9361
|
-
ex_table_ExColumnvue_type_script_lang_js,
|
|
9362
|
-
ExColumnvue_type_template_id_57358dae_render,
|
|
9363
|
-
ExColumnvue_type_template_id_57358dae_staticRenderFns,
|
|
9364
|
-
false,
|
|
9365
|
-
null,
|
|
9366
|
-
null,
|
|
9367
|
-
null
|
|
9368
|
-
|
|
9369
|
-
)
|
|
9370
|
-
|
|
9371
|
-
/* harmony default export */ var ExColumn = (ExColumn_component.exports);
|
|
9372
|
-
// 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
|
|
9373
|
-
|
|
9374
|
-
/* harmony default export */ var ExCellvue_type_script_lang_js = ({
|
|
9375
|
-
name: "ExCell",
|
|
9376
|
-
functional: true,
|
|
9377
|
-
props: {
|
|
9378
|
-
row: Object,
|
|
9379
|
-
index: Number,
|
|
9380
|
-
formatter: Function,
|
|
9381
|
-
column: {
|
|
9382
|
-
type: Object,
|
|
9383
|
-
default: null
|
|
9384
|
-
}
|
|
9385
|
-
},
|
|
9386
|
-
render: (h, ctx) => {
|
|
9387
|
-
const params = {
|
|
9388
|
-
row: ctx.props.row,
|
|
9389
|
-
index: ctx.props.index
|
|
9390
|
-
};
|
|
9391
|
-
debugger
|
|
9392
|
-
if (ctx.props.column) params.column = ctx.props.column;
|
|
9393
|
-
const isVnode = (it) => typeof it === "object" && it.hasOwnProperty("componentOptions");
|
|
9394
|
-
const renderNode = ctx.props.formatter(h, params);
|
|
9395
|
-
// 非Vnode 字符处理
|
|
9396
|
-
return isVnode(renderNode) ? renderNode : h("span", renderNode);
|
|
9397
|
-
}
|
|
9398
|
-
});
|
|
9317
|
+
/* harmony default export */ var ExTableCellvue_type_script_lang_js = ({
|
|
9318
|
+
name: 'ExTableCell',
|
|
9319
|
+
functional: true,
|
|
9320
|
+
props: {
|
|
9321
|
+
row: Object,
|
|
9322
|
+
index: Number,
|
|
9323
|
+
formatter: Function,
|
|
9324
|
+
column: { type: Object, default: null }
|
|
9325
|
+
},
|
|
9326
|
+
render: (h, ctx) => {
|
|
9327
|
+
const params = {
|
|
9328
|
+
row: ctx.props.row,
|
|
9329
|
+
index: ctx.props.index
|
|
9330
|
+
}
|
|
9331
|
+
if (ctx.props.column) params.column = ctx.props.column
|
|
9332
|
+
const isVnode = (it) => typeof it === 'object' && it.hasOwnProperty('componentOptions')
|
|
9333
|
+
const renderNode = ctx.props.formatter(h, params)
|
|
9334
|
+
return isVnode(renderNode) ? renderNode : h('span', renderNode)
|
|
9335
|
+
}
|
|
9336
|
+
});
|
|
9399
9337
|
|
|
9400
|
-
// CONCATENATED MODULE: ./src/components/ex-table/
|
|
9401
|
-
/* harmony default export */ var
|
|
9402
|
-
// CONCATENATED MODULE: ./src/components/ex-table/
|
|
9403
|
-
var
|
|
9338
|
+
// CONCATENATED MODULE: ./src/components/ex-table/ExTableCell.vue?vue&type=script&lang=js
|
|
9339
|
+
/* harmony default export */ var ex_table_ExTableCellvue_type_script_lang_js = (ExTableCellvue_type_script_lang_js);
|
|
9340
|
+
// CONCATENATED MODULE: ./src/components/ex-table/ExTableCell.vue
|
|
9341
|
+
var ExTableCell_render, ExTableCell_staticRenderFns
|
|
9404
9342
|
|
|
9405
9343
|
|
|
9406
9344
|
|
|
9407
9345
|
|
|
9408
9346
|
/* normalize component */
|
|
9409
9347
|
|
|
9410
|
-
var
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9348
|
+
var ExTableCell_component = Object(componentNormalizer["a" /* default */])(
|
|
9349
|
+
ex_table_ExTableCellvue_type_script_lang_js,
|
|
9350
|
+
ExTableCell_render,
|
|
9351
|
+
ExTableCell_staticRenderFns,
|
|
9414
9352
|
false,
|
|
9415
9353
|
null,
|
|
9416
9354
|
null,
|
|
@@ -9418,515 +9356,715 @@ var ExCell_component = Object(componentNormalizer["a" /* default */])(
|
|
|
9418
9356
|
|
|
9419
9357
|
)
|
|
9420
9358
|
|
|
9421
|
-
/* harmony default export */ var
|
|
9359
|
+
/* harmony default export */ var ExTableCell = (ExTableCell_component.exports);
|
|
9422
9360
|
// 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
|
|
9423
9361
|
|
|
9424
9362
|
|
|
9425
9363
|
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
9364
|
/* harmony default export */ var ex_tablevue_type_script_lang_js = ({
|
|
9429
|
-
name:
|
|
9430
|
-
components: {
|
|
9431
|
-
ExCell: ExCell,
|
|
9432
|
-
ExColumn: ExColumn,
|
|
9433
|
-
ExText: components_xt_text,
|
|
9434
|
-
XtFlexBox: components_xt_flex_box
|
|
9435
|
-
},
|
|
9365
|
+
name: 'ExTable',
|
|
9436
9366
|
inheritAttrs: false,
|
|
9367
|
+
components: { ExTableCell: ExTableCell },
|
|
9437
9368
|
props: {
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9369
|
+
// 表格数据
|
|
9370
|
+
tableData: { type: Array, default: () => [] },
|
|
9371
|
+
// 列配置(支持 children 多级表头)
|
|
9372
|
+
columns: { type: Array, default: () => [] },
|
|
9373
|
+
// 分组列配置(按配置的层级合并单元格)
|
|
9374
|
+
groupColumns: { type: Array, default: () => [] },
|
|
9375
|
+
// 标题
|
|
9376
|
+
title: { type: String, default: '' },
|
|
9377
|
+
// 高度
|
|
9378
|
+
height: { type: [Number, String], default: null },
|
|
9379
|
+
// 虚拟滚动
|
|
9380
|
+
virtualScroll: { type: Boolean, default: false },
|
|
9381
|
+
// 预估行高
|
|
9382
|
+
rowInitHeight: { type: Number, default: 48 },
|
|
9383
|
+
// 缓冲区行数
|
|
9384
|
+
bufferSize: { type: Number, default: 5 },
|
|
9385
|
+
// 分页配置
|
|
9386
|
+
pagination: { type: Object, default: null },
|
|
9387
|
+
// 总条数
|
|
9388
|
+
total: { type: Number, default: 0 },
|
|
9389
|
+
// 是否显示序号
|
|
9390
|
+
showIndex: { type: Boolean, default: false },
|
|
9391
|
+
// 是否可选
|
|
9392
|
+
selection: { type: Boolean, default: false },
|
|
9393
|
+
// 选择列固定位置
|
|
9394
|
+
selectionFixed: { type: [String, Boolean], default: false },
|
|
9395
|
+
// 序号列固定位置
|
|
9396
|
+
indexFixed: { type: [String, Boolean], default: false },
|
|
9397
|
+
// 加载状态
|
|
9398
|
+
loading: { type: Boolean, default: false },
|
|
9399
|
+
// 空数据文案
|
|
9400
|
+
emptyText: { type: String, default: '暂无数据' },
|
|
9401
|
+
// 小计配置
|
|
9402
|
+
subtotalConfig: { type: Object, default: () => ({ enabled: false }) },
|
|
9403
|
+
// 总计配置
|
|
9404
|
+
totalConfig: { type: Object, default: () => ({ enabled: false }) }
|
|
9405
|
+
},
|
|
9406
|
+
|
|
9407
|
+
data() {
|
|
9408
|
+
return {
|
|
9409
|
+
// 虚拟滚动相关
|
|
9410
|
+
scrollTop: 0,
|
|
9411
|
+
scrollLeft: 0,
|
|
9412
|
+
rowHeight: 48,
|
|
9413
|
+
visibleStartIndex: 0,
|
|
9414
|
+
visibleEndIndex: 0,
|
|
9415
|
+
visibleCount: 0,
|
|
9416
|
+
// 表格宽度(用于自适应列宽计算)
|
|
9417
|
+
tableWidth: 0,
|
|
9418
|
+
// 分组合并缓存
|
|
9419
|
+
spanCache: {},
|
|
9420
|
+
// 列扁平化缓存
|
|
9421
|
+
flattenedColumnsCache: [],
|
|
9422
|
+
// 选中数据
|
|
9423
|
+
selectedRows: []
|
|
9424
|
+
}
|
|
9425
|
+
},
|
|
9426
|
+
|
|
9427
|
+
computed: {
|
|
9428
|
+
showPagination() {
|
|
9429
|
+
return this.pagination && this.total > 0
|
|
9441
9430
|
},
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
return
|
|
9431
|
+
|
|
9432
|
+
computedHeight() {
|
|
9433
|
+
if (this.virtualScroll) {
|
|
9434
|
+
return this.height || 400
|
|
9446
9435
|
}
|
|
9436
|
+
return this.height || undefined
|
|
9447
9437
|
},
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9452
|
-
|
|
9453
|
-
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
|
|
9457
|
-
|
|
9458
|
-
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
|
|
9438
|
+
|
|
9439
|
+
// 计算固定列总宽度(selection + index + fixed列)
|
|
9440
|
+
fixedColumnWidth() {
|
|
9441
|
+
let width = 0
|
|
9442
|
+
// 选择列
|
|
9443
|
+
if (this.selection) width += 55
|
|
9444
|
+
// 序号列
|
|
9445
|
+
if (this.showIndex) width += 60
|
|
9446
|
+
// fixed 列
|
|
9447
|
+
const sumFixedWidth = (cols) => {
|
|
9448
|
+
cols.forEach(c => {
|
|
9449
|
+
if (c.fixed && (c.width || c.minWidth)) {
|
|
9450
|
+
width += typeof c.width === 'number' ? c.width : (typeof c.minWidth === 'number' ? c.minWidth : 100)
|
|
9451
|
+
}
|
|
9452
|
+
if (c.children && c.children.length) sumFixedWidth(c.children)
|
|
9453
|
+
})
|
|
9463
9454
|
}
|
|
9455
|
+
sumFixedWidth(this.columns)
|
|
9456
|
+
return width
|
|
9464
9457
|
},
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9458
|
+
|
|
9459
|
+
// 计算非固定列中已设置width的总宽度
|
|
9460
|
+
nonFixedColumnWidthWithWidth() {
|
|
9461
|
+
let width = 0
|
|
9462
|
+
const sumWidth = (cols) => {
|
|
9463
|
+
cols.forEach(c => {
|
|
9464
|
+
if (!c.fixed && c.width) {
|
|
9465
|
+
width += typeof c.width === 'number' ? c.width : parseInt(c.width) || 0
|
|
9466
|
+
}
|
|
9467
|
+
if (c.children && c.children.length) sumWidth(c.children)
|
|
9468
|
+
})
|
|
9469
|
+
}
|
|
9470
|
+
sumWidth(this.columns)
|
|
9471
|
+
return width
|
|
9472
9472
|
},
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9473
|
+
|
|
9474
|
+
// 计算需要自适应的列数(非固定列且未设置width)
|
|
9475
|
+
autoColumnCount() {
|
|
9476
|
+
let count = 0
|
|
9477
|
+
const countCols = (cols) => {
|
|
9478
|
+
cols.forEach(c => {
|
|
9479
|
+
if (!c.fixed) {
|
|
9480
|
+
if (c.children && c.children.length) {
|
|
9481
|
+
countCols(c.children)
|
|
9482
|
+
} else if (!c.width) {
|
|
9483
|
+
// 只有未设置width的非固定列才参与自适应
|
|
9484
|
+
count++
|
|
9485
|
+
}
|
|
9486
|
+
}
|
|
9487
|
+
})
|
|
9488
|
+
}
|
|
9489
|
+
countCols(this.columns)
|
|
9490
|
+
return count
|
|
9476
9491
|
},
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9492
|
+
|
|
9493
|
+
// 自适应列宽(未设置width的非固定列均分剩余宽度)
|
|
9494
|
+
autoColumnWidth() {
|
|
9495
|
+
const totalWidth = this.tableWidth || 1000
|
|
9496
|
+
const gutter = 12 // el-table 默认 gutter
|
|
9497
|
+
const fixedWidth = this.fixedColumnWidth
|
|
9498
|
+
const nonFixedWithWidth = this.nonFixedColumnWidthWithWidth
|
|
9499
|
+
const autoCount = this.autoColumnCount
|
|
9500
|
+
|
|
9501
|
+
if (autoCount <= 0) return 100 // 默认宽度
|
|
9502
|
+
|
|
9503
|
+
// 自适应宽度 = (总宽度 - gutter - 固定列宽度 - 非固定列中已设置的width)/ 需要自适应的列数
|
|
9504
|
+
const availableWidth = totalWidth - gutter - fixedWidth - nonFixedWithWidth
|
|
9505
|
+
return Math.max(80, Math.floor(availableWidth / autoCount)) // 最小80px
|
|
9480
9506
|
},
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
9507
|
+
|
|
9508
|
+
// 表头列定义(用于 colgroup,与 headerRows 列数保持一致)
|
|
9509
|
+
headerCols() {
|
|
9510
|
+
const cols = []
|
|
9511
|
+
|
|
9512
|
+
// 选择列
|
|
9513
|
+
if (this.selection) {
|
|
9514
|
+
cols.push({ _key: 'prepend_selection', _width: 55, _minWidth: 55 })
|
|
9485
9515
|
}
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
return [];
|
|
9516
|
+
|
|
9517
|
+
// 序号列
|
|
9518
|
+
if (this.showIndex) {
|
|
9519
|
+
cols.push({ _key: 'prepend_index', _width: 60, _minWidth: 60 })
|
|
9491
9520
|
}
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
|
|
9495
|
-
|
|
9496
|
-
|
|
9521
|
+
|
|
9522
|
+
// 数据列(只取叶子节点,使用一致的key生成)
|
|
9523
|
+
const addLeafCols = (columns, parentPath = '') => {
|
|
9524
|
+
columns.forEach((col, index) => {
|
|
9525
|
+
const path = parentPath ? `${parentPath}_${index}` : String(index)
|
|
9526
|
+
const key = this.generateColKey(col, path)
|
|
9527
|
+
|
|
9528
|
+
if (col.children && col.children.length) {
|
|
9529
|
+
addLeafCols(col.children, path)
|
|
9530
|
+
} else {
|
|
9531
|
+
cols.push({
|
|
9532
|
+
_key: key,
|
|
9533
|
+
_width: this.getColumnWidth(col),
|
|
9534
|
+
_minWidth: col.minWidth
|
|
9535
|
+
})
|
|
9536
|
+
}
|
|
9537
|
+
})
|
|
9497
9538
|
}
|
|
9539
|
+
addLeafCols(this.columns)
|
|
9540
|
+
|
|
9541
|
+
return cols
|
|
9498
9542
|
},
|
|
9499
|
-
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9543
|
+
|
|
9544
|
+
// 表头层级结构(用于自定义固定表头渲染)
|
|
9545
|
+
headerRows() {
|
|
9546
|
+
const rows = []
|
|
9547
|
+
let maxDepth = 1
|
|
9548
|
+
|
|
9549
|
+
// 计算最大深度
|
|
9550
|
+
const calcDepth = (cols, depth) => {
|
|
9551
|
+
maxDepth = Math.max(maxDepth, depth)
|
|
9552
|
+
cols.forEach(c => { if (c.children && c.children.length) calcDepth(c.children, depth + 1) })
|
|
9553
|
+
}
|
|
9554
|
+
if (this.columns.length) calcDepth(this.columns, 1)
|
|
9555
|
+
|
|
9556
|
+
// 初始化行
|
|
9557
|
+
for (let i = 0; i < maxDepth; i++) rows.push([])
|
|
9558
|
+
|
|
9559
|
+
// 计算叶子数量
|
|
9560
|
+
const countLeaves = (cols) => {
|
|
9561
|
+
let n = 0
|
|
9562
|
+
cols.forEach(c => {
|
|
9563
|
+
if (c.children && c.children.length) n += countLeaves(c.children)
|
|
9564
|
+
else n++
|
|
9565
|
+
})
|
|
9566
|
+
return n
|
|
9567
|
+
}
|
|
9568
|
+
|
|
9569
|
+
// 选择列 / 序号列占位(仅第一行,rowspan 跨所有行)
|
|
9570
|
+
if (this.selection) {
|
|
9571
|
+
rows[0].push({
|
|
9572
|
+
_key: 'prepend_selection',
|
|
9573
|
+
_rowspan: maxDepth,
|
|
9574
|
+
_colspan: 1,
|
|
9575
|
+
_style: { width: '55px' },
|
|
9576
|
+
_hidden: false,
|
|
9577
|
+
label: ''
|
|
9578
|
+
})
|
|
9579
|
+
for (let i = 1; i < maxDepth; i++) {
|
|
9580
|
+
rows[i].push({ _key: 'prepend_selection_' + i, _rowspan: 0, _colspan: 1, _hidden: true, label: '' })
|
|
9581
|
+
}
|
|
9582
|
+
}
|
|
9583
|
+
if (this.showIndex) {
|
|
9584
|
+
rows[0].push({
|
|
9585
|
+
_key: 'prepend_index',
|
|
9586
|
+
_rowspan: maxDepth,
|
|
9587
|
+
_colspan: 1,
|
|
9588
|
+
_style: { width: '60px' },
|
|
9589
|
+
_hidden: false,
|
|
9590
|
+
label: '#'
|
|
9591
|
+
})
|
|
9592
|
+
for (let i = 1; i < maxDepth; i++) {
|
|
9593
|
+
rows[i].push({ _key: 'prepend_index_' + i, _rowspan: 0, _colspan: 1, _hidden: true, label: '' })
|
|
9594
|
+
}
|
|
9595
|
+
}
|
|
9596
|
+
|
|
9597
|
+
// 填充列
|
|
9598
|
+
if (this.columns.length) {
|
|
9599
|
+
const fill = (cols, depth, parentPath = '') => {
|
|
9600
|
+
cols.forEach((c, index) => {
|
|
9601
|
+
const path = parentPath ? `${parentPath}_${index}` : String(index)
|
|
9602
|
+
const key = this.generateColKey(c, path)
|
|
9603
|
+
const hasKids = c.children && c.children.length
|
|
9604
|
+
const style = {}
|
|
9605
|
+
|
|
9606
|
+
// 如果有固定宽度,使用固定宽度;否则使用自适应宽度
|
|
9607
|
+
if (c.width) {
|
|
9608
|
+
style.width = typeof c.width === 'number' ? c.width + 'px' : c.width
|
|
9609
|
+
} else if (!c.fixed && this.virtualScroll) {
|
|
9610
|
+
// 非固定列且虚拟滚动时使用自适应宽度
|
|
9611
|
+
style.width = this.autoColumnWidth + 'px'
|
|
9612
|
+
}
|
|
9613
|
+
|
|
9614
|
+
if (c.minWidth) style.minWidth = typeof c.minWidth === 'number' ? c.minWidth + 'px' : c.minWidth
|
|
9615
|
+
|
|
9616
|
+
rows[depth].push({
|
|
9617
|
+
_key: key,
|
|
9618
|
+
_rowspan: hasKids ? 1 : maxDepth - depth,
|
|
9619
|
+
_colspan: hasKids ? countLeaves(c.children) : 1,
|
|
9620
|
+
_style: style,
|
|
9621
|
+
_hidden: !c.label && !c.prop,
|
|
9622
|
+
label: c.label || ''
|
|
9623
|
+
})
|
|
9624
|
+
if (hasKids) fill(c.children, depth + 1, path)
|
|
9625
|
+
})
|
|
9626
|
+
}
|
|
9627
|
+
fill(this.columns, 0)
|
|
9628
|
+
}
|
|
9629
|
+
|
|
9630
|
+
return rows
|
|
9526
9631
|
},
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9632
|
+
|
|
9633
|
+
// 处理后的数据(注入小计/总计行)
|
|
9634
|
+
processedTableData() {
|
|
9635
|
+
if (!this.tableData.length) return []
|
|
9636
|
+
|
|
9637
|
+
let data = [...this.tableData]
|
|
9638
|
+
const hasSubtotal = this.subtotalConfig && this.subtotalConfig.enabled
|
|
9639
|
+
const hasTotal = this.totalConfig && this.totalConfig.enabled
|
|
9640
|
+
|
|
9641
|
+
if (!hasSubtotal && !hasTotal) return data
|
|
9642
|
+
|
|
9643
|
+
// 找到第一个数据列作为标签列
|
|
9644
|
+
const labelColumn = this.findLabelColumn()
|
|
9645
|
+
|
|
9646
|
+
let result = []
|
|
9647
|
+
|
|
9648
|
+
if (hasSubtotal && this.subtotalConfig.groupBy && this.subtotalConfig.groupBy.length) {
|
|
9649
|
+
// 按 groupBy 分组
|
|
9650
|
+
const groups = this.groupData(data, this.subtotalConfig.groupBy)
|
|
9651
|
+
groups.forEach((groupRows, groupKey) => {
|
|
9652
|
+
// 插入数据行
|
|
9653
|
+
result.push(...groupRows)
|
|
9654
|
+
// 插入小计行
|
|
9655
|
+
const subtotalRow = this.createSubtotalRow(groupRows, groupKey)
|
|
9656
|
+
result.push(subtotalRow)
|
|
9657
|
+
})
|
|
9658
|
+
} else {
|
|
9659
|
+
result = data
|
|
9660
|
+
}
|
|
9661
|
+
|
|
9662
|
+
// 插入总计行
|
|
9663
|
+
if (hasTotal) {
|
|
9664
|
+
const totalRow = this.createTotalRow(data)
|
|
9665
|
+
result.push(totalRow)
|
|
9666
|
+
}
|
|
9667
|
+
|
|
9668
|
+
return result
|
|
9530
9669
|
},
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9670
|
+
|
|
9671
|
+
// 虚拟滚动总高度
|
|
9672
|
+
virtualTotalHeight() {
|
|
9673
|
+
const data = this.processedTableData
|
|
9674
|
+
return data.length * this.rowHeight
|
|
9534
9675
|
},
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9676
|
+
|
|
9677
|
+
// 虚拟滚动偏移量
|
|
9678
|
+
virtualOffsetY() {
|
|
9679
|
+
const start = Math.max(0, this.visibleStartIndex - this.bufferSize)
|
|
9680
|
+
return start * this.rowHeight
|
|
9538
9681
|
},
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9682
|
+
|
|
9683
|
+
// 扁平化列配置(处理 children 嵌套)
|
|
9684
|
+
flattenedColumns() {
|
|
9685
|
+
if (this.flattenedColumnsCache.length) return this.flattenedColumnsCache
|
|
9686
|
+
const result = []
|
|
9687
|
+
const flatten = (cols) => {
|
|
9688
|
+
cols.forEach(col => {
|
|
9689
|
+
const key = col.prop || col.label || Math.random().toString(36).slice(2)
|
|
9690
|
+
result.push({ ...col, _key: key })
|
|
9691
|
+
})
|
|
9543
9692
|
}
|
|
9693
|
+
flatten(this.columns)
|
|
9694
|
+
this.flattenedColumnsCache = result
|
|
9695
|
+
return result
|
|
9544
9696
|
},
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
},
|
|
9552
|
-
data() {
|
|
9553
|
-
return {
|
|
9554
|
-
startIndex: 0,
|
|
9555
|
-
inTableHeight: 0,
|
|
9556
|
-
dropvisible: false,
|
|
9557
|
-
hasLoad: true,
|
|
9558
|
-
hasLoadData: false,
|
|
9559
|
-
diyColumns: this.columns || [],
|
|
9560
|
-
checkedColumns: [],
|
|
9561
|
-
tableColumns: []
|
|
9562
|
-
};
|
|
9563
|
-
},
|
|
9564
|
-
computed: {
|
|
9565
|
-
spanTableData() {
|
|
9566
|
-
return this.calculateGroupSpans(this.tableData, this.spanFields);
|
|
9567
|
-
},
|
|
9568
|
-
constColums() {
|
|
9569
|
-
const _isFixed = this.defaultColumnsFixed ? "left" : null;
|
|
9570
|
-
const _index = { type: "index", align: "center", label: this.showColumsFilter ? "" : "序号", width: "80", fixed: _isFixed, index: this.indexRender };
|
|
9571
|
-
const _selection = { type: "selection", align: "center", width: "50", fixed: _isFixed };
|
|
9572
|
-
if (this.hasLoad || !this.tbId) {
|
|
9573
|
-
return this.selection ? this.showIndex ? [_index, _selection] : [_selection] : (this.showIndex ? [_index] : []);
|
|
9574
|
-
} else {
|
|
9575
|
-
return [];
|
|
9697
|
+
|
|
9698
|
+
// 虚拟滚动时的可见数据
|
|
9699
|
+
visibleData() {
|
|
9700
|
+
const data = this.processedTableData
|
|
9701
|
+
if (!this.virtualScroll || data.length === 0) {
|
|
9702
|
+
return data
|
|
9576
9703
|
}
|
|
9704
|
+
const start = Math.max(0, this.visibleStartIndex - this.bufferSize)
|
|
9705
|
+
const end = Math.min(data.length, this.visibleEndIndex + this.bufferSize)
|
|
9706
|
+
return data.slice(start, end)
|
|
9577
9707
|
}
|
|
9578
9708
|
},
|
|
9709
|
+
|
|
9579
9710
|
watch: {
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
...custom
|
|
9593
|
-
});
|
|
9594
|
-
});
|
|
9595
|
-
this.tableColumns = list.filter(item => (item.show === undefined ? true : item.show));
|
|
9596
|
-
this.checkedColumns = this.updateCheckColumns(this.tableColumns);
|
|
9597
|
-
this.changeTableHight();
|
|
9598
|
-
});
|
|
9599
|
-
}
|
|
9711
|
+
tableData: {
|
|
9712
|
+
handler() {
|
|
9713
|
+
this.spanCache = {}
|
|
9714
|
+
this.flattenedColumnsCache = []
|
|
9715
|
+
if (this.virtualScroll) {
|
|
9716
|
+
this.$nextTick(() => {
|
|
9717
|
+
this.measureRowHeight()
|
|
9718
|
+
this.updateVisibleRange()
|
|
9719
|
+
})
|
|
9720
|
+
}
|
|
9721
|
+
},
|
|
9722
|
+
immediate: false
|
|
9600
9723
|
},
|
|
9724
|
+
|
|
9601
9725
|
columns: {
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
this.diyColumns = list;
|
|
9607
|
-
this.tableColumns = list.filter(item => (item.show === undefined ? true : item.show));
|
|
9608
|
-
this.checkedColumns = this.updateCheckColumns(this.tableColumns);
|
|
9609
|
-
this.changeTableHight();
|
|
9610
|
-
});
|
|
9611
|
-
}
|
|
9726
|
+
handler() {
|
|
9727
|
+
this.flattenedColumnsCache = []
|
|
9728
|
+
},
|
|
9729
|
+
deep: true
|
|
9612
9730
|
},
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9731
|
+
|
|
9732
|
+
virtualScroll(val) {
|
|
9733
|
+
if (val) {
|
|
9734
|
+
this.$nextTick(() => this.initVirtualScroll())
|
|
9735
|
+
} else {
|
|
9736
|
+
this.destroyVirtualScroll()
|
|
9619
9737
|
}
|
|
9620
9738
|
}
|
|
9621
9739
|
},
|
|
9740
|
+
|
|
9622
9741
|
mounted() {
|
|
9623
|
-
this
|
|
9624
|
-
this.
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9742
|
+
if (this.virtualScroll) {
|
|
9743
|
+
this.$nextTick(() => this.initVirtualScroll())
|
|
9744
|
+
}
|
|
9745
|
+
// 监听窗口resize,更新表格宽度
|
|
9746
|
+
this.resizeHandler = () => {
|
|
9747
|
+
if (this.virtualScroll) {
|
|
9748
|
+
this.$nextTick(() => this.updateTableWidth())
|
|
9629
9749
|
}
|
|
9630
|
-
}
|
|
9631
|
-
|
|
9632
|
-
activated() {
|
|
9633
|
-
this.doLayout();
|
|
9750
|
+
}
|
|
9751
|
+
window.addEventListener('resize', this.resizeHandler)
|
|
9634
9752
|
},
|
|
9753
|
+
|
|
9635
9754
|
beforeDestroy() {
|
|
9636
|
-
|
|
9755
|
+
this.destroyVirtualScroll()
|
|
9756
|
+
window.removeEventListener('resize', this.resizeHandler)
|
|
9637
9757
|
},
|
|
9758
|
+
|
|
9638
9759
|
methods: {
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9760
|
+
// ==================== 小计/总计工具函数 ====================
|
|
9761
|
+
// 找到第一个数据列(非 selection/index),用于显示"小计"/"总计"标签
|
|
9762
|
+
findLabelColumn() {
|
|
9763
|
+
for (const col of this.columns) {
|
|
9764
|
+
if (col.children && col.children.length) {
|
|
9765
|
+
for (const child of col.children) {
|
|
9766
|
+
if (child.prop) return { prop: child.prop, label: child.label }
|
|
9767
|
+
}
|
|
9768
|
+
} else if (col.prop) {
|
|
9769
|
+
return { prop: col.prop, label: col.label }
|
|
9770
|
+
}
|
|
9642
9771
|
}
|
|
9643
|
-
return
|
|
9772
|
+
return { prop: '', label: '' }
|
|
9644
9773
|
},
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9774
|
+
|
|
9775
|
+
// 按指定字段分组(保持分组顺序)
|
|
9776
|
+
groupData(data, groupBy) {
|
|
9777
|
+
const map = new Map()
|
|
9778
|
+
data.forEach(row => {
|
|
9779
|
+
const key = groupBy.map(f => row[f]).join('|||')
|
|
9780
|
+
if (!map.has(key)) {
|
|
9781
|
+
map.set(key, [])
|
|
9652
9782
|
}
|
|
9653
|
-
|
|
9654
|
-
|
|
9783
|
+
map.get(key).push(row)
|
|
9784
|
+
})
|
|
9785
|
+
return map
|
|
9655
9786
|
},
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
|
|
9672
|
-
|
|
9673
|
-
|
|
9787
|
+
|
|
9788
|
+
// 计算单列的聚合值
|
|
9789
|
+
_calcValue(rows, calc) {
|
|
9790
|
+
// 自定义函数
|
|
9791
|
+
if (typeof calc === 'function') return calc(rows)
|
|
9792
|
+
|
|
9793
|
+
// 字符串:'sum' | 'avg' | 'count' | 'min' | 'max'(需配合 prop 使用)
|
|
9794
|
+
|
|
9795
|
+
// 对象:{ prop: 'field', type: 'sum' } 或 { prop: 'field' } (默认 sum)
|
|
9796
|
+
const prop = calc.prop
|
|
9797
|
+
const type = calc.type || 'sum'
|
|
9798
|
+
const vals = prop ? rows.map(r => parseFloat(r[prop]) || 0) : []
|
|
9799
|
+
switch (type) {
|
|
9800
|
+
case 'sum': return vals.reduce((s, v) => s + v, 0)
|
|
9801
|
+
case 'avg': case 'average': return vals.length ? (vals.reduce((s, v) => s + v, 0) / vals.length) : 0
|
|
9802
|
+
case 'count': return rows.length
|
|
9803
|
+
case 'min': return vals.length ? Math.min(...vals) : 0
|
|
9804
|
+
case 'max': return vals.length ? Math.max(...vals) : 0
|
|
9805
|
+
default: return ''
|
|
9674
9806
|
}
|
|
9675
9807
|
},
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9808
|
+
|
|
9809
|
+
// 创建小计行
|
|
9810
|
+
createSubtotalRow(groupRows, groupKey) {
|
|
9811
|
+
const config = this.subtotalConfig
|
|
9812
|
+
const rawLabelProp = this.findLabelColumn()
|
|
9813
|
+
|
|
9814
|
+
// 获取第一个 groupBy 列的值显示
|
|
9815
|
+
const labelField = config.groupBy ? config.groupBy[0] : ''
|
|
9816
|
+
const groupValue = groupRows[0] ? groupRows[0][labelField] : groupKey
|
|
9817
|
+
const labelText = config.labelText || `${groupValue} 小计`
|
|
9818
|
+
|
|
9819
|
+
const row = { _rowType: 'subtotal', _groupKey: groupKey }
|
|
9820
|
+
row[rawLabelProp.prop] = labelText
|
|
9821
|
+
|
|
9822
|
+
// 计算各列的聚合值
|
|
9823
|
+
if (config.columns) {
|
|
9824
|
+
Object.keys(config.columns).forEach(prop => {
|
|
9825
|
+
const calc = config.columns[prop]
|
|
9826
|
+
row[prop] = typeof calc === 'string'
|
|
9827
|
+
? this._calcValue(groupRows, { prop, type: calc })
|
|
9828
|
+
: this._calcValue(groupRows, calc)
|
|
9829
|
+
})
|
|
9681
9830
|
}
|
|
9831
|
+
|
|
9832
|
+
return row
|
|
9682
9833
|
},
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
|
|
9686
|
-
|
|
9834
|
+
|
|
9835
|
+
// 创建总计行
|
|
9836
|
+
createTotalRow(allRows) {
|
|
9837
|
+
const config = this.totalConfig
|
|
9838
|
+
const rawLabelProp = this.findLabelColumn()
|
|
9839
|
+
const labelText = config.labelText || '总计'
|
|
9840
|
+
|
|
9841
|
+
const row = { _rowType: 'total' }
|
|
9842
|
+
row[rawLabelProp.prop] = labelText
|
|
9843
|
+
|
|
9844
|
+
// 计算各列的聚合值
|
|
9845
|
+
if (config.columns) {
|
|
9846
|
+
Object.keys(config.columns).forEach(prop => {
|
|
9847
|
+
const calc = config.columns[prop]
|
|
9848
|
+
row[prop] = typeof calc === 'string'
|
|
9849
|
+
? this._calcValue(allRows, { prop, type: calc })
|
|
9850
|
+
: this._calcValue(allRows, calc)
|
|
9851
|
+
})
|
|
9687
9852
|
}
|
|
9688
|
-
|
|
9689
|
-
|
|
9690
|
-
this.tableColumns = this.diyColumns.filter(item => (item.show === undefined ? true : item.show));
|
|
9691
|
-
this.checkedColumns = this.updateCheckColumns(this.tableColumns);
|
|
9692
|
-
this.dropvisible = false;
|
|
9693
|
-
this.changeTableHight();
|
|
9694
|
-
this.$nextTick(() => {
|
|
9695
|
-
this.doLayout();
|
|
9696
|
-
});
|
|
9853
|
+
|
|
9854
|
+
return row
|
|
9697
9855
|
},
|
|
9698
|
-
|
|
9699
|
-
|
|
9856
|
+
|
|
9857
|
+
// 行类名(小计/总计行样式)
|
|
9858
|
+
getRowClassName({ row }) {
|
|
9859
|
+
if (!row) return ''
|
|
9860
|
+
if (row._rowType === 'subtotal') return 'ex-table-row-subtotal'
|
|
9861
|
+
if (row._rowType === 'total') return 'ex-table-row-total'
|
|
9862
|
+
return ''
|
|
9700
9863
|
},
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
highlightCurrentRow: true,
|
|
9707
|
-
headerCellStyle: this.headerCellStyle,
|
|
9708
|
-
elementLoadingText: this.elementLoadingText,
|
|
9709
|
-
spanMethod: this.spanFields || this.groupColumns.length ? this.handleSpanMethod : null,
|
|
9710
|
-
...this.$attrs
|
|
9711
|
-
};
|
|
9864
|
+
|
|
9865
|
+
// ==================== 列配置 ====================
|
|
9866
|
+
getColumnProps(col) {
|
|
9867
|
+
const { _key, children, render, formatter, slot, ...props } = col
|
|
9868
|
+
return props
|
|
9712
9869
|
},
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
};
|
|
9721
|
-
} else if (field && !row[`_${field}_start`]) {
|
|
9722
|
-
return {
|
|
9723
|
-
rowspan: 0,
|
|
9724
|
-
colspan: 0
|
|
9725
|
-
};
|
|
9726
|
-
}
|
|
9727
|
-
}
|
|
9728
|
-
if (this.groupColumns.length) {
|
|
9729
|
-
const leftIndex = (Number(this.selection) + Number(this.showIndex));
|
|
9730
|
-
const groupColumnIndex = columnIndex - leftIndex;
|
|
9731
|
-
if (columnIndex >= leftIndex && columnIndex < leftIndex + this.groupColumns.length) {
|
|
9732
|
-
const groupIndex = groupColumnIndex;
|
|
9733
|
-
if (groupIndex >= 0 && groupColumnIndex < this.groupColumns.length) {
|
|
9734
|
-
return this.getSpan(rowIndex, groupIndex);
|
|
9735
|
-
}
|
|
9870
|
+
|
|
9871
|
+
// ==================== 序号方法 ====================
|
|
9872
|
+
indexMethod(index) {
|
|
9873
|
+
if (this.virtualScroll && this.visibleData.length > 0) {
|
|
9874
|
+
const row = this.visibleData[index]
|
|
9875
|
+
if (row && row._realIndex !== undefined) {
|
|
9876
|
+
return row._realIndex + 1
|
|
9736
9877
|
}
|
|
9737
|
-
return { rowspan: 1, colspan: 1 };
|
|
9738
9878
|
}
|
|
9879
|
+
return index + 1
|
|
9739
9880
|
},
|
|
9740
|
-
getSpan(rowIndex, groupIndex) {
|
|
9741
|
-
const spans = this.calculateSpans();
|
|
9742
|
-
if (spans[rowIndex] && spans[rowIndex][groupIndex]) {
|
|
9743
|
-
return spans[rowIndex][groupIndex];
|
|
9744
|
-
}
|
|
9745
|
-
return { rowspan: 1, colspan: 1 };
|
|
9746
|
-
},
|
|
9747
|
-
calculateSpans() {
|
|
9748
|
-
const spans = [];
|
|
9749
|
-
const rowCount = this.tableData.length;
|
|
9750
|
-
|
|
9751
|
-
if (rowCount === 0) return spans;
|
|
9752
9881
|
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
}
|
|
9882
|
+
// ==================== 分组合并 ====================
|
|
9883
|
+
handleSpanMethod({ row, column, rowIndex }) {
|
|
9884
|
+
// 跳过小计/总计行,不做合并
|
|
9885
|
+
if (row._rowType === 'subtotal' || row._rowType === 'total') {
|
|
9886
|
+
return { rowspan: 1, colspan: 1 }
|
|
9758
9887
|
}
|
|
9759
9888
|
|
|
9760
|
-
|
|
9761
|
-
let pos = 0;
|
|
9762
|
-
while (pos < rowCount) {
|
|
9763
|
-
const startPos = pos;
|
|
9889
|
+
if (!this.groupColumns.length) return { rowspan: 1, colspan: 1 }
|
|
9764
9890
|
|
|
9765
|
-
|
|
9766
|
-
|
|
9891
|
+
const data = this.virtualScroll ? this.visibleData : this.processedTableData
|
|
9892
|
+
const prop = column.property
|
|
9893
|
+
const groupIndex = this.groupColumns.indexOf(prop)
|
|
9767
9894
|
|
|
9768
|
-
|
|
9895
|
+
if (groupIndex === -1) return { rowspan: 1, colspan: 1 }
|
|
9769
9896
|
|
|
9770
|
-
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
break;
|
|
9774
|
-
}
|
|
9775
|
-
}
|
|
9776
|
-
|
|
9777
|
-
if (sameParent) {
|
|
9778
|
-
while (endPos + 1 < rowCount && this.tableData[endPos + 1][this.groupColumns[level].prop] === currentValue && this.checkParentSame(startPos, endPos + 1, level)) {
|
|
9779
|
-
endPos++;
|
|
9780
|
-
}
|
|
9781
|
-
}
|
|
9897
|
+
// 检查缓存
|
|
9898
|
+
const cacheKey = `${rowIndex}_${prop}`
|
|
9899
|
+
if (this.spanCache[cacheKey]) return this.spanCache[cacheKey]
|
|
9782
9900
|
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9901
|
+
// 判断当前行是否与前一行在分组列上完全相同
|
|
9902
|
+
if (rowIndex > 0) {
|
|
9903
|
+
const prevRow = data[rowIndex - 1]
|
|
9904
|
+
let isSame = true
|
|
9905
|
+
for (let i = 0; i <= groupIndex; i++) {
|
|
9906
|
+
const gp = this.groupColumns[i]
|
|
9907
|
+
if (prevRow[gp] !== row[gp]) {
|
|
9908
|
+
isSame = false
|
|
9909
|
+
break
|
|
9789
9910
|
}
|
|
9790
|
-
|
|
9791
|
-
pos = endPos + 1;
|
|
9792
9911
|
}
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
for (let level = 0; level < currentLevel; level++) {
|
|
9798
|
-
const prop = this.groupColumns[level].prop;
|
|
9799
|
-
if (this.tableData[rowIndex1][prop] != this.tableData[rowIndex2][prop]) {
|
|
9800
|
-
return false;
|
|
9912
|
+
if (isSame) {
|
|
9913
|
+
const result = { rowspan: 0, colspan: 1 }
|
|
9914
|
+
this.spanCache[cacheKey] = result
|
|
9915
|
+
return result
|
|
9801
9916
|
}
|
|
9802
9917
|
}
|
|
9803
|
-
return true;
|
|
9804
|
-
},
|
|
9805
|
-
calculateGroupSpans(data, spanFields) {
|
|
9806
|
-
const result = data.map(item => ({ ...item }));
|
|
9807
|
-
for (const fieldIndex in spanFields) {
|
|
9808
|
-
const field = spanFields[fieldIndex];
|
|
9809
|
-
let currentValue = null;
|
|
9810
|
-
let startIndex = 0;
|
|
9811
9918
|
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9919
|
+
// 向下扫描计算合并行数
|
|
9920
|
+
let count = 1
|
|
9921
|
+
for (let i = rowIndex + 1; i < data.length; i++) {
|
|
9922
|
+
const nextRow = data[i]
|
|
9923
|
+
let isSame = true
|
|
9924
|
+
for (let j = 0; j <= groupIndex; j++) {
|
|
9925
|
+
const gp = this.groupColumns[j]
|
|
9926
|
+
if (nextRow[gp] !== row[gp]) {
|
|
9927
|
+
isSame = false
|
|
9928
|
+
break
|
|
9816
9929
|
}
|
|
9930
|
+
}
|
|
9931
|
+
if (isSame) {
|
|
9932
|
+
count++
|
|
9933
|
+
} else {
|
|
9934
|
+
break
|
|
9935
|
+
}
|
|
9936
|
+
}
|
|
9817
9937
|
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9938
|
+
const result = { rowspan: count > 1 ? count : 1, colspan: 1 }
|
|
9939
|
+
this.spanCache[cacheKey] = result
|
|
9940
|
+
return result
|
|
9941
|
+
},
|
|
9822
9942
|
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
row[`_${field}_start`] = true;
|
|
9829
|
-
}
|
|
9830
|
-
});
|
|
9831
|
-
}
|
|
9832
|
-
return result;
|
|
9943
|
+
// ==================== 选择 ====================
|
|
9944
|
+
handleSelectionChange(rows) {
|
|
9945
|
+
// 过滤掉小计/总计行
|
|
9946
|
+
this.selectedRows = rows.filter(r => !r._rowType)
|
|
9947
|
+
this.$emit('selection-change', this.selectedRows)
|
|
9833
9948
|
},
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
this.inTableHeight = (this.height - 1 - (this.title ? 40 : 0));
|
|
9839
|
-
this.$nextTick(() => {
|
|
9840
|
-
this.doLayout();
|
|
9841
|
-
});
|
|
9842
|
-
return;
|
|
9843
|
-
}
|
|
9844
|
-
let tableHeight = window.innerHeight || document.body.clientHeight;
|
|
9845
|
-
const disTop = this.$refs.ExtendTable.$el;
|
|
9846
|
-
tableHeight -= (disTop.getBoundingClientRect().top + 20 + 1);
|
|
9847
|
-
tableHeight -= this.$refs.toolBar.offsetHeight;
|
|
9848
|
-
this.inTableHeight = tableHeight;
|
|
9849
|
-
this.doLayout();
|
|
9850
|
-
} catch (err) {
|
|
9851
|
-
console.log(err);
|
|
9852
|
-
}
|
|
9949
|
+
|
|
9950
|
+
// ==================== 排序 ====================
|
|
9951
|
+
handleSortChange({ prop, order }) {
|
|
9952
|
+
this.$emit('sort-change', { prop, order })
|
|
9853
9953
|
},
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
}
|
|
9859
|
-
if (options.showTip) {
|
|
9860
|
-
options.showOverflowTooltip = true;
|
|
9861
|
-
}
|
|
9862
|
-
return { ...options };
|
|
9954
|
+
|
|
9955
|
+
// ==================== 分页 ====================
|
|
9956
|
+
handleSizeChange(size) {
|
|
9957
|
+
this.$emit('size-change', size)
|
|
9863
9958
|
},
|
|
9864
|
-
|
|
9865
|
-
|
|
9866
|
-
|
|
9867
|
-
let sord = "";
|
|
9868
|
-
if (sortingType === "descending") {
|
|
9869
|
-
sord = "desc";
|
|
9870
|
-
} else if (sortingType === "ascending") {
|
|
9871
|
-
sord = "asc";
|
|
9872
|
-
}
|
|
9873
|
-
this.$emit("changeTableSort", sidx, sord);
|
|
9959
|
+
|
|
9960
|
+
handleCurrentChange(page) {
|
|
9961
|
+
this.$emit('page-change', page)
|
|
9874
9962
|
},
|
|
9963
|
+
|
|
9964
|
+
// ==================== 公开方法 ====================
|
|
9875
9965
|
getSelection() {
|
|
9876
|
-
return this
|
|
9966
|
+
return this.selectedRows
|
|
9877
9967
|
},
|
|
9968
|
+
|
|
9878
9969
|
clearSelection() {
|
|
9879
|
-
this.$refs.
|
|
9880
|
-
this
|
|
9881
|
-
return this;
|
|
9970
|
+
this.$refs.table && this.$refs.table.clearSelection()
|
|
9971
|
+
this.selectedRows = []
|
|
9882
9972
|
},
|
|
9883
|
-
|
|
9884
|
-
|
|
9973
|
+
|
|
9974
|
+
toggleRowSelection(row, selected) {
|
|
9975
|
+
this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
|
|
9885
9976
|
},
|
|
9977
|
+
|
|
9886
9978
|
toggleRowsSelection(rows, selected) {
|
|
9887
|
-
if (rows
|
|
9979
|
+
if (rows && rows.length) {
|
|
9888
9980
|
rows.forEach(row => {
|
|
9889
|
-
this.$refs.
|
|
9890
|
-
})
|
|
9891
|
-
} else {
|
|
9892
|
-
this.$refs.ExtendTable.store.toggleRowSelection(rows, selected, true);
|
|
9981
|
+
this.$refs.table && this.$refs.table.toggleRowSelection(row, selected)
|
|
9982
|
+
})
|
|
9893
9983
|
}
|
|
9894
|
-
this.$refs.ExtendTable.store.updateAllSelected();
|
|
9895
9984
|
},
|
|
9896
|
-
|
|
9897
|
-
|
|
9985
|
+
|
|
9986
|
+
doLayout() {
|
|
9987
|
+
this.$refs.table && this.$refs.table.doLayout()
|
|
9898
9988
|
},
|
|
9899
|
-
|
|
9900
|
-
|
|
9989
|
+
|
|
9990
|
+
// 获取列宽度(支持自适应)
|
|
9991
|
+
getColumnWidth(col) {
|
|
9992
|
+
// 如果有固定宽度,使用固定宽度
|
|
9993
|
+
if (col.width) {
|
|
9994
|
+
return typeof col.width === 'number' ? col.width : col.width.replace('px', '')
|
|
9995
|
+
}
|
|
9996
|
+
// 非固定列且虚拟滚动时使用自适应宽度
|
|
9997
|
+
if (!col.fixed && this.virtualScroll) {
|
|
9998
|
+
return this.autoColumnWidth
|
|
9999
|
+
}
|
|
10000
|
+
// 默认宽度
|
|
10001
|
+
if (col.minWidth) {
|
|
10002
|
+
return typeof col.minWidth === 'number' ? col.minWidth : col.minWidth.replace('px', '')
|
|
10003
|
+
}
|
|
10004
|
+
return 100
|
|
9901
10005
|
},
|
|
9902
|
-
|
|
9903
|
-
|
|
10006
|
+
|
|
10007
|
+
// 更新表格宽度(用于自适应列宽计算)
|
|
10008
|
+
updateTableWidth() {
|
|
10009
|
+
const tableWrapper = this.$refs.tableBody
|
|
10010
|
+
if (tableWrapper) {
|
|
10011
|
+
this.tableWidth = tableWrapper.offsetWidth || 1000
|
|
10012
|
+
}
|
|
9904
10013
|
},
|
|
9905
|
-
|
|
9906
|
-
|
|
10014
|
+
|
|
10015
|
+
// ==================== 虚拟滚动 ====================
|
|
10016
|
+
initVirtualScroll() {
|
|
10017
|
+
this.updateTableWidth()
|
|
10018
|
+
this.measureRowHeight()
|
|
10019
|
+
if (this.processedTableData.length > 0) {
|
|
10020
|
+
this.updateVisibleRange()
|
|
10021
|
+
}
|
|
9907
10022
|
},
|
|
9908
|
-
|
|
9909
|
-
|
|
10023
|
+
|
|
10024
|
+
measureRowHeight() {
|
|
10025
|
+
const el = this.$refs.table && this.$refs.table.$el
|
|
10026
|
+
if (!el) return
|
|
10027
|
+
const row = el.querySelector('.el-table__row')
|
|
10028
|
+
if (row) {
|
|
10029
|
+
this.rowHeight = row.offsetHeight || this.rowInitHeight
|
|
10030
|
+
}
|
|
9910
10031
|
},
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
-
const
|
|
9914
|
-
|
|
9915
|
-
if (
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
} catch (error) {
|
|
9919
|
-
console.error('Export hook error:', error);
|
|
9920
|
-
}
|
|
10032
|
+
|
|
10033
|
+
handleBodyScroll(event) {
|
|
10034
|
+
const target = event.target
|
|
10035
|
+
this.scrollLeft = target.scrollLeft
|
|
10036
|
+
if (this.virtualScroll) {
|
|
10037
|
+
this.scrollTop = target.scrollTop
|
|
10038
|
+
this.updateVisibleRange()
|
|
9921
10039
|
}
|
|
10040
|
+
},
|
|
10041
|
+
|
|
10042
|
+
updateVisibleRange() {
|
|
10043
|
+
const totalCount = this.processedTableData.length
|
|
10044
|
+
if (totalCount === 0 || this.rowHeight === 0) return
|
|
10045
|
+
|
|
10046
|
+
const visibleCount = Math.ceil((this.computedHeight || 400) / this.rowHeight)
|
|
10047
|
+
|
|
10048
|
+
this.visibleStartIndex = Math.max(0, Math.floor(this.scrollTop / this.rowHeight))
|
|
10049
|
+
this.visibleEndIndex = Math.min(
|
|
10050
|
+
totalCount,
|
|
10051
|
+
this.visibleStartIndex + visibleCount
|
|
10052
|
+
)
|
|
10053
|
+
this.visibleCount = visibleCount
|
|
10054
|
+
},
|
|
10055
|
+
|
|
10056
|
+
destroyVirtualScroll() {
|
|
10057
|
+
this.scrollTop = 0
|
|
10058
|
+
this.visibleStartIndex = 0
|
|
10059
|
+
this.visibleEndIndex = 0
|
|
9922
10060
|
}
|
|
9923
10061
|
}
|
|
9924
10062
|
});
|
|
9925
10063
|
|
|
9926
10064
|
// CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=script&lang=js
|
|
9927
10065
|
/* harmony default export */ var components_ex_tablevue_type_script_lang_js = (ex_tablevue_type_script_lang_js);
|
|
9928
|
-
// EXTERNAL MODULE: ./src/components/ex-table/index.vue?vue&type=style&index=0&id=
|
|
9929
|
-
var
|
|
10066
|
+
// EXTERNAL MODULE: ./src/components/ex-table/index.vue?vue&type=style&index=0&id=216b80f8&prod&scoped=true&lang=css
|
|
10067
|
+
var ex_tablevue_type_style_index_0_id_216b80f8_prod_scoped_true_lang_css = __webpack_require__("cdf7");
|
|
9930
10068
|
|
|
9931
10069
|
// CONCATENATED MODULE: ./src/components/ex-table/index.vue
|
|
9932
10070
|
|
|
@@ -9939,11 +10077,11 @@ var ex_tablevue_type_style_index_0_id_209e311e_prod_lang_scss_scoped_true = __we
|
|
|
9939
10077
|
|
|
9940
10078
|
var ex_table_component = Object(componentNormalizer["a" /* default */])(
|
|
9941
10079
|
components_ex_tablevue_type_script_lang_js,
|
|
9942
|
-
|
|
9943
|
-
|
|
10080
|
+
ex_tablevue_type_template_id_216b80f8_scoped_true_render,
|
|
10081
|
+
ex_tablevue_type_template_id_216b80f8_scoped_true_staticRenderFns,
|
|
9944
10082
|
false,
|
|
9945
10083
|
null,
|
|
9946
|
-
"
|
|
10084
|
+
"216b80f8",
|
|
9947
10085
|
null
|
|
9948
10086
|
|
|
9949
10087
|
)
|