xt-element-ui 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.common.js +959 -52
- package/lib/index.css +1 -1
- package/lib/index.umd.js +959 -52
- package/lib/index.umd.min.js +1 -1
- package/package.json +1 -1
- package/src/components/{xt-table → ex-table}/index.vue +15 -10
- package/src/components/index.scss +4 -1
- package/src/components/xt-grid-box/index.vue +114 -21
- package/src/components/xt-grid-box/style/index.scss +93 -0
- package/src/components/xt-grid-item/index.js +2 -0
- package/src/components/xt-grid-item/index.vue +107 -0
- package/src/components/xt-text/index.vue +6 -0
- package/src/components/xt-text/style/index.scss +26 -1
- package/src/config/element-registry.js +2 -2
- package/src/index.js +8 -2
- package/src/styles/theme/font.scss +6 -3
- /package/src/components/{xt-table → ex-table}/ExCell.vue +0 -0
- /package/src/components/{xt-table → ex-table}/ExColumn.vue +0 -0
- /package/src/components/{xt-table → ex-table}/index.js +0 -0
- /package/src/components/{xt-table → ex-table}/processor.js +0 -0
package/lib/index.common.js
CHANGED
|
@@ -308,6 +308,17 @@ 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
|
+
|
|
311
322
|
/***/ }),
|
|
312
323
|
|
|
313
324
|
/***/ "0d3e":
|
|
@@ -2383,6 +2394,13 @@ module.exports = {
|
|
|
2383
2394
|
}
|
|
2384
2395
|
|
|
2385
2396
|
|
|
2397
|
+
/***/ }),
|
|
2398
|
+
|
|
2399
|
+
/***/ "5385":
|
|
2400
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2401
|
+
|
|
2402
|
+
// extracted by mini-css-extract-plugin
|
|
2403
|
+
|
|
2386
2404
|
/***/ }),
|
|
2387
2405
|
|
|
2388
2406
|
/***/ "5416":
|
|
@@ -2446,17 +2464,6 @@ module.exports = function getTimezoneOffsetInMilliseconds (dirtyDate) {
|
|
|
2446
2464
|
}
|
|
2447
2465
|
|
|
2448
2466
|
|
|
2449
|
-
/***/ }),
|
|
2450
|
-
|
|
2451
|
-
/***/ "5786":
|
|
2452
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2453
|
-
|
|
2454
|
-
"use strict";
|
|
2455
|
-
/* 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_42b6cd2c_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d4e0");
|
|
2456
|
-
/* 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_42b6cd2c_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_42b6cd2c_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
|
|
2457
|
-
/* unused harmony reexport * */
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
2467
|
/***/ }),
|
|
2461
2468
|
|
|
2462
2469
|
/***/ "580f":
|
|
@@ -3593,6 +3600,13 @@ function addWeeks (dirtyDate, dirtyAmount) {
|
|
|
3593
3600
|
module.exports = addWeeks
|
|
3594
3601
|
|
|
3595
3602
|
|
|
3603
|
+
/***/ }),
|
|
3604
|
+
|
|
3605
|
+
/***/ "7de5":
|
|
3606
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3607
|
+
|
|
3608
|
+
// extracted by mini-css-extract-plugin
|
|
3609
|
+
|
|
3596
3610
|
/***/ }),
|
|
3597
3611
|
|
|
3598
3612
|
/***/ "7eea":
|
|
@@ -6283,13 +6297,6 @@ function subQuarters (dirtyDate, dirtyAmount) {
|
|
|
6283
6297
|
module.exports = subQuarters
|
|
6284
6298
|
|
|
6285
6299
|
|
|
6286
|
-
/***/ }),
|
|
6287
|
-
|
|
6288
|
-
/***/ "d4e0":
|
|
6289
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
6290
|
-
|
|
6291
|
-
// extracted by mini-css-extract-plugin
|
|
6292
|
-
|
|
6293
6300
|
/***/ }),
|
|
6294
6301
|
|
|
6295
6302
|
/***/ "d67a":
|
|
@@ -6331,6 +6338,17 @@ function endOfMonth (dirtyDate) {
|
|
|
6331
6338
|
module.exports = endOfMonth
|
|
6332
6339
|
|
|
6333
6340
|
|
|
6341
|
+
/***/ }),
|
|
6342
|
+
|
|
6343
|
+
/***/ "d728":
|
|
6344
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6345
|
+
|
|
6346
|
+
"use strict";
|
|
6347
|
+
/* 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_5318efc6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5385");
|
|
6348
|
+
/* 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_5318efc6_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_5318efc6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
6349
|
+
/* unused harmony reexport * */
|
|
6350
|
+
|
|
6351
|
+
|
|
6334
6352
|
/***/ }),
|
|
6335
6353
|
|
|
6336
6354
|
/***/ "d81e":
|
|
@@ -8190,17 +8208,18 @@ var xt_config_provider_component = Object(componentNormalizer["a" /* default */]
|
|
|
8190
8208
|
|
|
8191
8209
|
/* harmony default export */ var components_xt_config_provider = (xt_config_provider);
|
|
8192
8210
|
|
|
8193
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4207ee36-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=
|
|
8194
|
-
var
|
|
8211
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4207ee36-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
|
+
var xt_textvue_type_template_id_2b4328b0_render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',{staticClass:"xt-text",class:[
|
|
8195
8213
|
_vm.type ? 'xt-text--' + _vm.type : '',
|
|
8214
|
+
'xt-text--' + _vm.size,
|
|
8196
8215
|
{ 'xt-text--bold': _vm.bold },
|
|
8197
8216
|
{ 'xt-text--money': _vm.money }
|
|
8198
8217
|
],style:(_vm.customStyle)},[_vm._t("default",function(){return [(_vm.money && _vm.displayValue !== undefined)?[_vm._v(_vm._s(_vm.displayValue))]:_vm._e()]})],2)
|
|
8199
8218
|
}
|
|
8200
|
-
var
|
|
8219
|
+
var xt_textvue_type_template_id_2b4328b0_staticRenderFns = []
|
|
8201
8220
|
|
|
8202
8221
|
|
|
8203
|
-
// CONCATENATED MODULE: ./src/components/xt-text/index.vue?vue&type=template&id=
|
|
8222
|
+
// CONCATENATED MODULE: ./src/components/xt-text/index.vue?vue&type=template&id=2b4328b0
|
|
8204
8223
|
|
|
8205
8224
|
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-text/index.vue?vue&type=script&lang=js
|
|
8206
8225
|
|
|
@@ -8216,6 +8235,11 @@ var xt_textvue_type_template_id_06592e32_staticRenderFns = []
|
|
|
8216
8235
|
default: '',
|
|
8217
8236
|
validator: (val) => ['', 'primary', 'success', 'warning', 'danger'].includes(val)
|
|
8218
8237
|
},
|
|
8238
|
+
size: {
|
|
8239
|
+
type: String,
|
|
8240
|
+
default: 'base',
|
|
8241
|
+
validator: (val) => ['extra-large', 'large', 'medium', 'base', 'small', 'extra-small'].includes(val)
|
|
8242
|
+
},
|
|
8219
8243
|
bold: {
|
|
8220
8244
|
type: Boolean,
|
|
8221
8245
|
default: false
|
|
@@ -8318,8 +8342,8 @@ var xt_textvue_type_template_id_06592e32_staticRenderFns = []
|
|
|
8318
8342
|
|
|
8319
8343
|
var xt_text_component = Object(componentNormalizer["a" /* default */])(
|
|
8320
8344
|
components_xt_textvue_type_script_lang_js,
|
|
8321
|
-
|
|
8322
|
-
|
|
8345
|
+
xt_textvue_type_template_id_2b4328b0_render,
|
|
8346
|
+
xt_textvue_type_template_id_2b4328b0_staticRenderFns,
|
|
8323
8347
|
false,
|
|
8324
8348
|
null,
|
|
8325
8349
|
null,
|
|
@@ -8331,63 +8355,158 @@ var xt_text_component = Object(componentNormalizer["a" /* default */])(
|
|
|
8331
8355
|
// CONCATENATED MODULE: ./src/components/xt-text/index.js
|
|
8332
8356
|
|
|
8333
8357
|
/* harmony default export */ var components_xt_text = (xt_text);
|
|
8334
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4207ee36-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=
|
|
8335
|
-
var
|
|
8358
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4207ee36-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
|
+
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)
|
|
8336
8360
|
}
|
|
8337
|
-
var
|
|
8361
|
+
var xt_grid_boxvue_type_template_id_67e197c4_staticRenderFns = []
|
|
8338
8362
|
|
|
8339
8363
|
|
|
8340
|
-
// CONCATENATED MODULE: ./src/components/xt-grid-box/index.vue?vue&type=template&id=
|
|
8364
|
+
// CONCATENATED MODULE: ./src/components/xt-grid-box/index.vue?vue&type=template&id=67e197c4
|
|
8341
8365
|
|
|
8342
8366
|
// 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-grid-box/index.vue?vue&type=script&lang=js
|
|
8343
8367
|
|
|
8344
8368
|
/* harmony default export */ var xt_grid_boxvue_type_script_lang_js = ({
|
|
8345
8369
|
name: "XtGridBox",
|
|
8346
8370
|
props: {
|
|
8371
|
+
// 列配置
|
|
8347
8372
|
columns: {
|
|
8348
|
-
type: [String, Array
|
|
8373
|
+
type: [String, Array, Number],
|
|
8349
8374
|
default: "1fr"
|
|
8350
8375
|
},
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
|
|
8376
|
+
// 行配置
|
|
8377
|
+
rows: {
|
|
8378
|
+
type: [String, Array],
|
|
8379
|
+
default: "auto"
|
|
8380
|
+
},
|
|
8381
|
+
// 间距(同时控制行列间距)
|
|
8382
|
+
gap: { type: String, default: "" },
|
|
8383
|
+
// 行间距
|
|
8384
|
+
rowGap: { type: String, default: "" },
|
|
8385
|
+
// 列间距
|
|
8386
|
+
colGap: { type: String, default: "" },
|
|
8387
|
+
// 排列方向
|
|
8388
|
+
flow: {
|
|
8389
|
+
type: String,
|
|
8390
|
+
default: "row",
|
|
8391
|
+
validator: (val) => ['row', 'column', 'row dense', 'column dense'].includes(val)
|
|
8392
|
+
},
|
|
8393
|
+
// 命名区域
|
|
8394
|
+
areas: { type: [String, Array], default: "" },
|
|
8395
|
+
// 子项对齐(place-items)
|
|
8396
|
+
align: {
|
|
8397
|
+
type: String,
|
|
8398
|
+
default: "stretch",
|
|
8399
|
+
validator: (val) => ['start', 'end', 'center', 'stretch', 'baseline'].includes(val)
|
|
8354
8400
|
},
|
|
8355
|
-
|
|
8401
|
+
// 内容对齐(place-content)
|
|
8402
|
+
justify: {
|
|
8403
|
+
type: String,
|
|
8404
|
+
default: "start",
|
|
8405
|
+
validator: (val) => ['start', 'end', 'center', 'space-between', 'space-around', 'space-evenly', 'stretch'].includes(val)
|
|
8406
|
+
},
|
|
8407
|
+
// 响应式配置 { sm: 2, md: 3, lg: 4 }
|
|
8408
|
+
responsive: { type: Object, default: () => ({}) },
|
|
8409
|
+
// 是否自动填充
|
|
8410
|
+
autoFlow: { type: String, default: "" }
|
|
8356
8411
|
},
|
|
8357
8412
|
computed: {
|
|
8358
8413
|
styleAttrs() {
|
|
8359
|
-
const
|
|
8360
|
-
|
|
8361
|
-
return this.gap ? {
|
|
8362
|
-
gridTemplateColumns,
|
|
8363
|
-
gridTemplateRows,
|
|
8364
|
-
gap: this.gap.toString().split(" ").map(_getGap).join(" ")
|
|
8365
|
-
} : {
|
|
8366
|
-
gridTemplateColumns,
|
|
8367
|
-
gridTemplateRows
|
|
8414
|
+
const styles = {
|
|
8415
|
+
display: "grid"
|
|
8368
8416
|
};
|
|
8417
|
+
|
|
8418
|
+
// 处理列配置
|
|
8419
|
+
if (typeof this.columns === 'number') {
|
|
8420
|
+
styles.gridTemplateColumns = `repeat(${this.columns}, 1fr)`;
|
|
8421
|
+
} else if (Array.isArray(this.columns)) {
|
|
8422
|
+
styles.gridTemplateColumns = this.columns.join(" ");
|
|
8423
|
+
} else {
|
|
8424
|
+
styles.gridTemplateColumns = this.columns;
|
|
8425
|
+
}
|
|
8426
|
+
|
|
8427
|
+
// 处理行配置
|
|
8428
|
+
if (Array.isArray(this.rows)) {
|
|
8429
|
+
styles.gridTemplateRows = this.rows.join(" ");
|
|
8430
|
+
} else {
|
|
8431
|
+
styles.gridTemplateRows = this.rows;
|
|
8432
|
+
}
|
|
8433
|
+
|
|
8434
|
+
// 处理间距
|
|
8435
|
+
if (this.gap) {
|
|
8436
|
+
styles.gap = this.gap;
|
|
8437
|
+
} else {
|
|
8438
|
+
if (this.rowGap) styles.rowGap = this.rowGap;
|
|
8439
|
+
if (this.colGap) styles.columnGap = this.colGap;
|
|
8440
|
+
}
|
|
8441
|
+
|
|
8442
|
+
// 处理排列方向
|
|
8443
|
+
if (this.flow) {
|
|
8444
|
+
styles.gridAutoFlow = this.flow;
|
|
8445
|
+
}
|
|
8446
|
+
|
|
8447
|
+
// 处理命名区域
|
|
8448
|
+
if (this.areas) {
|
|
8449
|
+
if (Array.isArray(this.areas)) {
|
|
8450
|
+
styles.gridTemplateAreas = this.areas.map(row => `"${row}"`).join(" ");
|
|
8451
|
+
} else {
|
|
8452
|
+
styles.gridTemplateAreas = this.areas;
|
|
8453
|
+
}
|
|
8454
|
+
}
|
|
8455
|
+
|
|
8456
|
+
// 处理子项对齐
|
|
8457
|
+
if (this.align) {
|
|
8458
|
+
styles.placeItems = this.align;
|
|
8459
|
+
}
|
|
8460
|
+
|
|
8461
|
+
// 处理内容对齐
|
|
8462
|
+
if (this.justify) {
|
|
8463
|
+
styles.placeContent = this.justify;
|
|
8464
|
+
}
|
|
8465
|
+
|
|
8466
|
+
// 处理响应式断点
|
|
8467
|
+
if (Object.keys(this.responsive).length > 0) {
|
|
8468
|
+
this.addResponsiveStyles(styles);
|
|
8469
|
+
}
|
|
8470
|
+
|
|
8471
|
+
return styles;
|
|
8472
|
+
}
|
|
8473
|
+
},
|
|
8474
|
+
methods: {
|
|
8475
|
+
addResponsiveStyles(styles) {
|
|
8476
|
+
// 响应式断点映射
|
|
8477
|
+
const breakpoints = {
|
|
8478
|
+
xs: '(max-width: 575px)',
|
|
8479
|
+
sm: '(min-width: 576px)',
|
|
8480
|
+
md: '(min-width: 768px)',
|
|
8481
|
+
lg: '(min-width: 992px)',
|
|
8482
|
+
xl: '(min-width: 1200px)'
|
|
8483
|
+
};
|
|
8484
|
+
|
|
8485
|
+
Object.entries(this.responsive).forEach(([key, value]) => {
|
|
8486
|
+
if (breakpoints[key]) {
|
|
8487
|
+
const mediaQuery = `@media ${breakpoints[key]}`;
|
|
8488
|
+
// 注意:内联样式不支持媒体查询,这里预留接口
|
|
8489
|
+
// 实际响应式需要通过 CSS 类或其他方式实现
|
|
8490
|
+
}
|
|
8491
|
+
});
|
|
8369
8492
|
}
|
|
8370
8493
|
}
|
|
8371
8494
|
});
|
|
8372
8495
|
|
|
8373
8496
|
// CONCATENATED MODULE: ./src/components/xt-grid-box/index.vue?vue&type=script&lang=js
|
|
8374
8497
|
/* harmony default export */ var components_xt_grid_boxvue_type_script_lang_js = (xt_grid_boxvue_type_script_lang_js);
|
|
8375
|
-
// EXTERNAL MODULE: ./src/components/xt-grid-box/index.vue?vue&type=style&index=0&id=42b6cd2c&prod&lang=scss
|
|
8376
|
-
var xt_grid_boxvue_type_style_index_0_id_42b6cd2c_prod_lang_scss = __webpack_require__("5786");
|
|
8377
|
-
|
|
8378
8498
|
// CONCATENATED MODULE: ./src/components/xt-grid-box/index.vue
|
|
8379
8499
|
|
|
8380
8500
|
|
|
8381
8501
|
|
|
8382
8502
|
|
|
8383
8503
|
|
|
8384
|
-
|
|
8385
8504
|
/* normalize component */
|
|
8386
8505
|
|
|
8387
8506
|
var xt_grid_box_component = Object(componentNormalizer["a" /* default */])(
|
|
8388
8507
|
components_xt_grid_boxvue_type_script_lang_js,
|
|
8389
|
-
|
|
8390
|
-
|
|
8508
|
+
xt_grid_boxvue_type_template_id_67e197c4_render,
|
|
8509
|
+
xt_grid_boxvue_type_template_id_67e197c4_staticRenderFns,
|
|
8391
8510
|
false,
|
|
8392
8511
|
null,
|
|
8393
8512
|
null,
|
|
@@ -8400,6 +8519,139 @@ var xt_grid_box_component = Object(componentNormalizer["a" /* default */])(
|
|
|
8400
8519
|
|
|
8401
8520
|
/* harmony default export */ var components_xt_grid_box = (xt_grid_box);
|
|
8402
8521
|
|
|
8522
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4207ee36-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
|
+
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
|
+
}
|
|
8525
|
+
var xt_grid_itemvue_type_template_id_5318efc6_scoped_true_staticRenderFns = []
|
|
8526
|
+
|
|
8527
|
+
|
|
8528
|
+
// CONCATENATED MODULE: ./src/components/xt-grid-item/index.vue?vue&type=template&id=5318efc6&scoped=true
|
|
8529
|
+
|
|
8530
|
+
// 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-grid-item/index.vue?vue&type=script&lang=js
|
|
8531
|
+
|
|
8532
|
+
/* harmony default export */ var xt_grid_itemvue_type_script_lang_js = ({
|
|
8533
|
+
name: "XtGridItem",
|
|
8534
|
+
props: {
|
|
8535
|
+
// 跨列数
|
|
8536
|
+
span: {
|
|
8537
|
+
type: Number,
|
|
8538
|
+
default: 1,
|
|
8539
|
+
validator: (val) => val > 0
|
|
8540
|
+
},
|
|
8541
|
+
// 跨行数
|
|
8542
|
+
rowSpan: {
|
|
8543
|
+
type: Number,
|
|
8544
|
+
default: 1,
|
|
8545
|
+
validator: (val) => val > 0
|
|
8546
|
+
},
|
|
8547
|
+
// 起始列
|
|
8548
|
+
start: {
|
|
8549
|
+
type: Number,
|
|
8550
|
+
default: 0,
|
|
8551
|
+
validator: (val) => val >= 0
|
|
8552
|
+
},
|
|
8553
|
+
// 起始行
|
|
8554
|
+
rowStart: {
|
|
8555
|
+
type: Number,
|
|
8556
|
+
default: 0,
|
|
8557
|
+
validator: (val) => val >= 0
|
|
8558
|
+
},
|
|
8559
|
+
// 命名区域
|
|
8560
|
+
area: {
|
|
8561
|
+
type: String,
|
|
8562
|
+
default: ""
|
|
8563
|
+
},
|
|
8564
|
+
// 对齐方式(justify-self)
|
|
8565
|
+
justifySelf: {
|
|
8566
|
+
type: String,
|
|
8567
|
+
default: "auto",
|
|
8568
|
+
validator: (val) => ['auto', 'start', 'end', 'center', 'stretch'].includes(val)
|
|
8569
|
+
},
|
|
8570
|
+
// 对齐方式(align-self)
|
|
8571
|
+
alignSelf: {
|
|
8572
|
+
type: String,
|
|
8573
|
+
default: "auto",
|
|
8574
|
+
validator: (val) => ['auto', 'start', 'end', 'center', 'stretch', 'baseline'].includes(val)
|
|
8575
|
+
},
|
|
8576
|
+
// 自定义样式类
|
|
8577
|
+
customClass: {
|
|
8578
|
+
type: String,
|
|
8579
|
+
default: ""
|
|
8580
|
+
}
|
|
8581
|
+
},
|
|
8582
|
+
computed: {
|
|
8583
|
+
styleAttrs() {
|
|
8584
|
+
const styles = {};
|
|
8585
|
+
|
|
8586
|
+
// 处理跨列
|
|
8587
|
+
if (this.span > 1) {
|
|
8588
|
+
styles.gridColumnEnd = `span ${this.span}`;
|
|
8589
|
+
}
|
|
8590
|
+
|
|
8591
|
+
// 处理跨行
|
|
8592
|
+
if (this.rowSpan > 1) {
|
|
8593
|
+
styles.gridRowEnd = `span ${this.rowSpan}`;
|
|
8594
|
+
}
|
|
8595
|
+
|
|
8596
|
+
// 处理起始列
|
|
8597
|
+
if (this.start > 0) {
|
|
8598
|
+
styles.gridColumnStart = this.start;
|
|
8599
|
+
}
|
|
8600
|
+
|
|
8601
|
+
// 处理起始行
|
|
8602
|
+
if (this.rowStart > 0) {
|
|
8603
|
+
styles.gridRowStart = this.rowStart;
|
|
8604
|
+
}
|
|
8605
|
+
|
|
8606
|
+
// 处理命名区域
|
|
8607
|
+
if (this.area) {
|
|
8608
|
+
styles.gridArea = this.area;
|
|
8609
|
+
}
|
|
8610
|
+
|
|
8611
|
+
// 处理 justify-self
|
|
8612
|
+
if (this.justifySelf && this.justifySelf !== 'auto') {
|
|
8613
|
+
styles.justifySelf = this.justifySelf;
|
|
8614
|
+
}
|
|
8615
|
+
|
|
8616
|
+
// 处理 align-self
|
|
8617
|
+
if (this.alignSelf && this.alignSelf !== 'auto') {
|
|
8618
|
+
styles.alignSelf = this.alignSelf;
|
|
8619
|
+
}
|
|
8620
|
+
|
|
8621
|
+
return styles;
|
|
8622
|
+
}
|
|
8623
|
+
}
|
|
8624
|
+
});
|
|
8625
|
+
|
|
8626
|
+
// CONCATENATED MODULE: ./src/components/xt-grid-item/index.vue?vue&type=script&lang=js
|
|
8627
|
+
/* harmony default export */ var components_xt_grid_itemvue_type_script_lang_js = (xt_grid_itemvue_type_script_lang_js);
|
|
8628
|
+
// EXTERNAL MODULE: ./src/components/xt-grid-item/index.vue?vue&type=style&index=0&id=5318efc6&prod&lang=scss&scoped=true
|
|
8629
|
+
var xt_grid_itemvue_type_style_index_0_id_5318efc6_prod_lang_scss_scoped_true = __webpack_require__("d728");
|
|
8630
|
+
|
|
8631
|
+
// CONCATENATED MODULE: ./src/components/xt-grid-item/index.vue
|
|
8632
|
+
|
|
8633
|
+
|
|
8634
|
+
|
|
8635
|
+
|
|
8636
|
+
|
|
8637
|
+
|
|
8638
|
+
/* normalize component */
|
|
8639
|
+
|
|
8640
|
+
var xt_grid_item_component = Object(componentNormalizer["a" /* default */])(
|
|
8641
|
+
components_xt_grid_itemvue_type_script_lang_js,
|
|
8642
|
+
xt_grid_itemvue_type_template_id_5318efc6_scoped_true_render,
|
|
8643
|
+
xt_grid_itemvue_type_template_id_5318efc6_scoped_true_staticRenderFns,
|
|
8644
|
+
false,
|
|
8645
|
+
null,
|
|
8646
|
+
"5318efc6",
|
|
8647
|
+
null
|
|
8648
|
+
|
|
8649
|
+
)
|
|
8650
|
+
|
|
8651
|
+
/* harmony default export */ var xt_grid_item = (xt_grid_item_component.exports);
|
|
8652
|
+
// CONCATENATED MODULE: ./src/components/xt-grid-item/index.js
|
|
8653
|
+
|
|
8654
|
+
/* harmony default export */ var components_xt_grid_item = (xt_grid_item);
|
|
8403
8655
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4207ee36-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
|
|
8404
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)
|
|
8405
8657
|
}
|
|
@@ -9042,6 +9294,655 @@ ex_card.install = function (Vue) {
|
|
|
9042
9294
|
|
|
9043
9295
|
/* harmony default export */ var components_ex_card = (ex_card);
|
|
9044
9296
|
|
|
9297
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4207ee36-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)
|
|
9299
|
+
}
|
|
9300
|
+
var ex_tablevue_type_template_id_209e311e_scoped_true_staticRenderFns = []
|
|
9301
|
+
|
|
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":"4207ee36-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 = []
|
|
9309
|
+
|
|
9310
|
+
|
|
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
|
+
});
|
|
9389
|
+
|
|
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
|
|
9394
|
+
|
|
9395
|
+
|
|
9396
|
+
|
|
9397
|
+
|
|
9398
|
+
/* normalize component */
|
|
9399
|
+
|
|
9400
|
+
var ExCell_component = Object(componentNormalizer["a" /* default */])(
|
|
9401
|
+
ex_table_ExCellvue_type_script_lang_js,
|
|
9402
|
+
ExCell_render,
|
|
9403
|
+
ExCell_staticRenderFns,
|
|
9404
|
+
false,
|
|
9405
|
+
null,
|
|
9406
|
+
null,
|
|
9407
|
+
null
|
|
9408
|
+
|
|
9409
|
+
)
|
|
9410
|
+
|
|
9411
|
+
/* harmony default export */ var ExCell = (ExCell_component.exports);
|
|
9412
|
+
// 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
|
+
|
|
9414
|
+
|
|
9415
|
+
|
|
9416
|
+
|
|
9417
|
+
|
|
9418
|
+
/* 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
|
+
},
|
|
9426
|
+
inheritAttrs: false,
|
|
9427
|
+
props: {
|
|
9428
|
+
tbId: {
|
|
9429
|
+
type: [Number, String],
|
|
9430
|
+
default: ""
|
|
9431
|
+
},
|
|
9432
|
+
tableData: {
|
|
9433
|
+
type: Array,
|
|
9434
|
+
default() {
|
|
9435
|
+
return [];
|
|
9436
|
+
}
|
|
9437
|
+
},
|
|
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
|
+
};
|
|
9453
|
+
}
|
|
9454
|
+
},
|
|
9455
|
+
loading: {
|
|
9456
|
+
type: Boolean,
|
|
9457
|
+
default: false
|
|
9458
|
+
},
|
|
9459
|
+
pageSizes: {
|
|
9460
|
+
type: Array,
|
|
9461
|
+
default: () => [20, 50, 100, 200]
|
|
9462
|
+
},
|
|
9463
|
+
pagination: {
|
|
9464
|
+
type: Object,
|
|
9465
|
+
default: null
|
|
9466
|
+
},
|
|
9467
|
+
total: {
|
|
9468
|
+
type: Number,
|
|
9469
|
+
default: 0
|
|
9470
|
+
},
|
|
9471
|
+
columns: {
|
|
9472
|
+
type: Array,
|
|
9473
|
+
default() {
|
|
9474
|
+
return [];
|
|
9475
|
+
}
|
|
9476
|
+
},
|
|
9477
|
+
insertColumns: {
|
|
9478
|
+
type: Array,
|
|
9479
|
+
default() {
|
|
9480
|
+
return [];
|
|
9481
|
+
}
|
|
9482
|
+
},
|
|
9483
|
+
selectable: {
|
|
9484
|
+
type: Function,
|
|
9485
|
+
default() {
|
|
9486
|
+
return () => true;
|
|
9487
|
+
}
|
|
9488
|
+
},
|
|
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
|
|
9516
|
+
},
|
|
9517
|
+
simplePage: {
|
|
9518
|
+
type: Boolean,
|
|
9519
|
+
default: false
|
|
9520
|
+
},
|
|
9521
|
+
border: {
|
|
9522
|
+
type: Boolean,
|
|
9523
|
+
default: true
|
|
9524
|
+
},
|
|
9525
|
+
indexRender: Function,
|
|
9526
|
+
spanFields: {
|
|
9527
|
+
type: Object
|
|
9528
|
+
},
|
|
9529
|
+
groupColumns: {
|
|
9530
|
+
type: Array,
|
|
9531
|
+
default() {
|
|
9532
|
+
return [];
|
|
9533
|
+
}
|
|
9534
|
+
},
|
|
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 [];
|
|
9566
|
+
}
|
|
9567
|
+
}
|
|
9568
|
+
},
|
|
9569
|
+
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
|
+
}
|
|
9590
|
+
},
|
|
9591
|
+
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
|
+
}
|
|
9602
|
+
},
|
|
9603
|
+
tableData: {
|
|
9604
|
+
handler(val) {
|
|
9605
|
+
this.$nextTick(() => {
|
|
9606
|
+
this.changeTableHight();
|
|
9607
|
+
this.hasLoadData = true;
|
|
9608
|
+
});
|
|
9609
|
+
}
|
|
9610
|
+
}
|
|
9611
|
+
},
|
|
9612
|
+
mounted() {
|
|
9613
|
+
this.$nextTick(() => {
|
|
9614
|
+
this.changeTableHight();
|
|
9615
|
+
if (!this.height) {
|
|
9616
|
+
window.onresize = () => {
|
|
9617
|
+
this.changeTableHight();
|
|
9618
|
+
};
|
|
9619
|
+
}
|
|
9620
|
+
});
|
|
9621
|
+
},
|
|
9622
|
+
activated() {
|
|
9623
|
+
this.doLayout();
|
|
9624
|
+
},
|
|
9625
|
+
beforeDestroy() {
|
|
9626
|
+
document.removeEventListener("click", this.handleDocumentClick);
|
|
9627
|
+
},
|
|
9628
|
+
methods: {
|
|
9629
|
+
realIndexRender(index) {
|
|
9630
|
+
if (this.pagination) {
|
|
9631
|
+
return this.pagination.PageSize * (this.pagination.PageNum - 1) + index + 1;
|
|
9632
|
+
}
|
|
9633
|
+
return index + 1;
|
|
9634
|
+
},
|
|
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);
|
|
9642
|
+
}
|
|
9643
|
+
});
|
|
9644
|
+
return checkArr;
|
|
9645
|
+
},
|
|
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);
|
|
9664
|
+
}
|
|
9665
|
+
},
|
|
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);
|
|
9671
|
+
}
|
|
9672
|
+
},
|
|
9673
|
+
handleToggle(show, item) {
|
|
9674
|
+
if (this.checkedColumns.length === 0) {
|
|
9675
|
+
this.$message.warning("至少选择一列显示!");
|
|
9676
|
+
return;
|
|
9677
|
+
}
|
|
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
|
+
});
|
|
9687
|
+
},
|
|
9688
|
+
doLayout() {
|
|
9689
|
+
this.$refs.ExtendTable && this.$refs.ExtendTable.doLayout();
|
|
9690
|
+
},
|
|
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
|
+
};
|
|
9702
|
+
},
|
|
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
|
+
}
|
|
9726
|
+
}
|
|
9727
|
+
return { rowspan: 1, colspan: 1 };
|
|
9728
|
+
}
|
|
9729
|
+
},
|
|
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
|
+
|
|
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
|
+
}
|
|
9748
|
+
}
|
|
9749
|
+
|
|
9750
|
+
for (let level = 0; level < this.groupColumns.length; level++) {
|
|
9751
|
+
let pos = 0;
|
|
9752
|
+
while (pos < rowCount) {
|
|
9753
|
+
const startPos = pos;
|
|
9754
|
+
|
|
9755
|
+
let endPos = startPos;
|
|
9756
|
+
const currentValue = this.tableData[startPos][this.groupColumns[level].prop];
|
|
9757
|
+
|
|
9758
|
+
let sameParent = true;
|
|
9759
|
+
|
|
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
|
+
}
|
|
9772
|
+
|
|
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
|
+
}
|
|
9779
|
+
}
|
|
9780
|
+
|
|
9781
|
+
pos = endPos + 1;
|
|
9782
|
+
}
|
|
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;
|
|
9791
|
+
}
|
|
9792
|
+
}
|
|
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
|
+
|
|
9802
|
+
result.forEach((row, index) => {
|
|
9803
|
+
if (row[field] !== currentValue) {
|
|
9804
|
+
currentValue = row[field];
|
|
9805
|
+
startIndex = index;
|
|
9806
|
+
}
|
|
9807
|
+
|
|
9808
|
+
row[`_${field}_span`] = 0;
|
|
9809
|
+
row[`_${field}_start`] = false;
|
|
9810
|
+
|
|
9811
|
+
let endIndex = index;
|
|
9812
|
+
|
|
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;
|
|
9823
|
+
},
|
|
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
|
+
}
|
|
9843
|
+
},
|
|
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 };
|
|
9853
|
+
},
|
|
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);
|
|
9864
|
+
},
|
|
9865
|
+
getSelection() {
|
|
9866
|
+
return this.$refs.ExtendTable.store.states.selection;
|
|
9867
|
+
},
|
|
9868
|
+
clearSelection() {
|
|
9869
|
+
this.$refs.ExtendTable.store.clearSelection();
|
|
9870
|
+
this.$refs.ExtendTable.store.updateAllSelected();
|
|
9871
|
+
return this;
|
|
9872
|
+
},
|
|
9873
|
+
toggleRowSelection(rows, selected) {
|
|
9874
|
+
this.$refs.ExtendTable.toggleRowSelection(rows, true);
|
|
9875
|
+
},
|
|
9876
|
+
toggleRowsSelection(rows, selected) {
|
|
9877
|
+
if (rows instanceof Array) {
|
|
9878
|
+
rows.forEach(row => {
|
|
9879
|
+
this.$refs.ExtendTable.store.toggleRowSelection(row, selected, true);
|
|
9880
|
+
});
|
|
9881
|
+
} else {
|
|
9882
|
+
this.$refs.ExtendTable.store.toggleRowSelection(rows, selected, true);
|
|
9883
|
+
}
|
|
9884
|
+
this.$refs.ExtendTable.store.updateAllSelected();
|
|
9885
|
+
},
|
|
9886
|
+
rowChange(newVal, oldVal) {
|
|
9887
|
+
this.$emit("currentChange", newVal, oldVal);
|
|
9888
|
+
},
|
|
9889
|
+
rowClick(row) {
|
|
9890
|
+
this.$emit("rowClick", row);
|
|
9891
|
+
},
|
|
9892
|
+
pageChange(val) {
|
|
9893
|
+
this.$emit("pageChange", val);
|
|
9894
|
+
},
|
|
9895
|
+
sizeChange(val) {
|
|
9896
|
+
this.$emit("sizeChange", val);
|
|
9897
|
+
},
|
|
9898
|
+
selectionChange(selections) {
|
|
9899
|
+
this.$emit("selectionChange", selections);
|
|
9900
|
+
},
|
|
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
|
+
}
|
|
9911
|
+
}
|
|
9912
|
+
}
|
|
9913
|
+
}
|
|
9914
|
+
});
|
|
9915
|
+
|
|
9916
|
+
// CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=script&lang=js
|
|
9917
|
+
/* 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");
|
|
9920
|
+
|
|
9921
|
+
// CONCATENATED MODULE: ./src/components/ex-table/index.vue
|
|
9922
|
+
|
|
9923
|
+
|
|
9924
|
+
|
|
9925
|
+
|
|
9926
|
+
|
|
9927
|
+
|
|
9928
|
+
/* normalize component */
|
|
9929
|
+
|
|
9930
|
+
var ex_table_component = Object(componentNormalizer["a" /* default */])(
|
|
9931
|
+
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,
|
|
9934
|
+
false,
|
|
9935
|
+
null,
|
|
9936
|
+
"209e311e",
|
|
9937
|
+
null
|
|
9938
|
+
|
|
9939
|
+
)
|
|
9940
|
+
|
|
9941
|
+
/* harmony default export */ var ex_table = (ex_table_component.exports);
|
|
9942
|
+
// CONCATENATED MODULE: ./src/components/ex-table/index.js
|
|
9943
|
+
|
|
9944
|
+
/* harmony default export */ var components_ex_table = (ex_table);
|
|
9945
|
+
|
|
9045
9946
|
// CONCATENATED MODULE: ./src/config/element-registry.js
|
|
9046
9947
|
/**
|
|
9047
9948
|
* XT-UI 组件注册配置文件
|
|
@@ -9053,8 +9954,8 @@ const existingExComponents = [
|
|
|
9053
9954
|
'Button', // ExButton 已存在
|
|
9054
9955
|
'Card', // ExCard 已存在
|
|
9055
9956
|
'Input', // XtInput 已存在(用户要求不自动注册)
|
|
9056
|
-
'Table', // ExTable 已存在(在
|
|
9057
|
-
'TableColumn', // ExColumn 已存在(在
|
|
9957
|
+
'Table', // ExTable 已存在(在 ex-table 目录中)
|
|
9958
|
+
'TableColumn', // ExColumn 已存在(在 ex-table 目录中)
|
|
9058
9959
|
'Chart' // ExChart 已存在
|
|
9059
9960
|
]
|
|
9060
9961
|
|
|
@@ -9208,8 +10109,10 @@ const { getConfig: src_getConfig, setConfig: src_setConfig, getTheme: src_getThe
|
|
|
9208
10109
|
|
|
9209
10110
|
|
|
9210
10111
|
|
|
10112
|
+
|
|
9211
10113
|
// ExChart 组件(基于 ECharts 封装)
|
|
9212
10114
|
|
|
10115
|
+
// ExTable 组件(基于 ElementUI Table 封装)
|
|
9213
10116
|
|
|
9214
10117
|
// 导入 Element UI 组件注册配置
|
|
9215
10118
|
|
|
@@ -9224,10 +10127,12 @@ const src_components = [
|
|
|
9224
10127
|
components_xt_config_provider,
|
|
9225
10128
|
components_xt_text,
|
|
9226
10129
|
components_xt_grid_box,
|
|
10130
|
+
components_xt_grid_item,
|
|
9227
10131
|
components_xt_date_picker,
|
|
9228
10132
|
components_ex_button,
|
|
9229
10133
|
components_ex_chart,
|
|
9230
|
-
components_ex_card
|
|
10134
|
+
components_ex_card,
|
|
10135
|
+
components_ex_table
|
|
9231
10136
|
]
|
|
9232
10137
|
|
|
9233
10138
|
// 定义 install 方法,Vue.use() 会自动调用
|
|
@@ -9306,9 +10211,11 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
9306
10211
|
XtConfigProvider: components_xt_config_provider,
|
|
9307
10212
|
XtText: components_xt_text,
|
|
9308
10213
|
XtGridBox: components_xt_grid_box,
|
|
10214
|
+
XtGridItem: components_xt_grid_item,
|
|
9309
10215
|
XtDatePicker: components_xt_date_picker,
|
|
9310
10216
|
ExButton: components_ex_button,
|
|
9311
|
-
ExCard: components_ex_card
|
|
10217
|
+
ExCard: components_ex_card,
|
|
10218
|
+
ExTable: components_ex_table
|
|
9312
10219
|
});
|
|
9313
10220
|
|
|
9314
10221
|
// ExChart 组件按需导出(使用时需自行安装 echarts 依赖)
|