@element-plus/nightly 0.0.20220104 → 0.0.20220105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +392 -408
  3. package/dist/index.full.min.js +8 -8
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +8 -8
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +392 -408
  8. package/es/components/index.mjs +1 -1
  9. package/es/components/skeleton/index.mjs +2 -2
  10. package/es/components/skeleton/src/skeleton.mjs +5 -24
  11. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  12. package/es/components/skeleton/src/skeleton.vue_vue_type_script_lang.mjs +1 -1
  13. package/es/components/skeleton/src/skeleton2.mjs +24 -5
  14. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  15. package/es/components/table/index.d.ts +9 -0
  16. package/es/components/table/src/table/style-helper.d.ts +7 -0
  17. package/es/components/table/src/table/style-helper.mjs +20 -17
  18. package/es/components/table/src/table/style-helper.mjs.map +1 -1
  19. package/es/components/table/src/table-body/index.mjs +5 -3
  20. package/es/components/table/src/table-body/index.mjs.map +1 -1
  21. package/es/components/table/src/table-body/styles-helper.d.ts +0 -1
  22. package/es/components/table/src/table-body/styles-helper.mjs +10 -17
  23. package/es/components/table/src/table-body/styles-helper.mjs.map +1 -1
  24. package/es/components/table/src/table-column/defaults.d.ts +1 -0
  25. package/es/components/table/src/table-column/defaults.mjs.map +1 -1
  26. package/es/components/table/src/table-column/index.mjs +1 -0
  27. package/es/components/table/src/table-column/index.mjs.map +1 -1
  28. package/es/components/table/src/table-footer/index.d.ts +4 -2
  29. package/es/components/table/src/table-footer/index.mjs +33 -18
  30. package/es/components/table/src/table-footer/index.mjs.map +1 -1
  31. package/es/components/table/src/table-footer/style-helper.d.ts +4 -2
  32. package/es/components/table/src/table-footer/style-helper.mjs +28 -31
  33. package/es/components/table/src/table-footer/style-helper.mjs.map +1 -1
  34. package/es/components/table/src/table-header/index.d.ts +3 -2
  35. package/es/components/table/src/table-header/index.mjs +89 -51
  36. package/es/components/table/src/table-header/index.mjs.map +1 -1
  37. package/es/components/table/src/table-header/style.helper.d.ts +1 -1
  38. package/es/components/table/src/table-header/style.helper.mjs +14 -24
  39. package/es/components/table/src/table-header/style.helper.mjs.map +1 -1
  40. package/es/components/table/src/table-header/utils-helper.mjs +1 -0
  41. package/es/components/table/src/table-header/utils-helper.mjs.map +1 -1
  42. package/es/components/table/src/table-layout.d.ts +1 -0
  43. package/es/components/table/src/table-layout.mjs +7 -1
  44. package/es/components/table/src/table-layout.mjs.map +1 -1
  45. package/es/components/table/src/table.vue.d.ts +9 -0
  46. package/es/components/table/src/table.vue_vue_type_script_lang.mjs +12 -2
  47. package/es/components/table/src/table.vue_vue_type_script_lang.mjs.map +1 -1
  48. package/es/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.mjs +62 -213
  49. package/es/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.mjs.map +1 -1
  50. package/es/components/table/src/util.d.ts +14 -0
  51. package/es/components/table/src/util.mjs +90 -1
  52. package/es/components/table/src/util.mjs.map +1 -1
  53. package/es/index.mjs +1 -1
  54. package/es/version.d.ts +1 -1
  55. package/es/version.mjs +1 -1
  56. package/es/version.mjs.map +1 -1
  57. package/lib/components/index.js +1 -1
  58. package/lib/components/skeleton/index.js +2 -2
  59. package/lib/components/skeleton/src/skeleton.js +5 -23
  60. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  61. package/lib/components/skeleton/src/skeleton.vue_vue_type_script_lang.js +1 -1
  62. package/lib/components/skeleton/src/skeleton2.js +23 -5
  63. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  64. package/lib/components/table/index.d.ts +9 -0
  65. package/lib/components/table/src/table/style-helper.d.ts +7 -0
  66. package/lib/components/table/src/table/style-helper.js +20 -21
  67. package/lib/components/table/src/table/style-helper.js.map +1 -1
  68. package/lib/components/table/src/table-body/index.js +5 -3
  69. package/lib/components/table/src/table-body/index.js.map +1 -1
  70. package/lib/components/table/src/table-body/styles-helper.d.ts +0 -1
  71. package/lib/components/table/src/table-body/styles-helper.js +10 -17
  72. package/lib/components/table/src/table-body/styles-helper.js.map +1 -1
  73. package/lib/components/table/src/table-column/defaults.d.ts +1 -0
  74. package/lib/components/table/src/table-column/defaults.js.map +1 -1
  75. package/lib/components/table/src/table-column/index.js +1 -0
  76. package/lib/components/table/src/table-column/index.js.map +1 -1
  77. package/lib/components/table/src/table-footer/index.d.ts +4 -2
  78. package/lib/components/table/src/table-footer/index.js +32 -17
  79. package/lib/components/table/src/table-footer/index.js.map +1 -1
  80. package/lib/components/table/src/table-footer/style-helper.d.ts +4 -2
  81. package/lib/components/table/src/table-footer/style-helper.js +28 -31
  82. package/lib/components/table/src/table-footer/style-helper.js.map +1 -1
  83. package/lib/components/table/src/table-header/index.d.ts +3 -2
  84. package/lib/components/table/src/table-header/index.js +89 -51
  85. package/lib/components/table/src/table-header/index.js.map +1 -1
  86. package/lib/components/table/src/table-header/style.helper.d.ts +1 -1
  87. package/lib/components/table/src/table-header/style.helper.js +14 -24
  88. package/lib/components/table/src/table-header/style.helper.js.map +1 -1
  89. package/lib/components/table/src/table-header/utils-helper.js +1 -0
  90. package/lib/components/table/src/table-header/utils-helper.js.map +1 -1
  91. package/lib/components/table/src/table-layout.d.ts +1 -0
  92. package/lib/components/table/src/table-layout.js +7 -1
  93. package/lib/components/table/src/table-layout.js.map +1 -1
  94. package/lib/components/table/src/table.vue.d.ts +9 -0
  95. package/lib/components/table/src/table.vue_vue_type_script_lang.js +12 -2
  96. package/lib/components/table/src/table.vue_vue_type_script_lang.js.map +1 -1
  97. package/lib/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.js +62 -213
  98. package/lib/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.js.map +1 -1
  99. package/lib/components/table/src/util.d.ts +14 -0
  100. package/lib/components/table/src/util.js +95 -0
  101. package/lib/components/table/src/util.js.map +1 -1
  102. package/lib/index.js +1 -1
  103. package/lib/version.d.ts +1 -1
  104. package/lib/version.js +1 -1
  105. package/lib/version.js.map +1 -1
  106. package/package.json +2 -2
  107. package/theme-chalk/el-table.css +1 -1
  108. package/theme-chalk/index.css +1 -1
  109. package/theme-chalk/src/table.scss +176 -124
  110. package/web-types.json +1 -1
@@ -1,4 +1,4 @@
1
- /*! Element Plus v0.0.20220104 */
1
+ /*! Element Plus v0.0.20220105 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
@@ -4531,7 +4531,7 @@
4531
4531
  });
4532
4532
  }
4533
4533
 
4534
- const version$1 = "0.0.20220104";
4534
+ const version$1 = "0.0.20220105";
4535
4535
 
4536
4536
  const INSTALLED_KEY = Symbol("INSTALLED_KEY");
4537
4537
  const makeInstaller = (components = []) => {
@@ -6736,11 +6736,11 @@
6736
6736
  class: "el-input__count"
6737
6737
  };
6738
6738
  const _hoisted_8$b = { class: "el-input__count-inner" };
6739
- const _hoisted_9$8 = {
6739
+ const _hoisted_9$7 = {
6740
6740
  key: 3,
6741
6741
  class: "el-input-group__append"
6742
6742
  };
6743
- const _hoisted_10$8 = ["tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder"];
6743
+ const _hoisted_10$7 = ["tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder"];
6744
6744
  const _hoisted_11$4 = {
6745
6745
  key: 0,
6746
6746
  class: "el-input__count"
@@ -6863,7 +6863,7 @@
6863
6863
  })) : vue.createCommentVNode("v-if", true)
6864
6864
  ])) : vue.createCommentVNode("v-if", true),
6865
6865
  vue.createCommentVNode(" append slot "),
6866
- _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9$8, [
6866
+ _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9$7, [
6867
6867
  vue.renderSlot(_ctx.$slots, "append")
6868
6868
  ])) : vue.createCommentVNode("v-if", true)
6869
6869
  ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
@@ -6887,7 +6887,7 @@
6887
6887
  onBlur: _cache[14] || (_cache[14] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
6888
6888
  onChange: _cache[15] || (_cache[15] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),
6889
6889
  onKeydown: _cache[16] || (_cache[16] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))
6890
- }), null, 16, _hoisted_10$8),
6890
+ }), null, 16, _hoisted_10$7),
6891
6891
  _ctx.isWordLimitVisible ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_11$4, vue.toDisplayString(_ctx.textLength) + " / " + vue.toDisplayString(_ctx.attrs.maxlength), 1)) : vue.createCommentVNode("v-if", true)
6892
6892
  ], 64))
6893
6893
  ], 38)), [
@@ -20180,8 +20180,8 @@
20180
20180
  const _hoisted_6$e = { class: "cell" };
20181
20181
  const _hoisted_7$a = { class: "cell" };
20182
20182
  const _hoisted_8$9 = { class: "cell" };
20183
- const _hoisted_9$7 = { class: "cell" };
20184
- const _hoisted_10$7 = { class: "cell" };
20183
+ const _hoisted_9$6 = { class: "cell" };
20184
+ const _hoisted_10$6 = { class: "cell" };
20185
20185
  const _hoisted_11$3 = /* @__PURE__ */ vue.createElementVNode("td", null, null, -1);
20186
20186
  const _hoisted_12$3 = /* @__PURE__ */ vue.createElementVNode("td", null, null, -1);
20187
20187
  function render$1b(_ctx, _cache, $props, $setup, $data, $options) {
@@ -20238,12 +20238,12 @@
20238
20238
  vue.createElementVNode("td", {
20239
20239
  class: vue.normalizeClass(["available", _ctx.getCellStyle(_ctx.startYear + 8)])
20240
20240
  }, [
20241
- vue.createElementVNode("a", _hoisted_9$7, vue.toDisplayString(_ctx.startYear + 8), 1)
20241
+ vue.createElementVNode("a", _hoisted_9$6, vue.toDisplayString(_ctx.startYear + 8), 1)
20242
20242
  ], 2),
20243
20243
  vue.createElementVNode("td", {
20244
20244
  class: vue.normalizeClass(["available", _ctx.getCellStyle(_ctx.startYear + 9)])
20245
20245
  }, [
20246
- vue.createElementVNode("a", _hoisted_10$7, vue.toDisplayString(_ctx.startYear + 9), 1)
20246
+ vue.createElementVNode("a", _hoisted_10$6, vue.toDisplayString(_ctx.startYear + 9), 1)
20247
20247
  ], 2),
20248
20248
  _hoisted_11$3,
20249
20249
  _hoisted_12$3
@@ -20664,8 +20664,8 @@
20664
20664
  const _hoisted_6$d = { class: "el-date-picker__editor-wrap" };
20665
20665
  const _hoisted_7$9 = { class: "el-date-picker__editor-wrap" };
20666
20666
  const _hoisted_8$8 = ["aria-label"];
20667
- const _hoisted_9$6 = ["aria-label"];
20668
- const _hoisted_10$6 = ["aria-label"];
20667
+ const _hoisted_9$5 = ["aria-label"];
20668
+ const _hoisted_10$5 = ["aria-label"];
20669
20669
  const _hoisted_11$2 = ["aria-label"];
20670
20670
  const _hoisted_12$2 = { class: "el-picker-panel__content" };
20671
20671
  const _hoisted_13$2 = { class: "el-picker-panel__footer" };
@@ -20763,7 +20763,7 @@
20763
20763
  ]),
20764
20764
  _: 1
20765
20765
  })
20766
- ], 8, _hoisted_9$6), [
20766
+ ], 8, _hoisted_9$5), [
20767
20767
  [vue.vShow, _ctx.currentView === "date"]
20768
20768
  ]),
20769
20769
  vue.createElementVNode("span", {
@@ -20790,7 +20790,7 @@
20790
20790
  ]),
20791
20791
  _: 1
20792
20792
  })
20793
- ], 8, _hoisted_10$6),
20793
+ ], 8, _hoisted_10$5),
20794
20794
  vue.withDirectives(vue.createElementVNode("button", {
20795
20795
  type: "button",
20796
20796
  "aria-label": _ctx.t(`el.datepicker.nextMonth`),
@@ -21299,8 +21299,8 @@
21299
21299
  const _hoisted_6$c = { class: "el-date-range-picker__editors-wrap" };
21300
21300
  const _hoisted_7$8 = { class: "el-date-range-picker__time-picker-wrap" };
21301
21301
  const _hoisted_8$7 = { class: "el-date-range-picker__time-picker-wrap" };
21302
- const _hoisted_9$5 = { class: "el-date-range-picker__editors-wrap is-right" };
21303
- const _hoisted_10$5 = { class: "el-date-range-picker__time-picker-wrap" };
21302
+ const _hoisted_9$4 = { class: "el-date-range-picker__editors-wrap is-right" };
21303
+ const _hoisted_10$4 = { class: "el-date-range-picker__time-picker-wrap" };
21304
21304
  const _hoisted_11$1 = { class: "el-date-range-picker__time-picker-wrap" };
21305
21305
  const _hoisted_12$1 = { class: "el-picker-panel__content el-date-range-picker__content is-left" };
21306
21306
  const _hoisted_13$1 = { class: "el-date-range-picker__header" };
@@ -21390,8 +21390,8 @@
21390
21390
  _: 1
21391
21391
  })
21392
21392
  ]),
21393
- vue.createElementVNode("span", _hoisted_9$5, [
21394
- vue.createElementVNode("span", _hoisted_10$5, [
21393
+ vue.createElementVNode("span", _hoisted_9$4, [
21394
+ vue.createElementVNode("span", _hoisted_10$4, [
21395
21395
  vue.createVNode(_component_el_input, {
21396
21396
  size: "small",
21397
21397
  class: "el-date-range-picker__editor",
@@ -21774,8 +21774,8 @@
21774
21774
  const _hoisted_6$b = { class: "el-date-range-picker__header" };
21775
21775
  const _hoisted_7$7 = ["disabled"];
21776
21776
  const _hoisted_8$6 = { class: "el-picker-panel__content el-date-range-picker__content is-right" };
21777
- const _hoisted_9$4 = { class: "el-date-range-picker__header" };
21778
- const _hoisted_10$4 = ["disabled"];
21777
+ const _hoisted_9$3 = { class: "el-date-range-picker__header" };
21778
+ const _hoisted_10$3 = ["disabled"];
21779
21779
  function render$18(_ctx, _cache, $props, $setup, $data, $options) {
21780
21780
  const _component_d_arrow_left = vue.resolveComponent("d-arrow-left");
21781
21781
  const _component_el_icon = vue.resolveComponent("el-icon");
@@ -21844,7 +21844,7 @@
21844
21844
  }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "onChangerange", "onPick", "onSelect"])
21845
21845
  ]),
21846
21846
  vue.createElementVNode("div", _hoisted_8$6, [
21847
- vue.createElementVNode("div", _hoisted_9$4, [
21847
+ vue.createElementVNode("div", _hoisted_9$3, [
21848
21848
  _ctx.unlinkPanels ? (vue.openBlock(), vue.createElementBlock("button", {
21849
21849
  key: 0,
21850
21850
  type: "button",
@@ -21858,7 +21858,7 @@
21858
21858
  ]),
21859
21859
  _: 1
21860
21860
  })
21861
- ], 10, _hoisted_10$4)) : vue.createCommentVNode("v-if", true),
21861
+ ], 10, _hoisted_10$3)) : vue.createCommentVNode("v-if", true),
21862
21862
  vue.createElementVNode("button", {
21863
21863
  type: "button",
21864
21864
  class: "el-picker-panel__icon-btn d-arrow-right",
@@ -24136,11 +24136,11 @@
24136
24136
  "stop-color": "#E9EBEF",
24137
24137
  offset: "100%"
24138
24138
  }, null, -1);
24139
- const _hoisted_9$3 = [
24139
+ const _hoisted_9$2 = [
24140
24140
  _hoisted_7$6,
24141
24141
  _hoisted_8$5
24142
24142
  ];
24143
- const _hoisted_10$3 = ["id"];
24143
+ const _hoisted_10$2 = ["id"];
24144
24144
  const _hoisted_11 = {
24145
24145
  id: "Illustrations",
24146
24146
  stroke: "none",
@@ -24220,14 +24220,14 @@
24220
24220
  y1: "9.5%",
24221
24221
  x2: "100%",
24222
24222
  y2: "90.5%"
24223
- }, _hoisted_9$3, 8, _hoisted_6$a),
24223
+ }, _hoisted_9$2, 8, _hoisted_6$a),
24224
24224
  vue.createElementVNode("rect", {
24225
24225
  id: `path-3-${_ctx.id}`,
24226
24226
  x: "0",
24227
24227
  y: "0",
24228
24228
  width: "17",
24229
24229
  height: "36"
24230
- }, null, 8, _hoisted_10$3)
24230
+ }, null, 8, _hoisted_10$2)
24231
24231
  ]),
24232
24232
  vue.createElementVNode("g", _hoisted_11, [
24233
24233
  vue.createElementVNode("g", _hoisted_12, [
@@ -33143,7 +33143,7 @@
33143
33143
  column: getEstimatedTotalWidth,
33144
33144
  row: getEstimatedTotalHeight
33145
33145
  };
33146
- const getOffset = (props, index, alignment, scrollOffset, cache, type, scrollBarWidth) => {
33146
+ const getOffset$1 = (props, index, alignment, scrollOffset, cache, type, scrollBarWidth) => {
33147
33147
  const [size, estimatedSizeAssociates] = [
33148
33148
  type === "row" ? props.height : props.width,
33149
33149
  ACCESS_ESTIMATED_SIZE_KEY_MAP[type]
@@ -33193,8 +33193,8 @@
33193
33193
  const item = getItemFromCache(props, idx, cache, "row");
33194
33194
  return [item.size, item.offset];
33195
33195
  },
33196
- getColumnOffset: (props, columnIndex, alignment, scrollLeft, cache, scrollBarWidth) => getOffset(props, columnIndex, alignment, scrollLeft, cache, "column", scrollBarWidth),
33197
- getRowOffset: (props, rowIndex, alignment, scrollTop, cache, scrollBarWidth) => getOffset(props, rowIndex, alignment, scrollTop, cache, "row", scrollBarWidth),
33196
+ getColumnOffset: (props, columnIndex, alignment, scrollLeft, cache, scrollBarWidth) => getOffset$1(props, columnIndex, alignment, scrollLeft, cache, "column", scrollBarWidth),
33197
+ getRowOffset: (props, rowIndex, alignment, scrollTop, cache, scrollBarWidth) => getOffset$1(props, rowIndex, alignment, scrollTop, cache, "row", scrollBarWidth),
33198
33198
  getColumnStartIndexForOffset: (props, scrollLeft, cache) => findItem(props, cache, scrollLeft, "column"),
33199
33199
  getColumnStopIndexForStartIndex: (props, startIndex, scrollLeft, cache) => {
33200
33200
  const item = getItemFromCache(props, startIndex, cache, "column");
@@ -34361,8 +34361,8 @@
34361
34361
  const _hoisted_6$6 = { class: "el-select-v2__selected-item el-select-v2__input-wrapper" };
34362
34362
  const _hoisted_7$4 = ["id", "aria-labelledby", "aria-expanded", "autocomplete", "disabled", "name", "readonly", "unselectable"];
34363
34363
  const _hoisted_8$4 = ["textContent"];
34364
- const _hoisted_9$2 = { class: "el-select-v2__suffix" };
34365
- const _hoisted_10$2 = { class: "el-select-v2__empty" };
34364
+ const _hoisted_9$1 = { class: "el-select-v2__suffix" };
34365
+ const _hoisted_10$1 = { class: "el-select-v2__empty" };
34366
34366
  function render$r(_ctx, _cache, $props, $setup, $data, $options) {
34367
34367
  const _component_el_tag = vue.resolveComponent("el-tag");
34368
34368
  const _component_el_icon = vue.resolveComponent("el-icon");
@@ -34569,7 +34569,7 @@
34569
34569
  "is-transparent": _ctx.states.isComposing || (_ctx.placeholder && _ctx.multiple ? _ctx.modelValue.length === 0 : !_ctx.hasModelValue)
34570
34570
  })
34571
34571
  }, vue.toDisplayString(_ctx.currentPlaceholder), 3)) : vue.createCommentVNode("v-if", true),
34572
- vue.createElementVNode("span", _hoisted_9$2, [
34572
+ vue.createElementVNode("span", _hoisted_9$1, [
34573
34573
  _ctx.iconComponent ? vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_icon, {
34574
34574
  key: 0,
34575
34575
  class: vue.normalizeClass(["el-select-v2__caret", "el-input__icon", _ctx.iconReverse])
@@ -34617,7 +34617,7 @@
34617
34617
  ]),
34618
34618
  empty: vue.withCtx(() => [
34619
34619
  vue.renderSlot(_ctx.$slots, "empty", {}, () => [
34620
- vue.createElementVNode("p", _hoisted_10$2, vue.toDisplayString(_ctx.emptyText ? _ctx.emptyText : ""), 1)
34620
+ vue.createElementVNode("p", _hoisted_10$1, vue.toDisplayString(_ctx.emptyText ? _ctx.emptyText : ""), 1)
34621
34621
  ])
34622
34622
  ]),
34623
34623
  _: 3
@@ -36679,6 +36679,87 @@
36679
36679
  on(trigger, "mouseleave", removePopper);
36680
36680
  return popperInstance;
36681
36681
  }
36682
+ const isFixedColumn = (index, fixed, store, realColumns) => {
36683
+ let start = 0;
36684
+ let after = index;
36685
+ if (realColumns) {
36686
+ for (let i = 0; i < index; i++) {
36687
+ start += realColumns[i].colSpan;
36688
+ }
36689
+ after = start + realColumns[index].colSpan - 1;
36690
+ } else {
36691
+ start = index;
36692
+ }
36693
+ let fixedLayout;
36694
+ const columns = store.states.columns;
36695
+ switch (fixed) {
36696
+ case "left":
36697
+ if (after < store.states.fixedLeafColumnsLength.value) {
36698
+ fixedLayout = "left";
36699
+ }
36700
+ break;
36701
+ case "right":
36702
+ if (start >= columns.value.length - store.states.rightFixedLeafColumnsLength.value) {
36703
+ fixedLayout = "right";
36704
+ }
36705
+ break;
36706
+ default:
36707
+ if (after < store.states.fixedLeafColumnsLength.value) {
36708
+ fixedLayout = "left";
36709
+ } else if (start >= columns.value.length - store.states.rightFixedLeafColumnsLength.value) {
36710
+ fixedLayout = "right";
36711
+ }
36712
+ }
36713
+ return fixedLayout ? {
36714
+ direction: fixedLayout,
36715
+ start,
36716
+ after
36717
+ } : {};
36718
+ };
36719
+ const getFixedColumnsClass = (index, fixed, store, realColumns) => {
36720
+ const classes = [];
36721
+ const { direction, start } = isFixedColumn(index, fixed, store, realColumns);
36722
+ if (direction) {
36723
+ const isLeft = direction === "left";
36724
+ classes.push(`el-table-fixed-column--${direction}`);
36725
+ if (isLeft && start === store.states.fixedLeafColumnsLength.value - 1) {
36726
+ classes.push("is-last-column");
36727
+ } else if (!isLeft && start === store.states.columns.value.length - store.states.rightFixedLeafColumnsLength.value) {
36728
+ classes.push("is-first-column");
36729
+ }
36730
+ }
36731
+ return classes;
36732
+ };
36733
+ function getOffset(offset, column) {
36734
+ return offset + (Number.isNaN(column.realWidth) ? Number(column.width) : column.realWidth);
36735
+ }
36736
+ const getFixedColumnOffset = (index, fixed, store, realColumns) => {
36737
+ const { direction, start = 0 } = isFixedColumn(index, fixed, store, realColumns);
36738
+ if (!direction) {
36739
+ return;
36740
+ }
36741
+ const styles = {};
36742
+ const isLeft = direction === "left";
36743
+ const columns = store.states.columns.value;
36744
+ if (isLeft) {
36745
+ styles.left = columns.slice(0, index).reduce(getOffset, 0);
36746
+ } else {
36747
+ styles.right = columns.slice(start + 1).reverse().reduce(getOffset, 0);
36748
+ }
36749
+ return styles;
36750
+ };
36751
+ const ensureRightFixedStyle = (style, hasGutter) => {
36752
+ if (hasGutter && style && !Number.isNaN(style.right)) {
36753
+ style.right += scrollbarWidth();
36754
+ }
36755
+ };
36756
+ const ensurePosition = (style, key) => {
36757
+ if (!style)
36758
+ return;
36759
+ if (!Number.isNaN(style[key])) {
36760
+ style[key] = `${style[key]}px`;
36761
+ }
36762
+ };
36682
36763
 
36683
36764
  function useExpand(watcherData) {
36684
36765
  const instance = vue.getCurrentInstance();
@@ -37664,6 +37745,7 @@
37664
37745
  this.footerHeight = vue.ref(44);
37665
37746
  this.viewportHeight = vue.ref(null);
37666
37747
  this.bodyHeight = vue.ref(null);
37748
+ this.bodyScrollHeight = vue.ref(0);
37667
37749
  this.fixedBodyHeight = vue.ref(null);
37668
37750
  this.gutterWidth = scrollbarWidth();
37669
37751
  for (const name in options) {
@@ -37733,9 +37815,10 @@
37733
37815
  return flattenColumns;
37734
37816
  }
37735
37817
  updateElsHeight() {
37818
+ var _a;
37736
37819
  if (!this.table.$ready)
37737
37820
  return vue.nextTick(() => this.updateElsHeight());
37738
- const { headerWrapper, appendWrapper, footerWrapper } = this.table.refs;
37821
+ const { headerWrapper, appendWrapper, footerWrapper, bodyWrapper } = this.table.refs;
37739
37822
  this.appendHeight.value = appendWrapper ? appendWrapper.offsetHeight : 0;
37740
37823
  if (this.showHeader && !headerWrapper)
37741
37824
  return;
@@ -37748,7 +37831,11 @@
37748
37831
  const tableHeight = this.tableHeight.value = this.table.vnode.el.clientHeight;
37749
37832
  const footerHeight = this.footerHeight.value = footerWrapper ? footerWrapper.offsetHeight : 0;
37750
37833
  if (this.height.value !== null) {
37834
+ if (this.bodyHeight.value === null) {
37835
+ requestAnimationFrame(() => this.updateElsHeight());
37836
+ }
37751
37837
  this.bodyHeight.value = tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0);
37838
+ this.bodyScrollHeight.value = (_a = bodyWrapper.querySelector(".el-table__body")) == null ? void 0 : _a.scrollHeight;
37752
37839
  }
37753
37840
  this.fixedBodyHeight.value = this.scrollX.value ? this.bodyHeight.value - this.gutterWidth : this.bodyHeight.value;
37754
37841
  this.viewportHeight.value = this.scrollX.value ? tableHeight - this.gutterWidth : tableHeight;
@@ -38365,21 +38452,6 @@
38365
38452
  function useStyle$2(props) {
38366
38453
  const instance = vue.getCurrentInstance();
38367
38454
  const parent = instance.parent;
38368
- const storeData = parent.store.states;
38369
- const isCellHidden = (index, columns) => {
38370
- let start = 0;
38371
- for (let i = 0; i < index; i++) {
38372
- start += columns[i].colSpan;
38373
- }
38374
- const after = start + columns[index].colSpan - 1;
38375
- if (props.fixed === "left") {
38376
- return after >= storeData.fixedLeafColumnsLength.value;
38377
- } else if (props.fixed === "right") {
38378
- return start < storeData.columns.value.length - storeData.rightFixedLeafColumnsLength.value;
38379
- } else {
38380
- return after < storeData.fixedLeafColumnsLength.value || start >= storeData.columns.value.length - storeData.rightFixedLeafColumnsLength.value;
38381
- }
38382
- };
38383
38455
  const getHeaderRowStyle = (rowIndex) => {
38384
38456
  const headerRowStyle = parent.props.headerRowStyle;
38385
38457
  if (typeof headerRowStyle === "function") {
@@ -38397,29 +38469,33 @@
38397
38469
  }
38398
38470
  return classes.join(" ");
38399
38471
  };
38400
- const getHeaderCellStyle = (rowIndex, columnIndex, row, column) => {
38401
- const headerCellStyle = parent.props.headerCellStyle;
38402
- if (typeof headerCellStyle === "function") {
38403
- return headerCellStyle.call(null, {
38472
+ const getHeaderCellStyle = (rowIndex, columnIndex, row, column, hasGutter) => {
38473
+ var _a;
38474
+ let headerCellStyles = (_a = parent.props.headerCellStyle) != null ? _a : {};
38475
+ if (typeof headerCellStyles === "function") {
38476
+ headerCellStyles = headerCellStyles.call(null, {
38404
38477
  rowIndex,
38405
38478
  columnIndex,
38406
38479
  row,
38407
38480
  column
38408
38481
  });
38409
38482
  }
38410
- return headerCellStyle;
38483
+ const fixedStyle = getFixedColumnOffset(columnIndex, column.fixed, props.store, row);
38484
+ ensureRightFixedStyle(fixedStyle, hasGutter);
38485
+ ensurePosition(fixedStyle, "left");
38486
+ ensurePosition(fixedStyle, "right");
38487
+ return Object.assign({}, headerCellStyles, fixedStyle);
38411
38488
  };
38412
38489
  const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
38490
+ const fixedClasses = column.isSubColumn ? [] : getFixedColumnsClass(columnIndex, column.fixed, props.store, row);
38413
38491
  const classes = [
38414
38492
  column.id,
38415
38493
  column.order,
38416
38494
  column.headerAlign,
38417
38495
  column.className,
38418
- column.labelClassName
38496
+ column.labelClassName,
38497
+ ...fixedClasses
38419
38498
  ];
38420
- if (rowIndex === 0 && isCellHidden(columnIndex, row)) {
38421
- classes.push("is-hidden");
38422
- }
38423
38499
  if (!column.children) {
38424
38500
  classes.push("is-leaf");
38425
38501
  }
@@ -38494,6 +38570,7 @@
38494
38570
  column.rowSpan = maxLevel - column.level + 1;
38495
38571
  } else {
38496
38572
  column.rowSpan = 1;
38573
+ column.children.forEach((col) => col.isSubColumn = true);
38497
38574
  }
38498
38575
  rows[column.level - 1].push(column);
38499
38576
  });
@@ -38554,7 +38631,10 @@
38554
38631
  const filterPanels = vue.ref({});
38555
38632
  const { tableLayout, onColumnsChange, onScrollableChange } = useLayoutObserver(parent);
38556
38633
  const hasGutter = vue.computed(() => {
38557
- return !props.fixed && tableLayout.gutterWidth;
38634
+ return !props.fixed && tableLayout.gutterWidth > 0 && tableLayout.bodyScrollHeight.value > tableLayout.bodyHeight.value;
38635
+ });
38636
+ const gutterWidth = vue.computed(() => {
38637
+ return tableLayout.gutterWidth;
38558
38638
  });
38559
38639
  vue.onMounted(() => {
38560
38640
  vue.nextTick(() => {
@@ -38588,6 +38668,7 @@
38588
38668
  columns: storeData.columns,
38589
38669
  filterPanels,
38590
38670
  hasGutter,
38671
+ gutterWidth,
38591
38672
  onColumnsChange,
38592
38673
  onScrollableChange,
38593
38674
  columnRows,
@@ -38607,67 +38688,101 @@
38607
38688
  };
38608
38689
  },
38609
38690
  render() {
38691
+ const {
38692
+ columns,
38693
+ isGroup,
38694
+ hasGutter,
38695
+ columnRows,
38696
+ gutterWidth,
38697
+ getHeaderCellStyle,
38698
+ getHeaderCellClass,
38699
+ getHeaderRowClass,
38700
+ getHeaderRowStyle,
38701
+ handleHeaderClick,
38702
+ handleHeaderContextMenu,
38703
+ handleMouseDown,
38704
+ handleMouseMove,
38705
+ handleSortClick,
38706
+ handleMouseOut,
38707
+ store,
38708
+ $parent
38709
+ } = this;
38710
+ let rowSpan = 1;
38610
38711
  return vue.h("table", {
38611
38712
  border: "0",
38612
38713
  cellpadding: "0",
38613
38714
  cellspacing: "0",
38614
38715
  class: "el-table__header"
38615
38716
  }, [
38616
- hColgroup(this.columns, this.hasGutter),
38717
+ hColgroup(columns, hasGutter),
38617
38718
  vue.h("thead", {
38618
- class: { "is-group": this.isGroup, "has-gutter": this.hasGutter }
38619
- }, this.columnRows.map((subColumns, rowIndex) => vue.h("tr", {
38620
- class: this.getHeaderRowClass(rowIndex),
38719
+ class: { "is-group": isGroup, "has-gutter": hasGutter }
38720
+ }, columnRows.map((subColumns, rowIndex) => vue.h("tr", {
38721
+ class: getHeaderRowClass(rowIndex),
38621
38722
  key: rowIndex,
38622
- style: this.getHeaderRowStyle(rowIndex)
38623
- }, subColumns.map((column, cellIndex) => vue.h("th", {
38624
- class: this.getHeaderCellClass(rowIndex, cellIndex, subColumns, column),
38625
- colspan: column.colSpan,
38626
- key: `${column.id}-thead`,
38627
- rowSpan: column.rowSpan,
38628
- style: this.getHeaderCellStyle(rowIndex, cellIndex, subColumns, column),
38629
- onClick: ($event) => this.handleHeaderClick($event, column),
38630
- onContextmenu: ($event) => this.handleHeaderContextMenu($event, column),
38631
- onMousedown: ($event) => this.handleMouseDown($event, column),
38632
- onMousemove: ($event) => this.handleMouseMove($event, column),
38633
- onMouseout: this.handleMouseOut
38634
- }, [
38635
- vue.h("div", {
38636
- class: [
38637
- "cell",
38638
- column.filteredValue && column.filteredValue.length > 0 ? "highlight" : "",
38639
- column.labelClassName
38640
- ]
38723
+ style: getHeaderRowStyle(rowIndex)
38724
+ }, subColumns.map((column, cellIndex) => {
38725
+ if (column.rowSpan > rowSpan) {
38726
+ rowSpan = column.rowSpan;
38727
+ }
38728
+ return vue.h("th", {
38729
+ class: getHeaderCellClass(rowIndex, cellIndex, subColumns, column),
38730
+ colspan: column.colSpan,
38731
+ key: `${column.id}-thead`,
38732
+ rowSpan: column.rowSpan,
38733
+ style: getHeaderCellStyle(rowIndex, cellIndex, subColumns, column, hasGutter),
38734
+ onClick: ($event) => handleHeaderClick($event, column),
38735
+ onContextmenu: ($event) => handleHeaderContextMenu($event, column),
38736
+ onMousedown: ($event) => handleMouseDown($event, column),
38737
+ onMousemove: ($event) => handleMouseMove($event, column),
38738
+ onMouseout: handleMouseOut
38641
38739
  }, [
38642
- column.renderHeader ? column.renderHeader({
38643
- column,
38644
- $index: cellIndex,
38645
- store: this.store,
38646
- _self: this.$parent
38647
- }) : column.label,
38648
- column.sortable && vue.h("span", {
38649
- onClick: ($event) => this.handleSortClick($event, column),
38650
- class: "caret-wrapper"
38740
+ vue.h("div", {
38741
+ class: [
38742
+ "cell",
38743
+ column.filteredValue && column.filteredValue.length > 0 ? "highlight" : "",
38744
+ column.labelClassName
38745
+ ]
38651
38746
  }, [
38652
- vue.h("i", {
38653
- onClick: ($event) => this.handleSortClick($event, column, "ascending"),
38654
- class: "sort-caret ascending"
38655
- }),
38656
- vue.h("i", {
38657
- onClick: ($event) => this.handleSortClick($event, column, "descending"),
38658
- class: "sort-caret descending"
38747
+ column.renderHeader ? column.renderHeader({
38748
+ column,
38749
+ $index: cellIndex,
38750
+ store,
38751
+ _self: $parent
38752
+ }) : column.label,
38753
+ column.sortable && vue.h("span", {
38754
+ onClick: ($event) => handleSortClick($event, column),
38755
+ class: "caret-wrapper"
38756
+ }, [
38757
+ vue.h("i", {
38758
+ onClick: ($event) => handleSortClick($event, column, "ascending"),
38759
+ class: "sort-caret ascending"
38760
+ }),
38761
+ vue.h("i", {
38762
+ onClick: ($event) => handleSortClick($event, column, "descending"),
38763
+ class: "sort-caret descending"
38764
+ })
38765
+ ]),
38766
+ column.filterable && vue.h(script$k, {
38767
+ store: $parent.store,
38768
+ placement: column.filterPlacement || "bottom-start",
38769
+ column,
38770
+ upDataColumn: (key, value) => {
38771
+ column[key] = value;
38772
+ }
38659
38773
  })
38660
- ]),
38661
- column.filterable && vue.h(script$k, {
38662
- store: this.$parent.store,
38663
- placement: column.filterPlacement || "bottom-start",
38664
- column,
38665
- upDataColumn: (key, value) => {
38666
- column[key] = value;
38667
- }
38668
- })
38669
- ])
38670
- ])))))
38774
+ ])
38775
+ ]);
38776
+ }).concat(hasGutter && rowIndex === 0 ? [
38777
+ vue.h("th", {
38778
+ class: "el-table__fixed-right-patch el-table__cell",
38779
+ key: `el-table--scrollbar`,
38780
+ rowSpan,
38781
+ style: {
38782
+ width: `${gutterWidth}px`
38783
+ }
38784
+ }, [])
38785
+ ] : []))))
38671
38786
  ]);
38672
38787
  }
38673
38788
  });
@@ -38756,15 +38871,6 @@
38756
38871
  function useStyles(props) {
38757
38872
  const instance = vue.getCurrentInstance();
38758
38873
  const parent = instance.parent;
38759
- const isColumnHidden = (index) => {
38760
- if (props.fixed === "left") {
38761
- return index >= props.store.states.fixedLeafColumnsLength.value;
38762
- } else if (props.fixed === "right") {
38763
- return index < props.store.states.columns.value.length - props.store.states.rightFixedLeafColumnsLength.value;
38764
- } else {
38765
- return index < props.store.states.fixedLeafColumnsLength.value || index >= props.store.states.columns.value.length - props.store.states.rightFixedLeafColumnsLength.value;
38766
- }
38767
- };
38768
38874
  const getRowStyle = (row, rowIndex) => {
38769
38875
  const rowStyle = parent.props.rowStyle;
38770
38876
  if (typeof rowStyle === "function") {
@@ -38799,21 +38905,23 @@
38799
38905
  };
38800
38906
  const getCellStyle = (rowIndex, columnIndex, row, column) => {
38801
38907
  const cellStyle = parent.props.cellStyle;
38908
+ let cellStyles = cellStyle != null ? cellStyle : {};
38802
38909
  if (typeof cellStyle === "function") {
38803
- return cellStyle.call(null, {
38910
+ cellStyles = cellStyle.call(null, {
38804
38911
  rowIndex,
38805
38912
  columnIndex,
38806
38913
  row,
38807
38914
  column
38808
38915
  });
38809
38916
  }
38810
- return cellStyle;
38917
+ const fixedStyle = getFixedColumnOffset(columnIndex, props.fixed, props.store);
38918
+ ensurePosition(fixedStyle, "left");
38919
+ ensurePosition(fixedStyle, "right");
38920
+ return Object.assign({}, cellStyles, fixedStyle);
38811
38921
  };
38812
38922
  const getCellClass = (rowIndex, columnIndex, row, column) => {
38813
- const classes = [column.id, column.align, column.className];
38814
- if (isColumnHidden(columnIndex)) {
38815
- classes.push("is-hidden");
38816
- }
38923
+ const fixedClasses = column.isSubColumn ? [] : getFixedColumnsClass(columnIndex, props.fixed, props.store);
38924
+ const classes = [column.id, column.align, column.className, ...fixedClasses];
38817
38925
  const cellClassName = parent.props.cellClassName;
38818
38926
  if (typeof cellClassName === "string") {
38819
38927
  classes.push(cellClassName);
@@ -38862,8 +38970,7 @@
38862
38970
  getCellStyle,
38863
38971
  getCellClass,
38864
38972
  getSpan,
38865
- getColspanRealWidth,
38866
- isColumnHidden
38973
+ getColspanRealWidth
38867
38974
  };
38868
38975
  }
38869
38976
 
@@ -39128,17 +39235,19 @@
39128
39235
  };
39129
39236
  },
39130
39237
  render() {
39131
- const data = this.store.states.data.value || [];
39238
+ const { wrappedRowRender, store } = this;
39239
+ const data = store.states.data.value || [];
39240
+ const columns = store.states.columns.value;
39132
39241
  return vue.h("table", {
39133
39242
  class: "el-table__body",
39134
39243
  cellspacing: "0",
39135
39244
  cellpadding: "0",
39136
39245
  border: "0"
39137
39246
  }, [
39138
- hColgroup(this.store.states.columns.value),
39247
+ hColgroup(columns),
39139
39248
  vue.h("tbody", {}, [
39140
39249
  data.reduce((acc, row) => {
39141
- return acc.concat(this.wrappedRowRender(row, acc.length));
39250
+ return acc.concat(wrappedRowRender(row, acc.length));
39142
39251
  }, [])
39143
39252
  ])
39144
39253
  ]);
@@ -39177,49 +39286,45 @@
39177
39286
  function useStyle$1(props) {
39178
39287
  const instance = vue.getCurrentInstance();
39179
39288
  const table = instance.parent;
39180
- const store = table.store;
39181
- const {
39182
- leftFixedLeafCount,
39183
- rightFixedLeafCount,
39184
- columnsCount,
39185
- leftFixedCount,
39186
- rightFixedCount,
39187
- columns
39188
- } = useMapState();
39289
+ const { columns } = useMapState();
39189
39290
  const hasGutter = vue.computed(() => {
39190
- return !props.fixed && !table.layout.gutterWidth;
39291
+ return !props.fixed && table.layout.gutterWidth > 0 && table.layout.height.value && table.layout.bodyScrollHeight.value > table.layout.bodyHeight.value;
39191
39292
  });
39192
- const isCellHidden = (index, columns2, column) => {
39193
- if (props.fixed || props.fixed === "left") {
39194
- return index >= leftFixedLeafCount.value;
39195
- } else if (props.fixed === "right") {
39196
- let before = 0;
39197
- for (let i = 0; i < index; i++) {
39198
- before += columns2[i].colSpan;
39199
- }
39200
- return before < columnsCount.value - rightFixedLeafCount.value;
39201
- } else if (!props.fixed && column.fixed) {
39202
- return true;
39203
- } else {
39204
- return index < leftFixedCount.value || index >= columnsCount.value - rightFixedCount.value;
39205
- }
39206
- };
39207
- const getRowClasses = (column, cellIndex) => {
39208
- const classes = [column.id, column.align, column.labelClassName];
39293
+ const gutterWidth = vue.computed(() => {
39294
+ return table.layout.gutterWidth;
39295
+ });
39296
+ const getCellClasses = (columns2, cellIndex, hasGutter2) => {
39297
+ const column = columns2[cellIndex];
39298
+ const classes = [
39299
+ "el-table__cell",
39300
+ column.id,
39301
+ column.align,
39302
+ column.labelClassName,
39303
+ ...getFixedColumnsClass(cellIndex, column.fixed, props.store)
39304
+ ];
39209
39305
  if (column.className) {
39210
39306
  classes.push(column.className);
39211
39307
  }
39212
- if (isCellHidden(cellIndex, store.states.columns.value, column)) {
39213
- classes.push("is-hidden");
39214
- }
39215
39308
  if (!column.children) {
39216
39309
  classes.push("is-leaf");
39217
39310
  }
39311
+ if (hasGutter2 && cellIndex === columns2.length - 1) {
39312
+ classes.push("last");
39313
+ }
39218
39314
  return classes;
39219
39315
  };
39316
+ const getCellStyles = (column, cellIndex, hasGutter2) => {
39317
+ const fixedStyle = getFixedColumnOffset(cellIndex, column.fixed, props.store);
39318
+ ensureRightFixedStyle(fixedStyle, hasGutter2);
39319
+ ensurePosition(fixedStyle, "left");
39320
+ ensurePosition(fixedStyle, "right");
39321
+ return fixedStyle;
39322
+ };
39220
39323
  return {
39221
39324
  hasGutter,
39222
- getRowClasses,
39325
+ gutterWidth,
39326
+ getCellClasses,
39327
+ getCellStyles,
39223
39328
  columns
39224
39329
  };
39225
39330
  }
@@ -39249,27 +39354,39 @@
39249
39354
  }
39250
39355
  },
39251
39356
  setup(props) {
39252
- const { hasGutter, getRowClasses, columns } = useStyle$1(props);
39357
+ const { hasGutter, getCellClasses, getCellStyles, columns, gutterWidth } = useStyle$1(props);
39253
39358
  return {
39254
- getRowClasses,
39359
+ getCellClasses,
39360
+ getCellStyles,
39255
39361
  hasGutter,
39362
+ gutterWidth,
39256
39363
  columns
39257
39364
  };
39258
39365
  },
39259
39366
  render() {
39367
+ const {
39368
+ hasGutter,
39369
+ gutterWidth,
39370
+ columns,
39371
+ getCellStyles,
39372
+ getCellClasses,
39373
+ summaryMethod,
39374
+ sumText
39375
+ } = this;
39376
+ const data = this.store.states.data.value;
39260
39377
  let sums = [];
39261
- if (this.summaryMethod) {
39262
- sums = this.summaryMethod({
39263
- columns: this.columns,
39264
- data: this.store.states.data.value
39378
+ if (summaryMethod) {
39379
+ sums = summaryMethod({
39380
+ columns,
39381
+ data
39265
39382
  });
39266
39383
  } else {
39267
- this.columns.forEach((column, index) => {
39384
+ columns.forEach((column, index) => {
39268
39385
  if (index === 0) {
39269
- sums[index] = this.sumText;
39386
+ sums[index] = sumText;
39270
39387
  return;
39271
39388
  }
39272
- const values = this.store.states.data.value.map((item) => Number(item[column.property]));
39389
+ const values = data.map((item) => Number(item[column.property]));
39273
39390
  const precisions = [];
39274
39391
  let notNumber = true;
39275
39392
  values.forEach((value) => {
@@ -39300,25 +39417,28 @@
39300
39417
  cellpadding: "0",
39301
39418
  border: "0"
39302
39419
  }, [
39303
- hColgroup(this.columns, this.hasGutter),
39420
+ hColgroup(columns, hasGutter),
39304
39421
  vue.h("tbody", {
39305
- class: [{ "has-gutter": this.hasGutter }]
39422
+ class: [{ "has-gutter": hasGutter }]
39306
39423
  }, [
39307
39424
  vue.h("tr", {}, [
39308
- ...this.columns.map((column, cellIndex) => vue.h("td", {
39425
+ ...columns.map((column, cellIndex) => vue.h("td", {
39309
39426
  key: cellIndex,
39310
39427
  colspan: column.colSpan,
39311
39428
  rowspan: column.rowSpan,
39312
- class: [
39313
- ...this.getRowClasses(column, cellIndex),
39314
- "el-table__cell"
39315
- ]
39429
+ class: getCellClasses(columns, cellIndex, hasGutter),
39430
+ style: getCellStyles(column, cellIndex, hasGutter)
39316
39431
  }, [
39317
39432
  vue.h("div", {
39318
39433
  class: ["cell", column.labelClassName]
39319
39434
  }, [sums[cellIndex]])
39320
39435
  ])),
39321
- this.hasGutter && hGutter()
39436
+ hasGutter && vue.h("td", {
39437
+ class: "el-table__fixed-right-patch el-table__cell",
39438
+ style: {
39439
+ width: `${gutterWidth}px`
39440
+ }
39441
+ })
39322
39442
  ])
39323
39443
  ])
39324
39444
  ]);
@@ -39413,6 +39533,17 @@
39413
39533
  const shouldUpdateHeight = vue.computed(() => {
39414
39534
  return props.height || props.maxHeight || store.states.fixedColumns.value.length > 0 || store.states.rightFixedColumns.value.length > 0;
39415
39535
  });
39536
+ const tableBodyStyles = vue.computed(() => {
39537
+ return {
39538
+ width: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : ""
39539
+ };
39540
+ });
39541
+ const borderBottomPatchStyles = vue.computed(() => {
39542
+ return {
39543
+ bottom: `${layout.gutterWidth}px`,
39544
+ right: `${layout.gutterWidth}px`
39545
+ };
39546
+ });
39416
39547
  const doLayout = () => {
39417
39548
  if (shouldUpdateHeight.value) {
39418
39549
  layout.updateElsHeight();
@@ -39449,27 +39580,18 @@
39449
39580
  el.className = classList.join(" ");
39450
39581
  };
39451
39582
  const setScrollClass = (className) => {
39452
- const { bodyWrapper } = table.refs;
39453
- setScrollClassByEl(bodyWrapper, className);
39583
+ const { tableWrapper } = table.refs;
39584
+ setScrollClassByEl(tableWrapper, className);
39454
39585
  };
39455
- const syncPostion = throttle$1(function() {
39586
+ const syncPostion = function() {
39456
39587
  if (!table.refs.bodyWrapper)
39457
39588
  return;
39458
- const { scrollLeft, scrollTop, offsetWidth, scrollWidth } = table.refs.bodyWrapper;
39459
- const {
39460
- headerWrapper,
39461
- footerWrapper,
39462
- fixedBodyWrapper,
39463
- rightFixedBodyWrapper
39464
- } = table.refs;
39589
+ const { scrollLeft, offsetWidth, scrollWidth } = table.refs.bodyWrapper;
39590
+ const { headerWrapper, footerWrapper } = table.refs;
39465
39591
  if (headerWrapper)
39466
39592
  headerWrapper.scrollLeft = scrollLeft;
39467
39593
  if (footerWrapper)
39468
39594
  footerWrapper.scrollLeft = scrollLeft;
39469
- if (fixedBodyWrapper)
39470
- fixedBodyWrapper.scrollTop = scrollTop;
39471
- if (rightFixedBodyWrapper)
39472
- rightFixedBodyWrapper.scrollTop = scrollTop;
39473
39595
  const maxScrollLeftPosition = scrollWidth - offsetWidth - 1;
39474
39596
  if (scrollLeft >= maxScrollLeftPosition) {
39475
39597
  setScrollClass("is-scrolling-right");
@@ -39478,7 +39600,7 @@
39478
39600
  } else {
39479
39601
  setScrollClass("is-scrolling-middle");
39480
39602
  }
39481
- }, 10);
39603
+ };
39482
39604
  const bindEvents = () => {
39483
39605
  table.refs.bodyWrapper.addEventListener("scroll", syncPostion, {
39484
39606
  passive: true
@@ -39630,7 +39752,9 @@
39630
39752
  resizeProxyVisible,
39631
39753
  bodyWidth,
39632
39754
  resizeState,
39633
- doLayout
39755
+ doLayout,
39756
+ tableBodyStyles,
39757
+ borderBottomPatchStyles
39634
39758
  };
39635
39759
  }
39636
39760
 
@@ -39775,7 +39899,9 @@
39775
39899
  resizeProxyVisible,
39776
39900
  bodyWidth,
39777
39901
  resizeState,
39778
- doLayout
39902
+ doLayout,
39903
+ tableBodyStyles,
39904
+ borderBottomPatchStyles
39779
39905
  } = useStyle(props, layout, store, table);
39780
39906
  const debouncedUpdateLayout = debounce$3(doLayout, 50);
39781
39907
  const tableId = `el-table_${tableIdSeed++}`;
@@ -39786,6 +39912,10 @@
39786
39912
  doLayout,
39787
39913
  debouncedUpdateLayout
39788
39914
  };
39915
+ const computedSumText = vue.computed(() => props.sumText || t("el.table.sumText"));
39916
+ const computedEmptyText = vue.computed(() => {
39917
+ return props.emptyText || t("el.table.emptyText");
39918
+ });
39789
39919
  return {
39790
39920
  layout,
39791
39921
  store,
@@ -39801,7 +39931,9 @@
39801
39931
  isGroup,
39802
39932
  bodyWidth,
39803
39933
  bodyHeight,
39934
+ tableBodyStyles,
39804
39935
  emptyBlockStyle,
39936
+ borderBottomPatchStyles,
39805
39937
  debouncedUpdateLayout,
39806
39938
  handleFixedMousewheel,
39807
39939
  fixedHeight,
@@ -39817,52 +39949,39 @@
39817
39949
  sort,
39818
39950
  t,
39819
39951
  setDragVisible,
39820
- context: table
39952
+ context: table,
39953
+ computedSumText,
39954
+ computedEmptyText
39821
39955
  };
39822
39956
  }
39823
39957
  });
39824
39958
 
39825
- const _hoisted_1$d = {
39959
+ const _hoisted_1$d = { class: "el-table__inner-wrapper" };
39960
+ const _hoisted_2$a = {
39826
39961
  ref: "hiddenColumns",
39827
39962
  class: "hidden-columns"
39828
39963
  };
39829
- const _hoisted_2$a = {
39964
+ const _hoisted_3$8 = {
39830
39965
  key: 0,
39831
39966
  ref: "headerWrapper",
39832
39967
  class: "el-table__header-wrapper"
39833
39968
  };
39834
- const _hoisted_3$8 = { class: "el-table__empty-text" };
39835
- const _hoisted_4$5 = {
39969
+ const _hoisted_4$5 = { class: "el-table__empty-text" };
39970
+ const _hoisted_5$4 = {
39836
39971
  key: 1,
39837
39972
  ref: "appendWrapper",
39838
39973
  class: "el-table__append-wrapper"
39839
39974
  };
39840
- const _hoisted_5$4 = {
39841
- key: 1,
39842
- ref: "footerWrapper",
39843
- class: "el-table__footer-wrapper"
39844
- };
39845
39975
  const _hoisted_6$3 = {
39846
- key: 0,
39847
- ref: "fixedHeaderWrapper",
39848
- class: "el-table__fixed-header-wrapper"
39849
- };
39850
- const _hoisted_7$2 = {
39851
39976
  key: 1,
39852
- ref: "fixedFooterWrapper",
39853
- class: "el-table__fixed-footer-wrapper"
39977
+ class: "el-table__border-left-patch"
39854
39978
  };
39855
- const _hoisted_8$2 = {
39979
+ const _hoisted_7$2 = {
39856
39980
  key: 0,
39857
- ref: "rightFixedHeaderWrapper",
39858
- class: "el-table__fixed-header-wrapper"
39859
- };
39860
- const _hoisted_9$1 = {
39861
- key: 1,
39862
- ref: "rightFixedFooterWrapper",
39863
- class: "el-table__fixed-footer-wrapper"
39981
+ ref: "footerWrapper",
39982
+ class: "el-table__footer-wrapper"
39864
39983
  };
39865
- const _hoisted_10$1 = {
39984
+ const _hoisted_8$2 = {
39866
39985
  ref: "resizeProxy",
39867
39986
  class: "el-table__column-resize-proxy"
39868
39987
  };
@@ -39872,6 +39991,7 @@
39872
39991
  const _component_table_footer = vue.resolveComponent("table-footer");
39873
39992
  const _directive_mousewheel = vue.resolveDirective("mousewheel");
39874
39993
  return vue.openBlock(), vue.createElementBlock("div", {
39994
+ ref: "tableWrapper",
39875
39995
  class: vue.normalizeClass([
39876
39996
  {
39877
39997
  "el-table--fit": _ctx.fit,
@@ -39893,168 +40013,28 @@
39893
40013
  onMouseleave: _cache[0] || (_cache[0] = ($event) => _ctx.handleMouseLeave())
39894
40014
  }, [
39895
40015
  vue.createElementVNode("div", _hoisted_1$d, [
39896
- vue.renderSlot(_ctx.$slots, "default")
39897
- ], 512),
39898
- _ctx.showHeader ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_2$a, [
39899
- vue.createVNode(_component_table_header, {
39900
- ref: "tableHeader",
39901
- border: _ctx.border,
39902
- "default-sort": _ctx.defaultSort,
39903
- store: _ctx.store,
39904
- style: vue.normalizeStyle({
39905
- width: _ctx.layout.bodyWidth.value ? _ctx.layout.bodyWidth.value + "px" : ""
39906
- }),
39907
- onSetDragVisible: _ctx.setDragVisible
39908
- }, null, 8, ["border", "default-sort", "store", "style", "onSetDragVisible"])
39909
- ])), [
39910
- [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
39911
- ]) : vue.createCommentVNode("v-if", true),
39912
- vue.createElementVNode("div", {
39913
- ref: "bodyWrapper",
39914
- style: vue.normalizeStyle([_ctx.bodyHeight]),
39915
- class: "el-table__body-wrapper"
39916
- }, [
39917
- vue.createVNode(_component_table_body, {
39918
- context: _ctx.context,
39919
- highlight: _ctx.highlightCurrentRow,
39920
- "row-class-name": _ctx.rowClassName,
39921
- "tooltip-effect": _ctx.tooltipEffect,
39922
- "row-style": _ctx.rowStyle,
39923
- store: _ctx.store,
39924
- stripe: _ctx.stripe,
39925
- style: vue.normalizeStyle({
39926
- width: _ctx.bodyWidth
39927
- })
39928
- }, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "row-style", "store", "stripe", "style"]),
39929
- _ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("div", {
39930
- key: 0,
39931
- ref: "emptyBlock",
39932
- style: vue.normalizeStyle(_ctx.emptyBlockStyle),
39933
- class: "el-table__empty-block"
39934
- }, [
39935
- vue.createElementVNode("span", _hoisted_3$8, [
39936
- vue.renderSlot(_ctx.$slots, "empty", {}, () => [
39937
- vue.createTextVNode(vue.toDisplayString(_ctx.emptyText || _ctx.t("el.table.emptyText")), 1)
39938
- ])
39939
- ])
39940
- ], 4)) : vue.createCommentVNode("v-if", true),
39941
- _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$5, [
39942
- vue.renderSlot(_ctx.$slots, "append")
39943
- ], 512)) : vue.createCommentVNode("v-if", true)
39944
- ], 4),
39945
- _ctx.showSummary ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_5$4, [
39946
- vue.createVNode(_component_table_footer, {
39947
- border: _ctx.border,
39948
- "default-sort": _ctx.defaultSort,
39949
- store: _ctx.store,
39950
- style: vue.normalizeStyle({
39951
- width: _ctx.layout.bodyWidth.value ? _ctx.layout.bodyWidth.value + "px" : ""
39952
- }),
39953
- "sum-text": _ctx.sumText || _ctx.t("el.table.sumText"),
39954
- "summary-method": _ctx.summaryMethod
39955
- }, null, 8, ["border", "default-sort", "store", "style", "sum-text", "summary-method"])
39956
- ])), [
39957
- [vue.vShow, !_ctx.isEmpty],
39958
- [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
39959
- ]) : vue.createCommentVNode("v-if", true),
39960
- _ctx.store.states.fixedColumns.value.length > 0 ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
39961
- key: 2,
39962
- ref: "fixedWrapper",
39963
- style: vue.normalizeStyle([
39964
- {
39965
- width: _ctx.layout.fixedWidth.value ? _ctx.layout.fixedWidth.value + "px" : ""
39966
- },
39967
- _ctx.fixedHeight
39968
- ]),
39969
- class: "el-table__fixed"
39970
- }, [
39971
- _ctx.showHeader ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$3, [
39972
- vue.createVNode(_component_table_header, {
39973
- ref: "fixedTableHeader",
39974
- border: _ctx.border,
39975
- store: _ctx.store,
39976
- style: vue.normalizeStyle({
39977
- width: _ctx.bodyWidth
39978
- }),
39979
- fixed: "left",
39980
- onSetDragVisible: _ctx.setDragVisible
39981
- }, null, 8, ["border", "store", "style", "onSetDragVisible"])
39982
- ], 512)) : vue.createCommentVNode("v-if", true),
39983
- vue.createElementVNode("div", {
39984
- ref: "fixedBodyWrapper",
39985
- style: vue.normalizeStyle([
39986
- {
39987
- top: _ctx.layout.headerHeight.value + "px"
39988
- },
39989
- _ctx.fixedBodyHeight
39990
- ]),
39991
- class: "el-table__fixed-body-wrapper"
39992
- }, [
39993
- vue.createVNode(_component_table_body, {
39994
- highlight: _ctx.highlightCurrentRow,
39995
- "row-class-name": _ctx.rowClassName,
39996
- "tooltip-effect": _ctx.tooltipEffect,
39997
- "row-style": _ctx.rowStyle,
39998
- store: _ctx.store,
39999
- stripe: _ctx.stripe,
40000
- style: vue.normalizeStyle({
40001
- width: _ctx.bodyWidth
40002
- }),
40003
- fixed: "left"
40004
- }, null, 8, ["highlight", "row-class-name", "tooltip-effect", "row-style", "store", "stripe", "style"]),
40005
- _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", {
40006
- key: 0,
40007
- style: vue.normalizeStyle({ height: _ctx.layout.appendHeight.value + "px" }),
40008
- class: "el-table__append-gutter"
40009
- }, null, 4)) : vue.createCommentVNode("v-if", true)
40010
- ], 4),
40011
- _ctx.showSummary ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_7$2, [
40012
- vue.createVNode(_component_table_footer, {
40013
- border: _ctx.border,
40014
- store: _ctx.store,
40015
- style: vue.normalizeStyle({
40016
- width: _ctx.bodyWidth
40017
- }),
40018
- "sum-text": _ctx.sumText || _ctx.t("el.table.sumText"),
40019
- "summary-method": _ctx.summaryMethod,
40020
- fixed: "left"
40021
- }, null, 8, ["border", "store", "style", "sum-text", "summary-method"])
40022
- ], 512)), [
40023
- [vue.vShow, !_ctx.isEmpty]
40024
- ]) : vue.createCommentVNode("v-if", true)
40025
- ], 4)), [
40026
- [_directive_mousewheel, _ctx.handleFixedMousewheel]
40027
- ]) : vue.createCommentVNode("v-if", true),
40028
- _ctx.store.states.rightFixedColumns.value.length > 0 ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
40029
- key: 3,
40030
- ref: "rightFixedWrapper",
40031
- style: vue.normalizeStyle([
40032
- {
40033
- width: _ctx.layout.rightFixedWidth.value ? _ctx.layout.rightFixedWidth.value + "px" : "",
40034
- right: _ctx.layout.scrollY.value ? (_ctx.border ? _ctx.layout.gutterWidth : _ctx.layout.gutterWidth || 0) + "px" : ""
40035
- },
40036
- _ctx.fixedHeight
40037
- ]),
40038
- class: "el-table__fixed-right"
40039
- }, [
40040
- _ctx.showHeader ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$2, [
40016
+ vue.createElementVNode("div", _hoisted_2$a, [
40017
+ vue.renderSlot(_ctx.$slots, "default")
40018
+ ], 512),
40019
+ _ctx.showHeader ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_3$8, [
40041
40020
  vue.createVNode(_component_table_header, {
40042
- ref: "rightFixedTableHeader",
40021
+ ref: "tableHeader",
40043
40022
  border: _ctx.border,
40023
+ "default-sort": _ctx.defaultSort,
40044
40024
  store: _ctx.store,
40045
- style: vue.normalizeStyle({
40046
- width: _ctx.bodyWidth
40047
- }),
40048
- fixed: "right",
40025
+ style: vue.normalizeStyle(_ctx.tableBodyStyles),
40049
40026
  onSetDragVisible: _ctx.setDragVisible
40050
- }, null, 8, ["border", "store", "style", "onSetDragVisible"])
40051
- ], 512)) : vue.createCommentVNode("v-if", true),
40027
+ }, null, 8, ["border", "default-sort", "store", "style", "onSetDragVisible"])
40028
+ ])), [
40029
+ [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
40030
+ ]) : vue.createCommentVNode("v-if", true),
40052
40031
  vue.createElementVNode("div", {
40053
- ref: "rightFixedBodyWrapper",
40054
- style: vue.normalizeStyle([{ top: _ctx.layout.headerHeight.value + "px" }, _ctx.fixedBodyHeight]),
40055
- class: "el-table__fixed-body-wrapper"
40032
+ ref: "bodyWrapper",
40033
+ style: vue.normalizeStyle(_ctx.bodyHeight),
40034
+ class: "el-table__body-wrapper"
40056
40035
  }, [
40057
40036
  vue.createVNode(_component_table_body, {
40037
+ context: _ctx.context,
40058
40038
  highlight: _ctx.highlightCurrentRow,
40059
40039
  "row-class-name": _ctx.rowClassName,
40060
40040
  "tooltip-effect": _ctx.tooltipEffect,
@@ -40063,42 +40043,45 @@
40063
40043
  stripe: _ctx.stripe,
40064
40044
  style: vue.normalizeStyle({
40065
40045
  width: _ctx.bodyWidth
40066
- }),
40067
- fixed: "right"
40068
- }, null, 8, ["highlight", "row-class-name", "tooltip-effect", "row-style", "store", "stripe", "style"]),
40069
- _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", {
40046
+ })
40047
+ }, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "row-style", "store", "stripe", "style"]),
40048
+ _ctx.isEmpty ? (vue.openBlock(), vue.createElementBlock("div", {
40070
40049
  key: 0,
40071
- style: vue.normalizeStyle({ height: _ctx.layout.appendHeight.value + "px" }),
40072
- class: "el-table__append-gutter"
40073
- }, null, 4)) : vue.createCommentVNode("v-if", true)
40050
+ ref: "emptyBlock",
40051
+ style: vue.normalizeStyle(_ctx.emptyBlockStyle),
40052
+ class: "el-table__empty-block"
40053
+ }, [
40054
+ vue.createElementVNode("span", _hoisted_4$5, [
40055
+ vue.renderSlot(_ctx.$slots, "empty", {}, () => [
40056
+ vue.createTextVNode(vue.toDisplayString(_ctx.computedEmptyText), 1)
40057
+ ])
40058
+ ])
40059
+ ], 4)) : vue.createCommentVNode("v-if", true),
40060
+ _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$4, [
40061
+ vue.renderSlot(_ctx.$slots, "append")
40062
+ ], 512)) : vue.createCommentVNode("v-if", true)
40074
40063
  ], 4),
40075
- _ctx.showSummary ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_9$1, [
40076
- vue.createVNode(_component_table_footer, {
40077
- border: _ctx.border,
40078
- store: _ctx.store,
40079
- style: vue.normalizeStyle({
40080
- width: _ctx.bodyWidth
40081
- }),
40082
- "sum-text": _ctx.sumText || _ctx.t("el.table.sumText"),
40083
- "summary-method": _ctx.summaryMethod,
40084
- fixed: "right"
40085
- }, null, 8, ["border", "store", "style", "sum-text", "summary-method"])
40086
- ], 512)), [
40087
- [vue.vShow, !_ctx.isEmpty]
40088
- ]) : vue.createCommentVNode("v-if", true)
40089
- ], 4)), [
40090
- [_directive_mousewheel, _ctx.handleFixedMousewheel]
40064
+ _ctx.border || _ctx.isGroup ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$3)) : vue.createCommentVNode("v-if", true),
40065
+ _ctx.layout.scrollX.value && _ctx.layout.height.value ? (vue.openBlock(), vue.createElementBlock("div", {
40066
+ key: 2,
40067
+ class: "el-table__border-bottom-patch",
40068
+ style: vue.normalizeStyle(_ctx.borderBottomPatchStyles)
40069
+ }, null, 4)) : vue.createCommentVNode("v-if", true)
40070
+ ]),
40071
+ _ctx.showSummary ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_7$2, [
40072
+ vue.createVNode(_component_table_footer, {
40073
+ border: _ctx.border,
40074
+ "default-sort": _ctx.defaultSort,
40075
+ store: _ctx.store,
40076
+ style: vue.normalizeStyle(_ctx.tableBodyStyles),
40077
+ "sum-text": _ctx.computedSumText,
40078
+ "summary-method": _ctx.summaryMethod
40079
+ }, null, 8, ["border", "default-sort", "store", "style", "sum-text", "summary-method"])
40080
+ ])), [
40081
+ [vue.vShow, !_ctx.isEmpty],
40082
+ [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
40091
40083
  ]) : vue.createCommentVNode("v-if", true),
40092
- _ctx.store.states.rightFixedColumns.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
40093
- key: 4,
40094
- ref: "rightFixedPatch",
40095
- style: vue.normalizeStyle({
40096
- width: _ctx.layout.scrollY.value ? _ctx.layout.gutterWidth + "px" : "0",
40097
- height: _ctx.layout.headerHeight.value + "px"
40098
- }),
40099
- class: "el-table__fixed-right-patch"
40100
- }, null, 4)) : vue.createCommentVNode("v-if", true),
40101
- vue.withDirectives(vue.createElementVNode("div", _hoisted_10$1, null, 512), [
40084
+ vue.withDirectives(vue.createElementVNode("div", _hoisted_8$2, null, 512), [
40102
40085
  [vue.vShow, _ctx.resizeProxyVisible]
40103
40086
  ])
40104
40087
  ], 38);
@@ -40577,6 +40560,7 @@
40577
40560
  filteredValue: [],
40578
40561
  filterPlacement: "",
40579
40562
  isColumnGroup: false,
40563
+ isSubColumn: false,
40580
40564
  filterOpened: false,
40581
40565
  sortable,
40582
40566
  index: props.index,