xt-element-ui 1.1.4 → 1.1.6
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.umd.js
CHANGED
|
@@ -317,6 +317,17 @@ 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
|
+
|
|
320
331
|
/***/ }),
|
|
321
332
|
|
|
322
333
|
/***/ "0d3e":
|
|
@@ -2392,6 +2403,13 @@ module.exports = {
|
|
|
2392
2403
|
}
|
|
2393
2404
|
|
|
2394
2405
|
|
|
2406
|
+
/***/ }),
|
|
2407
|
+
|
|
2408
|
+
/***/ "5385":
|
|
2409
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2410
|
+
|
|
2411
|
+
// extracted by mini-css-extract-plugin
|
|
2412
|
+
|
|
2395
2413
|
/***/ }),
|
|
2396
2414
|
|
|
2397
2415
|
/***/ "5416":
|
|
@@ -2455,17 +2473,6 @@ module.exports = function getTimezoneOffsetInMilliseconds (dirtyDate) {
|
|
|
2455
2473
|
}
|
|
2456
2474
|
|
|
2457
2475
|
|
|
2458
|
-
/***/ }),
|
|
2459
|
-
|
|
2460
|
-
/***/ "5786":
|
|
2461
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2462
|
-
|
|
2463
|
-
"use strict";
|
|
2464
|
-
/* 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");
|
|
2465
|
-
/* 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__);
|
|
2466
|
-
/* unused harmony reexport * */
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
2476
|
/***/ }),
|
|
2470
2477
|
|
|
2471
2478
|
/***/ "580f":
|
|
@@ -3603,6 +3610,13 @@ function addWeeks (dirtyDate, dirtyAmount) {
|
|
|
3603
3610
|
module.exports = addWeeks
|
|
3604
3611
|
|
|
3605
3612
|
|
|
3613
|
+
/***/ }),
|
|
3614
|
+
|
|
3615
|
+
/***/ "7de5":
|
|
3616
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3617
|
+
|
|
3618
|
+
// extracted by mini-css-extract-plugin
|
|
3619
|
+
|
|
3606
3620
|
/***/ }),
|
|
3607
3621
|
|
|
3608
3622
|
/***/ "7eea":
|
|
@@ -6293,13 +6307,6 @@ function subQuarters (dirtyDate, dirtyAmount) {
|
|
|
6293
6307
|
module.exports = subQuarters
|
|
6294
6308
|
|
|
6295
6309
|
|
|
6296
|
-
/***/ }),
|
|
6297
|
-
|
|
6298
|
-
/***/ "d4e0":
|
|
6299
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
6300
|
-
|
|
6301
|
-
// extracted by mini-css-extract-plugin
|
|
6302
|
-
|
|
6303
6310
|
/***/ }),
|
|
6304
6311
|
|
|
6305
6312
|
/***/ "d67a":
|
|
@@ -6341,6 +6348,17 @@ function endOfMonth (dirtyDate) {
|
|
|
6341
6348
|
module.exports = endOfMonth
|
|
6342
6349
|
|
|
6343
6350
|
|
|
6351
|
+
/***/ }),
|
|
6352
|
+
|
|
6353
|
+
/***/ "d728":
|
|
6354
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6355
|
+
|
|
6356
|
+
"use strict";
|
|
6357
|
+
/* 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");
|
|
6358
|
+
/* 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__);
|
|
6359
|
+
/* unused harmony reexport * */
|
|
6360
|
+
|
|
6361
|
+
|
|
6344
6362
|
/***/ }),
|
|
6345
6363
|
|
|
6346
6364
|
/***/ "d81e":
|
|
@@ -8200,17 +8218,18 @@ var xt_config_provider_component = Object(componentNormalizer["a" /* default */]
|
|
|
8200
8218
|
|
|
8201
8219
|
/* harmony default export */ var components_xt_config_provider = (xt_config_provider);
|
|
8202
8220
|
|
|
8203
|
-
// 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=
|
|
8204
|
-
var
|
|
8221
|
+
// 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
|
|
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:[
|
|
8205
8223
|
_vm.type ? 'xt-text--' + _vm.type : '',
|
|
8224
|
+
'xt-text--' + _vm.size,
|
|
8206
8225
|
{ 'xt-text--bold': _vm.bold },
|
|
8207
8226
|
{ 'xt-text--money': _vm.money }
|
|
8208
8227
|
],style:(_vm.customStyle)},[_vm._t("default",function(){return [(_vm.money && _vm.displayValue !== undefined)?[_vm._v(_vm._s(_vm.displayValue))]:_vm._e()]})],2)
|
|
8209
8228
|
}
|
|
8210
|
-
var
|
|
8229
|
+
var xt_textvue_type_template_id_2b4328b0_staticRenderFns = []
|
|
8211
8230
|
|
|
8212
8231
|
|
|
8213
|
-
// CONCATENATED MODULE: ./src/components/xt-text/index.vue?vue&type=template&id=
|
|
8232
|
+
// CONCATENATED MODULE: ./src/components/xt-text/index.vue?vue&type=template&id=2b4328b0
|
|
8214
8233
|
|
|
8215
8234
|
// 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
|
|
8216
8235
|
|
|
@@ -8226,6 +8245,11 @@ var xt_textvue_type_template_id_06592e32_staticRenderFns = []
|
|
|
8226
8245
|
default: '',
|
|
8227
8246
|
validator: (val) => ['', 'primary', 'success', 'warning', 'danger'].includes(val)
|
|
8228
8247
|
},
|
|
8248
|
+
size: {
|
|
8249
|
+
type: String,
|
|
8250
|
+
default: 'base',
|
|
8251
|
+
validator: (val) => ['extra-large', 'large', 'medium', 'base', 'small', 'extra-small'].includes(val)
|
|
8252
|
+
},
|
|
8229
8253
|
bold: {
|
|
8230
8254
|
type: Boolean,
|
|
8231
8255
|
default: false
|
|
@@ -8328,8 +8352,8 @@ var xt_textvue_type_template_id_06592e32_staticRenderFns = []
|
|
|
8328
8352
|
|
|
8329
8353
|
var xt_text_component = Object(componentNormalizer["a" /* default */])(
|
|
8330
8354
|
components_xt_textvue_type_script_lang_js,
|
|
8331
|
-
|
|
8332
|
-
|
|
8355
|
+
xt_textvue_type_template_id_2b4328b0_render,
|
|
8356
|
+
xt_textvue_type_template_id_2b4328b0_staticRenderFns,
|
|
8333
8357
|
false,
|
|
8334
8358
|
null,
|
|
8335
8359
|
null,
|
|
@@ -8341,63 +8365,158 @@ var xt_text_component = Object(componentNormalizer["a" /* default */])(
|
|
|
8341
8365
|
// CONCATENATED MODULE: ./src/components/xt-text/index.js
|
|
8342
8366
|
|
|
8343
8367
|
/* harmony default export */ var components_xt_text = (xt_text);
|
|
8344
|
-
// 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=
|
|
8345
|
-
var
|
|
8368
|
+
// 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
|
|
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)
|
|
8346
8370
|
}
|
|
8347
|
-
var
|
|
8371
|
+
var xt_grid_boxvue_type_template_id_67e197c4_staticRenderFns = []
|
|
8348
8372
|
|
|
8349
8373
|
|
|
8350
|
-
// CONCATENATED MODULE: ./src/components/xt-grid-box/index.vue?vue&type=template&id=
|
|
8374
|
+
// CONCATENATED MODULE: ./src/components/xt-grid-box/index.vue?vue&type=template&id=67e197c4
|
|
8351
8375
|
|
|
8352
8376
|
// 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
|
|
8353
8377
|
|
|
8354
8378
|
/* harmony default export */ var xt_grid_boxvue_type_script_lang_js = ({
|
|
8355
8379
|
name: "XtGridBox",
|
|
8356
8380
|
props: {
|
|
8381
|
+
// 列配置
|
|
8357
8382
|
columns: {
|
|
8358
|
-
type: [String, Array
|
|
8383
|
+
type: [String, Array, Number],
|
|
8359
8384
|
default: "1fr"
|
|
8360
8385
|
},
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8386
|
+
// 行配置
|
|
8387
|
+
rows: {
|
|
8388
|
+
type: [String, Array],
|
|
8389
|
+
default: "auto"
|
|
8390
|
+
},
|
|
8391
|
+
// 间距(同时控制行列间距)
|
|
8392
|
+
gap: { type: String, default: "" },
|
|
8393
|
+
// 行间距
|
|
8394
|
+
rowGap: { type: String, default: "" },
|
|
8395
|
+
// 列间距
|
|
8396
|
+
colGap: { type: String, default: "" },
|
|
8397
|
+
// 排列方向
|
|
8398
|
+
flow: {
|
|
8399
|
+
type: String,
|
|
8400
|
+
default: "row",
|
|
8401
|
+
validator: (val) => ['row', 'column', 'row dense', 'column dense'].includes(val)
|
|
8402
|
+
},
|
|
8403
|
+
// 命名区域
|
|
8404
|
+
areas: { type: [String, Array], default: "" },
|
|
8405
|
+
// 子项对齐(place-items)
|
|
8406
|
+
align: {
|
|
8407
|
+
type: String,
|
|
8408
|
+
default: "stretch",
|
|
8409
|
+
validator: (val) => ['start', 'end', 'center', 'stretch', 'baseline'].includes(val)
|
|
8364
8410
|
},
|
|
8365
|
-
|
|
8411
|
+
// 内容对齐(place-content)
|
|
8412
|
+
justify: {
|
|
8413
|
+
type: String,
|
|
8414
|
+
default: "start",
|
|
8415
|
+
validator: (val) => ['start', 'end', 'center', 'space-between', 'space-around', 'space-evenly', 'stretch'].includes(val)
|
|
8416
|
+
},
|
|
8417
|
+
// 响应式配置 { sm: 2, md: 3, lg: 4 }
|
|
8418
|
+
responsive: { type: Object, default: () => ({}) },
|
|
8419
|
+
// 是否自动填充
|
|
8420
|
+
autoFlow: { type: String, default: "" }
|
|
8366
8421
|
},
|
|
8367
8422
|
computed: {
|
|
8368
8423
|
styleAttrs() {
|
|
8369
|
-
const
|
|
8370
|
-
|
|
8371
|
-
return this.gap ? {
|
|
8372
|
-
gridTemplateColumns,
|
|
8373
|
-
gridTemplateRows,
|
|
8374
|
-
gap: this.gap.toString().split(" ").map(_getGap).join(" ")
|
|
8375
|
-
} : {
|
|
8376
|
-
gridTemplateColumns,
|
|
8377
|
-
gridTemplateRows
|
|
8424
|
+
const styles = {
|
|
8425
|
+
display: "grid"
|
|
8378
8426
|
};
|
|
8427
|
+
|
|
8428
|
+
// 处理列配置
|
|
8429
|
+
if (typeof this.columns === 'number') {
|
|
8430
|
+
styles.gridTemplateColumns = `repeat(${this.columns}, 1fr)`;
|
|
8431
|
+
} else if (Array.isArray(this.columns)) {
|
|
8432
|
+
styles.gridTemplateColumns = this.columns.join(" ");
|
|
8433
|
+
} else {
|
|
8434
|
+
styles.gridTemplateColumns = this.columns;
|
|
8435
|
+
}
|
|
8436
|
+
|
|
8437
|
+
// 处理行配置
|
|
8438
|
+
if (Array.isArray(this.rows)) {
|
|
8439
|
+
styles.gridTemplateRows = this.rows.join(" ");
|
|
8440
|
+
} else {
|
|
8441
|
+
styles.gridTemplateRows = this.rows;
|
|
8442
|
+
}
|
|
8443
|
+
|
|
8444
|
+
// 处理间距
|
|
8445
|
+
if (this.gap) {
|
|
8446
|
+
styles.gap = this.gap;
|
|
8447
|
+
} else {
|
|
8448
|
+
if (this.rowGap) styles.rowGap = this.rowGap;
|
|
8449
|
+
if (this.colGap) styles.columnGap = this.colGap;
|
|
8450
|
+
}
|
|
8451
|
+
|
|
8452
|
+
// 处理排列方向
|
|
8453
|
+
if (this.flow) {
|
|
8454
|
+
styles.gridAutoFlow = this.flow;
|
|
8455
|
+
}
|
|
8456
|
+
|
|
8457
|
+
// 处理命名区域
|
|
8458
|
+
if (this.areas) {
|
|
8459
|
+
if (Array.isArray(this.areas)) {
|
|
8460
|
+
styles.gridTemplateAreas = this.areas.map(row => `"${row}"`).join(" ");
|
|
8461
|
+
} else {
|
|
8462
|
+
styles.gridTemplateAreas = this.areas;
|
|
8463
|
+
}
|
|
8464
|
+
}
|
|
8465
|
+
|
|
8466
|
+
// 处理子项对齐
|
|
8467
|
+
if (this.align) {
|
|
8468
|
+
styles.placeItems = this.align;
|
|
8469
|
+
}
|
|
8470
|
+
|
|
8471
|
+
// 处理内容对齐
|
|
8472
|
+
if (this.justify) {
|
|
8473
|
+
styles.placeContent = this.justify;
|
|
8474
|
+
}
|
|
8475
|
+
|
|
8476
|
+
// 处理响应式断点
|
|
8477
|
+
if (Object.keys(this.responsive).length > 0) {
|
|
8478
|
+
this.addResponsiveStyles(styles);
|
|
8479
|
+
}
|
|
8480
|
+
|
|
8481
|
+
return styles;
|
|
8482
|
+
}
|
|
8483
|
+
},
|
|
8484
|
+
methods: {
|
|
8485
|
+
addResponsiveStyles(styles) {
|
|
8486
|
+
// 响应式断点映射
|
|
8487
|
+
const breakpoints = {
|
|
8488
|
+
xs: '(max-width: 575px)',
|
|
8489
|
+
sm: '(min-width: 576px)',
|
|
8490
|
+
md: '(min-width: 768px)',
|
|
8491
|
+
lg: '(min-width: 992px)',
|
|
8492
|
+
xl: '(min-width: 1200px)'
|
|
8493
|
+
};
|
|
8494
|
+
|
|
8495
|
+
Object.entries(this.responsive).forEach(([key, value]) => {
|
|
8496
|
+
if (breakpoints[key]) {
|
|
8497
|
+
const mediaQuery = `@media ${breakpoints[key]}`;
|
|
8498
|
+
// 注意:内联样式不支持媒体查询,这里预留接口
|
|
8499
|
+
// 实际响应式需要通过 CSS 类或其他方式实现
|
|
8500
|
+
}
|
|
8501
|
+
});
|
|
8379
8502
|
}
|
|
8380
8503
|
}
|
|
8381
8504
|
});
|
|
8382
8505
|
|
|
8383
8506
|
// CONCATENATED MODULE: ./src/components/xt-grid-box/index.vue?vue&type=script&lang=js
|
|
8384
8507
|
/* harmony default export */ var components_xt_grid_boxvue_type_script_lang_js = (xt_grid_boxvue_type_script_lang_js);
|
|
8385
|
-
// EXTERNAL MODULE: ./src/components/xt-grid-box/index.vue?vue&type=style&index=0&id=42b6cd2c&prod&lang=scss
|
|
8386
|
-
var xt_grid_boxvue_type_style_index_0_id_42b6cd2c_prod_lang_scss = __webpack_require__("5786");
|
|
8387
|
-
|
|
8388
8508
|
// CONCATENATED MODULE: ./src/components/xt-grid-box/index.vue
|
|
8389
8509
|
|
|
8390
8510
|
|
|
8391
8511
|
|
|
8392
8512
|
|
|
8393
8513
|
|
|
8394
|
-
|
|
8395
8514
|
/* normalize component */
|
|
8396
8515
|
|
|
8397
8516
|
var xt_grid_box_component = Object(componentNormalizer["a" /* default */])(
|
|
8398
8517
|
components_xt_grid_boxvue_type_script_lang_js,
|
|
8399
|
-
|
|
8400
|
-
|
|
8518
|
+
xt_grid_boxvue_type_template_id_67e197c4_render,
|
|
8519
|
+
xt_grid_boxvue_type_template_id_67e197c4_staticRenderFns,
|
|
8401
8520
|
false,
|
|
8402
8521
|
null,
|
|
8403
8522
|
null,
|
|
@@ -8410,6 +8529,139 @@ var xt_grid_box_component = Object(componentNormalizer["a" /* default */])(
|
|
|
8410
8529
|
|
|
8411
8530
|
/* harmony default export */ var components_xt_grid_box = (xt_grid_box);
|
|
8412
8531
|
|
|
8532
|
+
// 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
|
|
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
|
+
}
|
|
8535
|
+
var xt_grid_itemvue_type_template_id_5318efc6_scoped_true_staticRenderFns = []
|
|
8536
|
+
|
|
8537
|
+
|
|
8538
|
+
// CONCATENATED MODULE: ./src/components/xt-grid-item/index.vue?vue&type=template&id=5318efc6&scoped=true
|
|
8539
|
+
|
|
8540
|
+
// 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
|
|
8541
|
+
|
|
8542
|
+
/* harmony default export */ var xt_grid_itemvue_type_script_lang_js = ({
|
|
8543
|
+
name: "XtGridItem",
|
|
8544
|
+
props: {
|
|
8545
|
+
// 跨列数
|
|
8546
|
+
span: {
|
|
8547
|
+
type: Number,
|
|
8548
|
+
default: 1,
|
|
8549
|
+
validator: (val) => val > 0
|
|
8550
|
+
},
|
|
8551
|
+
// 跨行数
|
|
8552
|
+
rowSpan: {
|
|
8553
|
+
type: Number,
|
|
8554
|
+
default: 1,
|
|
8555
|
+
validator: (val) => val > 0
|
|
8556
|
+
},
|
|
8557
|
+
// 起始列
|
|
8558
|
+
start: {
|
|
8559
|
+
type: Number,
|
|
8560
|
+
default: 0,
|
|
8561
|
+
validator: (val) => val >= 0
|
|
8562
|
+
},
|
|
8563
|
+
// 起始行
|
|
8564
|
+
rowStart: {
|
|
8565
|
+
type: Number,
|
|
8566
|
+
default: 0,
|
|
8567
|
+
validator: (val) => val >= 0
|
|
8568
|
+
},
|
|
8569
|
+
// 命名区域
|
|
8570
|
+
area: {
|
|
8571
|
+
type: String,
|
|
8572
|
+
default: ""
|
|
8573
|
+
},
|
|
8574
|
+
// 对齐方式(justify-self)
|
|
8575
|
+
justifySelf: {
|
|
8576
|
+
type: String,
|
|
8577
|
+
default: "auto",
|
|
8578
|
+
validator: (val) => ['auto', 'start', 'end', 'center', 'stretch'].includes(val)
|
|
8579
|
+
},
|
|
8580
|
+
// 对齐方式(align-self)
|
|
8581
|
+
alignSelf: {
|
|
8582
|
+
type: String,
|
|
8583
|
+
default: "auto",
|
|
8584
|
+
validator: (val) => ['auto', 'start', 'end', 'center', 'stretch', 'baseline'].includes(val)
|
|
8585
|
+
},
|
|
8586
|
+
// 自定义样式类
|
|
8587
|
+
customClass: {
|
|
8588
|
+
type: String,
|
|
8589
|
+
default: ""
|
|
8590
|
+
}
|
|
8591
|
+
},
|
|
8592
|
+
computed: {
|
|
8593
|
+
styleAttrs() {
|
|
8594
|
+
const styles = {};
|
|
8595
|
+
|
|
8596
|
+
// 处理跨列
|
|
8597
|
+
if (this.span > 1) {
|
|
8598
|
+
styles.gridColumnEnd = `span ${this.span}`;
|
|
8599
|
+
}
|
|
8600
|
+
|
|
8601
|
+
// 处理跨行
|
|
8602
|
+
if (this.rowSpan > 1) {
|
|
8603
|
+
styles.gridRowEnd = `span ${this.rowSpan}`;
|
|
8604
|
+
}
|
|
8605
|
+
|
|
8606
|
+
// 处理起始列
|
|
8607
|
+
if (this.start > 0) {
|
|
8608
|
+
styles.gridColumnStart = this.start;
|
|
8609
|
+
}
|
|
8610
|
+
|
|
8611
|
+
// 处理起始行
|
|
8612
|
+
if (this.rowStart > 0) {
|
|
8613
|
+
styles.gridRowStart = this.rowStart;
|
|
8614
|
+
}
|
|
8615
|
+
|
|
8616
|
+
// 处理命名区域
|
|
8617
|
+
if (this.area) {
|
|
8618
|
+
styles.gridArea = this.area;
|
|
8619
|
+
}
|
|
8620
|
+
|
|
8621
|
+
// 处理 justify-self
|
|
8622
|
+
if (this.justifySelf && this.justifySelf !== 'auto') {
|
|
8623
|
+
styles.justifySelf = this.justifySelf;
|
|
8624
|
+
}
|
|
8625
|
+
|
|
8626
|
+
// 处理 align-self
|
|
8627
|
+
if (this.alignSelf && this.alignSelf !== 'auto') {
|
|
8628
|
+
styles.alignSelf = this.alignSelf;
|
|
8629
|
+
}
|
|
8630
|
+
|
|
8631
|
+
return styles;
|
|
8632
|
+
}
|
|
8633
|
+
}
|
|
8634
|
+
});
|
|
8635
|
+
|
|
8636
|
+
// CONCATENATED MODULE: ./src/components/xt-grid-item/index.vue?vue&type=script&lang=js
|
|
8637
|
+
/* harmony default export */ var components_xt_grid_itemvue_type_script_lang_js = (xt_grid_itemvue_type_script_lang_js);
|
|
8638
|
+
// EXTERNAL MODULE: ./src/components/xt-grid-item/index.vue?vue&type=style&index=0&id=5318efc6&prod&lang=scss&scoped=true
|
|
8639
|
+
var xt_grid_itemvue_type_style_index_0_id_5318efc6_prod_lang_scss_scoped_true = __webpack_require__("d728");
|
|
8640
|
+
|
|
8641
|
+
// CONCATENATED MODULE: ./src/components/xt-grid-item/index.vue
|
|
8642
|
+
|
|
8643
|
+
|
|
8644
|
+
|
|
8645
|
+
|
|
8646
|
+
|
|
8647
|
+
|
|
8648
|
+
/* normalize component */
|
|
8649
|
+
|
|
8650
|
+
var xt_grid_item_component = Object(componentNormalizer["a" /* default */])(
|
|
8651
|
+
components_xt_grid_itemvue_type_script_lang_js,
|
|
8652
|
+
xt_grid_itemvue_type_template_id_5318efc6_scoped_true_render,
|
|
8653
|
+
xt_grid_itemvue_type_template_id_5318efc6_scoped_true_staticRenderFns,
|
|
8654
|
+
false,
|
|
8655
|
+
null,
|
|
8656
|
+
"5318efc6",
|
|
8657
|
+
null
|
|
8658
|
+
|
|
8659
|
+
)
|
|
8660
|
+
|
|
8661
|
+
/* harmony default export */ var xt_grid_item = (xt_grid_item_component.exports);
|
|
8662
|
+
// CONCATENATED MODULE: ./src/components/xt-grid-item/index.js
|
|
8663
|
+
|
|
8664
|
+
/* harmony default export */ var components_xt_grid_item = (xt_grid_item);
|
|
8413
8665
|
// 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
|
|
8414
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)
|
|
8415
8667
|
}
|
|
@@ -9052,6 +9304,655 @@ ex_card.install = function (Vue) {
|
|
|
9052
9304
|
|
|
9053
9305
|
/* harmony default export */ var components_ex_card = (ex_card);
|
|
9054
9306
|
|
|
9307
|
+
// 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
|
|
9308
|
+
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)
|
|
9309
|
+
}
|
|
9310
|
+
var ex_tablevue_type_template_id_209e311e_scoped_true_staticRenderFns = []
|
|
9311
|
+
|
|
9312
|
+
|
|
9313
|
+
// CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=template&id=209e311e&scoped=true
|
|
9314
|
+
|
|
9315
|
+
// 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
|
|
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 = []
|
|
9319
|
+
|
|
9320
|
+
|
|
9321
|
+
// CONCATENATED MODULE: ./src/components/ex-table/ExColumn.vue?vue&type=template&id=57358dae
|
|
9322
|
+
|
|
9323
|
+
// 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
|
|
9324
|
+
|
|
9325
|
+
/* harmony default export */ var ExColumnvue_type_script_lang_js = ({
|
|
9326
|
+
name: "ExColumn",
|
|
9327
|
+
props: {
|
|
9328
|
+
column: {
|
|
9329
|
+
type: Object,
|
|
9330
|
+
default: () => {
|
|
9331
|
+
return undefined;
|
|
9332
|
+
},
|
|
9333
|
+
required: true
|
|
9334
|
+
}
|
|
9335
|
+
},
|
|
9336
|
+
methods: {
|
|
9337
|
+
setAttrs(params) {
|
|
9338
|
+
const { ...options } = params;
|
|
9339
|
+
if (!options.align) {
|
|
9340
|
+
options.align = "center";
|
|
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
|
+
});
|
|
9399
|
+
|
|
9400
|
+
// CONCATENATED MODULE: ./src/components/ex-table/ExCell.vue?vue&type=script&lang=js
|
|
9401
|
+
/* harmony default export */ var ex_table_ExCellvue_type_script_lang_js = (ExCellvue_type_script_lang_js);
|
|
9402
|
+
// CONCATENATED MODULE: ./src/components/ex-table/ExCell.vue
|
|
9403
|
+
var ExCell_render, ExCell_staticRenderFns
|
|
9404
|
+
|
|
9405
|
+
|
|
9406
|
+
|
|
9407
|
+
|
|
9408
|
+
/* normalize component */
|
|
9409
|
+
|
|
9410
|
+
var ExCell_component = Object(componentNormalizer["a" /* default */])(
|
|
9411
|
+
ex_table_ExCellvue_type_script_lang_js,
|
|
9412
|
+
ExCell_render,
|
|
9413
|
+
ExCell_staticRenderFns,
|
|
9414
|
+
false,
|
|
9415
|
+
null,
|
|
9416
|
+
null,
|
|
9417
|
+
null
|
|
9418
|
+
|
|
9419
|
+
)
|
|
9420
|
+
|
|
9421
|
+
/* harmony default export */ var ExCell = (ExCell_component.exports);
|
|
9422
|
+
// 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
|
+
|
|
9424
|
+
|
|
9425
|
+
|
|
9426
|
+
|
|
9427
|
+
|
|
9428
|
+
/* harmony default export */ var ex_tablevue_type_script_lang_js = ({
|
|
9429
|
+
name: "ExTable",
|
|
9430
|
+
components: {
|
|
9431
|
+
ExCell: ExCell,
|
|
9432
|
+
ExColumn: ExColumn,
|
|
9433
|
+
ExText: components_xt_text,
|
|
9434
|
+
XtFlexBox: components_xt_flex_box
|
|
9435
|
+
},
|
|
9436
|
+
inheritAttrs: false,
|
|
9437
|
+
props: {
|
|
9438
|
+
tbId: {
|
|
9439
|
+
type: [Number, String],
|
|
9440
|
+
default: ""
|
|
9441
|
+
},
|
|
9442
|
+
tableData: {
|
|
9443
|
+
type: Array,
|
|
9444
|
+
default() {
|
|
9445
|
+
return [];
|
|
9446
|
+
}
|
|
9447
|
+
},
|
|
9448
|
+
height: {
|
|
9449
|
+
type: [Number, String, Function],
|
|
9450
|
+
default: () => null
|
|
9451
|
+
},
|
|
9452
|
+
elementLoadingText: {
|
|
9453
|
+
type: String,
|
|
9454
|
+
default: "拼命加载中"
|
|
9455
|
+
},
|
|
9456
|
+
headerCellStyle: {
|
|
9457
|
+
type: Object,
|
|
9458
|
+
default: () => {
|
|
9459
|
+
return {
|
|
9460
|
+
background: "#F8F8F9",
|
|
9461
|
+
color: "#606266"
|
|
9462
|
+
};
|
|
9463
|
+
}
|
|
9464
|
+
},
|
|
9465
|
+
loading: {
|
|
9466
|
+
type: Boolean,
|
|
9467
|
+
default: false
|
|
9468
|
+
},
|
|
9469
|
+
pageSizes: {
|
|
9470
|
+
type: Array,
|
|
9471
|
+
default: () => [20, 50, 100, 200]
|
|
9472
|
+
},
|
|
9473
|
+
pagination: {
|
|
9474
|
+
type: Object,
|
|
9475
|
+
default: null
|
|
9476
|
+
},
|
|
9477
|
+
total: {
|
|
9478
|
+
type: Number,
|
|
9479
|
+
default: 0
|
|
9480
|
+
},
|
|
9481
|
+
columns: {
|
|
9482
|
+
type: Array,
|
|
9483
|
+
default() {
|
|
9484
|
+
return [];
|
|
9485
|
+
}
|
|
9486
|
+
},
|
|
9487
|
+
insertColumns: {
|
|
9488
|
+
type: Array,
|
|
9489
|
+
default() {
|
|
9490
|
+
return [];
|
|
9491
|
+
}
|
|
9492
|
+
},
|
|
9493
|
+
selectable: {
|
|
9494
|
+
type: Function,
|
|
9495
|
+
default() {
|
|
9496
|
+
return () => true;
|
|
9497
|
+
}
|
|
9498
|
+
},
|
|
9499
|
+
selection: {
|
|
9500
|
+
type: Boolean,
|
|
9501
|
+
default: false
|
|
9502
|
+
},
|
|
9503
|
+
showIndex: {
|
|
9504
|
+
type: Boolean,
|
|
9505
|
+
default: true
|
|
9506
|
+
},
|
|
9507
|
+
showRealIndex: {
|
|
9508
|
+
type: Boolean,
|
|
9509
|
+
default: true
|
|
9510
|
+
},
|
|
9511
|
+
expand: {
|
|
9512
|
+
type: Boolean,
|
|
9513
|
+
default: false
|
|
9514
|
+
},
|
|
9515
|
+
showColumsFilter: {
|
|
9516
|
+
type: Boolean,
|
|
9517
|
+
default: false
|
|
9518
|
+
},
|
|
9519
|
+
defaultColumnsFixed: {
|
|
9520
|
+
type: Boolean,
|
|
9521
|
+
default: true
|
|
9522
|
+
},
|
|
9523
|
+
autoSetHeight: {
|
|
9524
|
+
type: Boolean,
|
|
9525
|
+
default: true
|
|
9526
|
+
},
|
|
9527
|
+
simplePage: {
|
|
9528
|
+
type: Boolean,
|
|
9529
|
+
default: false
|
|
9530
|
+
},
|
|
9531
|
+
border: {
|
|
9532
|
+
type: Boolean,
|
|
9533
|
+
default: true
|
|
9534
|
+
},
|
|
9535
|
+
indexRender: Function,
|
|
9536
|
+
spanFields: {
|
|
9537
|
+
type: Object
|
|
9538
|
+
},
|
|
9539
|
+
groupColumns: {
|
|
9540
|
+
type: Array,
|
|
9541
|
+
default() {
|
|
9542
|
+
return [];
|
|
9543
|
+
}
|
|
9544
|
+
},
|
|
9545
|
+
title: {},
|
|
9546
|
+
emptSubTitle: {},
|
|
9547
|
+
toolExport: {
|
|
9548
|
+
type: Function,
|
|
9549
|
+
default: null
|
|
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 [];
|
|
9576
|
+
}
|
|
9577
|
+
}
|
|
9578
|
+
},
|
|
9579
|
+
watch: {
|
|
9580
|
+
height(val) {
|
|
9581
|
+
this.changeTableHight();
|
|
9582
|
+
},
|
|
9583
|
+
insertColumns: {
|
|
9584
|
+
deep: true,
|
|
9585
|
+
handler(val) {
|
|
9586
|
+
this.getTableColumns().then(list => {
|
|
9587
|
+
this.diyColumns = list;
|
|
9588
|
+
const _insertColumns = this.insertColumns;
|
|
9589
|
+
_insertColumns.forEach(custom => {
|
|
9590
|
+
list.splice(custom.insertIndex, 0, {
|
|
9591
|
+
type: "custom",
|
|
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
|
+
}
|
|
9600
|
+
},
|
|
9601
|
+
columns: {
|
|
9602
|
+
deep: true,
|
|
9603
|
+
immediate: true,
|
|
9604
|
+
handler(val) {
|
|
9605
|
+
this.getTableColumns().then(list => {
|
|
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
|
+
}
|
|
9612
|
+
},
|
|
9613
|
+
tableData: {
|
|
9614
|
+
handler(val) {
|
|
9615
|
+
this.$nextTick(() => {
|
|
9616
|
+
this.changeTableHight();
|
|
9617
|
+
this.hasLoadData = true;
|
|
9618
|
+
});
|
|
9619
|
+
}
|
|
9620
|
+
}
|
|
9621
|
+
},
|
|
9622
|
+
mounted() {
|
|
9623
|
+
this.$nextTick(() => {
|
|
9624
|
+
this.changeTableHight();
|
|
9625
|
+
if (!this.height) {
|
|
9626
|
+
window.onresize = () => {
|
|
9627
|
+
this.changeTableHight();
|
|
9628
|
+
};
|
|
9629
|
+
}
|
|
9630
|
+
});
|
|
9631
|
+
},
|
|
9632
|
+
activated() {
|
|
9633
|
+
this.doLayout();
|
|
9634
|
+
},
|
|
9635
|
+
beforeDestroy() {
|
|
9636
|
+
document.removeEventListener("click", this.handleDocumentClick);
|
|
9637
|
+
},
|
|
9638
|
+
methods: {
|
|
9639
|
+
realIndexRender(index) {
|
|
9640
|
+
if (this.pagination) {
|
|
9641
|
+
return this.pagination.PageSize * (this.pagination.PageNum - 1) + index + 1;
|
|
9642
|
+
}
|
|
9643
|
+
return index + 1;
|
|
9644
|
+
},
|
|
9645
|
+
updateCheckColumns(columnsData) {
|
|
9646
|
+
const checkArr = [];
|
|
9647
|
+
columnsData.forEach(item => {
|
|
9648
|
+
const { prop, show } = item;
|
|
9649
|
+
if (prop) {
|
|
9650
|
+
const isHidden = (show !== undefined) && !show;
|
|
9651
|
+
!isHidden && checkArr.push(prop);
|
|
9652
|
+
}
|
|
9653
|
+
});
|
|
9654
|
+
return checkArr;
|
|
9655
|
+
},
|
|
9656
|
+
getTableColumns() {
|
|
9657
|
+
const _columns = [];
|
|
9658
|
+
return new Promise((resolve, reject) => {
|
|
9659
|
+
if (!this.hasLoad && this.tbId) {
|
|
9660
|
+
resolve(this.columns);
|
|
9661
|
+
this.$emit("update:showColumsFilter", false);
|
|
9662
|
+
} else {
|
|
9663
|
+
resolve(this.columns);
|
|
9664
|
+
this.$emit("update:showColumsFilter", false);
|
|
9665
|
+
}
|
|
9666
|
+
});
|
|
9667
|
+
},
|
|
9668
|
+
handleDropVisible() {
|
|
9669
|
+
this.dropvisible = !this.dropvisible;
|
|
9670
|
+
if (this.dropvisible) {
|
|
9671
|
+
document.addEventListener("click", this.handleDocumentClick);
|
|
9672
|
+
} else {
|
|
9673
|
+
document.removeEventListener("click", this.handleDocumentClick);
|
|
9674
|
+
}
|
|
9675
|
+
},
|
|
9676
|
+
handleDocumentClick(event) {
|
|
9677
|
+
const popoverEl = document.querySelector(".filter-tool");
|
|
9678
|
+
if (!popoverEl.contains(event.target)) {
|
|
9679
|
+
this.dropvisible = false;
|
|
9680
|
+
document.removeEventListener("click", this.handleDocumentClick);
|
|
9681
|
+
}
|
|
9682
|
+
},
|
|
9683
|
+
handleToggle(show, item) {
|
|
9684
|
+
if (this.checkedColumns.length === 0) {
|
|
9685
|
+
this.$message.warning("至少选择一列显示!");
|
|
9686
|
+
return;
|
|
9687
|
+
}
|
|
9688
|
+
this.$emit("update:loading", true);
|
|
9689
|
+
item.show = show;
|
|
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
|
+
});
|
|
9697
|
+
},
|
|
9698
|
+
doLayout() {
|
|
9699
|
+
this.$refs.ExtendTable && this.$refs.ExtendTable.doLayout();
|
|
9700
|
+
},
|
|
9701
|
+
getAttrs() {
|
|
9702
|
+
return {
|
|
9703
|
+
height: this.autoSetHeight ? this.inTableHeight : undefined,
|
|
9704
|
+
border: this.border,
|
|
9705
|
+
stripe: true,
|
|
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
|
+
};
|
|
9712
|
+
},
|
|
9713
|
+
handleSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
9714
|
+
if (this.spanFields) {
|
|
9715
|
+
const field = this.spanFields[columnIndex];
|
|
9716
|
+
if (field && row[`_${field}_start`]) {
|
|
9717
|
+
return {
|
|
9718
|
+
rowspan: row[`_${field}_span`],
|
|
9719
|
+
colspan: 1
|
|
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
|
+
}
|
|
9736
|
+
}
|
|
9737
|
+
return { rowspan: 1, colspan: 1 };
|
|
9738
|
+
}
|
|
9739
|
+
},
|
|
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
|
+
|
|
9753
|
+
for (let i = 0; i < rowCount; i++) {
|
|
9754
|
+
spans[i] = [];
|
|
9755
|
+
for (let j = 0; j < this.groupColumns.length; j++) {
|
|
9756
|
+
spans[i][j] = { rowspan: 1, colspan: 1 };
|
|
9757
|
+
}
|
|
9758
|
+
}
|
|
9759
|
+
|
|
9760
|
+
for (let level = 0; level < this.groupColumns.length; level++) {
|
|
9761
|
+
let pos = 0;
|
|
9762
|
+
while (pos < rowCount) {
|
|
9763
|
+
const startPos = pos;
|
|
9764
|
+
|
|
9765
|
+
let endPos = startPos;
|
|
9766
|
+
const currentValue = this.tableData[startPos][this.groupColumns[level].prop];
|
|
9767
|
+
|
|
9768
|
+
let sameParent = true;
|
|
9769
|
+
|
|
9770
|
+
for (let parentLevel = 0; parentLevel < level; parentLevel++) {
|
|
9771
|
+
if (this.tableData[startPos][this.groupColumns[parentLevel].prop] !== this.tableData[endPos][this.groupColumns[parentLevel].prop]) {
|
|
9772
|
+
sameParent = false;
|
|
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
|
+
}
|
|
9782
|
+
|
|
9783
|
+
if (endPos > startPos) {
|
|
9784
|
+
spans[startPos][level].rowspan = endPos - startPos + 1;
|
|
9785
|
+
for (let i = startPos + 1; i <= endPos; i++) {
|
|
9786
|
+
spans[i][level].rowspan = 0;
|
|
9787
|
+
spans[i][level].colspan = 0;
|
|
9788
|
+
}
|
|
9789
|
+
}
|
|
9790
|
+
|
|
9791
|
+
pos = endPos + 1;
|
|
9792
|
+
}
|
|
9793
|
+
}
|
|
9794
|
+
return spans;
|
|
9795
|
+
},
|
|
9796
|
+
checkParentSame(rowIndex1, rowIndex2, currentLevel) {
|
|
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;
|
|
9801
|
+
}
|
|
9802
|
+
}
|
|
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
|
+
|
|
9812
|
+
result.forEach((row, index) => {
|
|
9813
|
+
if (row[field] !== currentValue) {
|
|
9814
|
+
currentValue = row[field];
|
|
9815
|
+
startIndex = index;
|
|
9816
|
+
}
|
|
9817
|
+
|
|
9818
|
+
row[`_${field}_span`] = 0;
|
|
9819
|
+
row[`_${field}_start`] = false;
|
|
9820
|
+
|
|
9821
|
+
let endIndex = index;
|
|
9822
|
+
|
|
9823
|
+
while (endIndex + 1 < result.length && result[endIndex + 1][field] === currentValue) {
|
|
9824
|
+
endIndex++;
|
|
9825
|
+
}
|
|
9826
|
+
if (index === startIndex) {
|
|
9827
|
+
row[`_${field}_span`] = endIndex - startIndex + 1;
|
|
9828
|
+
row[`_${field}_start`] = true;
|
|
9829
|
+
}
|
|
9830
|
+
});
|
|
9831
|
+
}
|
|
9832
|
+
return result;
|
|
9833
|
+
},
|
|
9834
|
+
changeTableHight() {
|
|
9835
|
+
try {
|
|
9836
|
+
if (!this.autoSetHeight) return;
|
|
9837
|
+
if (this.height) {
|
|
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
|
+
}
|
|
9853
|
+
},
|
|
9854
|
+
setAttrs(params) {
|
|
9855
|
+
const { ...options } = params;
|
|
9856
|
+
if (!options.align) {
|
|
9857
|
+
options.align = "center";
|
|
9858
|
+
}
|
|
9859
|
+
if (options.showTip) {
|
|
9860
|
+
options.showOverflowTooltip = true;
|
|
9861
|
+
}
|
|
9862
|
+
return { ...options };
|
|
9863
|
+
},
|
|
9864
|
+
changeTableSort(column) {
|
|
9865
|
+
const sortingType = column.order;
|
|
9866
|
+
const sidx = sortingType ? column.prop : "";
|
|
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);
|
|
9874
|
+
},
|
|
9875
|
+
getSelection() {
|
|
9876
|
+
return this.$refs.ExtendTable.store.states.selection;
|
|
9877
|
+
},
|
|
9878
|
+
clearSelection() {
|
|
9879
|
+
this.$refs.ExtendTable.store.clearSelection();
|
|
9880
|
+
this.$refs.ExtendTable.store.updateAllSelected();
|
|
9881
|
+
return this;
|
|
9882
|
+
},
|
|
9883
|
+
toggleRowSelection(rows, selected) {
|
|
9884
|
+
this.$refs.ExtendTable.toggleRowSelection(rows, true);
|
|
9885
|
+
},
|
|
9886
|
+
toggleRowsSelection(rows, selected) {
|
|
9887
|
+
if (rows instanceof Array) {
|
|
9888
|
+
rows.forEach(row => {
|
|
9889
|
+
this.$refs.ExtendTable.store.toggleRowSelection(row, selected, true);
|
|
9890
|
+
});
|
|
9891
|
+
} else {
|
|
9892
|
+
this.$refs.ExtendTable.store.toggleRowSelection(rows, selected, true);
|
|
9893
|
+
}
|
|
9894
|
+
this.$refs.ExtendTable.store.updateAllSelected();
|
|
9895
|
+
},
|
|
9896
|
+
rowChange(newVal, oldVal) {
|
|
9897
|
+
this.$emit("currentChange", newVal, oldVal);
|
|
9898
|
+
},
|
|
9899
|
+
rowClick(row) {
|
|
9900
|
+
this.$emit("rowClick", row);
|
|
9901
|
+
},
|
|
9902
|
+
pageChange(val) {
|
|
9903
|
+
this.$emit("pageChange", val);
|
|
9904
|
+
},
|
|
9905
|
+
sizeChange(val) {
|
|
9906
|
+
this.$emit("sizeChange", val);
|
|
9907
|
+
},
|
|
9908
|
+
selectionChange(selections) {
|
|
9909
|
+
this.$emit("selectionChange", selections);
|
|
9910
|
+
},
|
|
9911
|
+
exportTableData() {
|
|
9912
|
+
const title = this.title;
|
|
9913
|
+
const list = [...this.tableData];
|
|
9914
|
+
|
|
9915
|
+
if (typeof this.toolExport === 'function') {
|
|
9916
|
+
try {
|
|
9917
|
+
this.toolExport(list, title, this.columns);
|
|
9918
|
+
} catch (error) {
|
|
9919
|
+
console.error('Export hook error:', error);
|
|
9920
|
+
}
|
|
9921
|
+
}
|
|
9922
|
+
}
|
|
9923
|
+
}
|
|
9924
|
+
});
|
|
9925
|
+
|
|
9926
|
+
// CONCATENATED MODULE: ./src/components/ex-table/index.vue?vue&type=script&lang=js
|
|
9927
|
+
/* 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=209e311e&prod&lang=scss&scoped=true
|
|
9929
|
+
var ex_tablevue_type_style_index_0_id_209e311e_prod_lang_scss_scoped_true = __webpack_require__("0b58");
|
|
9930
|
+
|
|
9931
|
+
// CONCATENATED MODULE: ./src/components/ex-table/index.vue
|
|
9932
|
+
|
|
9933
|
+
|
|
9934
|
+
|
|
9935
|
+
|
|
9936
|
+
|
|
9937
|
+
|
|
9938
|
+
/* normalize component */
|
|
9939
|
+
|
|
9940
|
+
var ex_table_component = Object(componentNormalizer["a" /* default */])(
|
|
9941
|
+
components_ex_tablevue_type_script_lang_js,
|
|
9942
|
+
ex_tablevue_type_template_id_209e311e_scoped_true_render,
|
|
9943
|
+
ex_tablevue_type_template_id_209e311e_scoped_true_staticRenderFns,
|
|
9944
|
+
false,
|
|
9945
|
+
null,
|
|
9946
|
+
"209e311e",
|
|
9947
|
+
null
|
|
9948
|
+
|
|
9949
|
+
)
|
|
9950
|
+
|
|
9951
|
+
/* harmony default export */ var ex_table = (ex_table_component.exports);
|
|
9952
|
+
// CONCATENATED MODULE: ./src/components/ex-table/index.js
|
|
9953
|
+
|
|
9954
|
+
/* harmony default export */ var components_ex_table = (ex_table);
|
|
9955
|
+
|
|
9055
9956
|
// CONCATENATED MODULE: ./src/config/element-registry.js
|
|
9056
9957
|
/**
|
|
9057
9958
|
* XT-UI 组件注册配置文件
|
|
@@ -9063,8 +9964,8 @@ const existingExComponents = [
|
|
|
9063
9964
|
'Button', // ExButton 已存在
|
|
9064
9965
|
'Card', // ExCard 已存在
|
|
9065
9966
|
'Input', // XtInput 已存在(用户要求不自动注册)
|
|
9066
|
-
'Table', // ExTable 已存在(在
|
|
9067
|
-
'TableColumn', // ExColumn 已存在(在
|
|
9967
|
+
'Table', // ExTable 已存在(在 ex-table 目录中)
|
|
9968
|
+
'TableColumn', // ExColumn 已存在(在 ex-table 目录中)
|
|
9068
9969
|
'Chart' // ExChart 已存在
|
|
9069
9970
|
]
|
|
9070
9971
|
|
|
@@ -9218,8 +10119,10 @@ const { getConfig: src_getConfig, setConfig: src_setConfig, getTheme: src_getThe
|
|
|
9218
10119
|
|
|
9219
10120
|
|
|
9220
10121
|
|
|
10122
|
+
|
|
9221
10123
|
// ExChart 组件(基于 ECharts 封装)
|
|
9222
10124
|
|
|
10125
|
+
// ExTable 组件(基于 ElementUI Table 封装)
|
|
9223
10126
|
|
|
9224
10127
|
// 导入 Element UI 组件注册配置
|
|
9225
10128
|
|
|
@@ -9234,10 +10137,12 @@ const src_components = [
|
|
|
9234
10137
|
components_xt_config_provider,
|
|
9235
10138
|
components_xt_text,
|
|
9236
10139
|
components_xt_grid_box,
|
|
10140
|
+
components_xt_grid_item,
|
|
9237
10141
|
components_xt_date_picker,
|
|
9238
10142
|
components_ex_button,
|
|
9239
10143
|
components_ex_chart,
|
|
9240
|
-
components_ex_card
|
|
10144
|
+
components_ex_card,
|
|
10145
|
+
components_ex_table
|
|
9241
10146
|
]
|
|
9242
10147
|
|
|
9243
10148
|
// 定义 install 方法,Vue.use() 会自动调用
|
|
@@ -9316,9 +10221,11 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
9316
10221
|
XtConfigProvider: components_xt_config_provider,
|
|
9317
10222
|
XtText: components_xt_text,
|
|
9318
10223
|
XtGridBox: components_xt_grid_box,
|
|
10224
|
+
XtGridItem: components_xt_grid_item,
|
|
9319
10225
|
XtDatePicker: components_xt_date_picker,
|
|
9320
10226
|
ExButton: components_ex_button,
|
|
9321
|
-
ExCard: components_ex_card
|
|
10227
|
+
ExCard: components_ex_card,
|
|
10228
|
+
ExTable: components_ex_table
|
|
9322
10229
|
});
|
|
9323
10230
|
|
|
9324
10231
|
// ExChart 组件按需导出(使用时需自行安装 echarts 依赖)
|