tabula-vue 1.0.0 → 1.0.1

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 (180) hide show
  1. package/es/component.mjs +2 -0
  2. package/es/components/dialog/index.d.ts +30 -30
  3. package/es/components/dialog/src/index.vue.d.ts +2 -2
  4. package/es/components/dialog-form/index.d.ts +2 -2
  5. package/es/components/dialog-form/src/index.vue.d.ts +2 -2
  6. package/es/components/display-item/index.d.ts +25 -25
  7. package/es/components/display-item/src/index.vue.d.ts +7 -7
  8. package/es/components/drawer-form/index.d.ts +50 -50
  9. package/es/components/drawer-form/src/index.vue.d.ts +10 -10
  10. package/es/components/form/index.d.ts +99 -99
  11. package/es/components/form/src/form-content.vue.d.ts +12 -12
  12. package/es/components/form/src/index.vue.d.ts +11 -11
  13. package/es/components/form-item/index.d.ts +80 -80
  14. package/es/components/form-item/src/index.vue.d.ts +9 -9
  15. package/es/components/index.d.ts +1 -0
  16. package/es/components/index.mjs +5 -0
  17. package/es/components/input-tag/index.d.ts +6 -6
  18. package/es/components/input-tag/src/index.vue.d.ts +6 -6
  19. package/es/components/layout/index.d.ts +30 -30
  20. package/es/components/layout/src/index.vue.d.ts +10 -10
  21. package/es/components/page/index.d.ts +1613 -1123
  22. package/es/components/page/src/index.vue.d.ts +618 -430
  23. package/es/components/page/src/index.vue2.mjs +31 -10
  24. package/es/components/popover/index.d.ts +49 -49
  25. package/es/components/popover/src/index.vue.d.ts +3 -3
  26. package/es/components/render/index.d.ts +14 -14
  27. package/es/components/render/src/index.vue.d.ts +1 -1
  28. package/es/components/search/index.d.ts +298 -298
  29. package/es/components/search/src/index.vue.d.ts +84 -84
  30. package/es/components/sidebar/index.d.ts +31 -31
  31. package/es/components/sidebar/src/index.vue.d.ts +5 -5
  32. package/es/components/table/index.d.ts +165 -180
  33. package/es/components/table/index.mjs +3 -0
  34. package/es/components/table/src/index.vue.d.ts +12 -21
  35. package/es/components/table/src/index.vue2.mjs +11 -34
  36. package/es/components/table/src/table-action-bar-content.vue.d.ts +78 -0
  37. package/es/components/table/src/table-action-bar-content.vue.mjs +6 -0
  38. package/es/components/table/src/table-action-bar-content.vue2.mjs +395 -0
  39. package/es/components/table/src/table-action-bar.vue.d.ts +4 -4
  40. package/es/components/table/src/table-action-bar.vue2.mjs +30 -353
  41. package/es/components/table/src/table-column-drag-sort.vue.d.ts +1 -1
  42. package/es/components/table/src/table-column-index.vue.d.ts +1 -1
  43. package/es/components/table/src/table-column.vue.d.ts +22 -29
  44. package/es/components/table/src/table-column.vue2.mjs +4 -57
  45. package/es/components/table/src/table-title-bar.vue.d.ts +2 -2
  46. package/es/components/table/src/type.d.ts +0 -11
  47. package/es/components/table/src/use-columns.d.ts +26 -0
  48. package/es/components/table/src/use-columns.mjs +40 -0
  49. package/es/components/table-v2/index.d.ts +174 -0
  50. package/es/components/table-v2/index.mjs +7 -0
  51. package/es/components/table-v2/src/column-converter.d.ts +27 -0
  52. package/es/components/table-v2/src/column-converter.mjs +42 -0
  53. package/es/components/table-v2/src/index.vue.d.ts +157 -0
  54. package/es/components/table-v2/src/index.vue.mjs +6 -0
  55. package/es/components/table-v2/src/index.vue2.mjs +491 -0
  56. package/es/components/table-v2/src/special-columns.d.ts +61 -0
  57. package/es/components/table-v2/src/special-columns.mjs +76 -0
  58. package/es/components/table-v2/src/table-v2-cell.d.ts +104 -0
  59. package/es/components/table-v2/src/table-v2-cell.mjs +139 -0
  60. package/es/components/table-v2/src/table-v2-header-cell.vue.d.ts +61 -0
  61. package/es/components/table-v2/src/table-v2-header-cell.vue.mjs +6 -0
  62. package/es/components/table-v2/src/table-v2-header-cell.vue2.mjs +92 -0
  63. package/es/components/table-v2/src/type.d.ts +95 -0
  64. package/es/components/table-v2/src/type.mjs +1 -0
  65. package/es/components/table-v2/src/use-table-v2-columns.d.ts +43 -0
  66. package/es/components/table-v2/src/use-table-v2-columns.mjs +47 -0
  67. package/es/components/table-v2/style/css.d.ts +17 -0
  68. package/es/components/table-v2/style/css.mjs +17 -0
  69. package/es/components/table-v2/style/index.d.ts +17 -0
  70. package/es/components/table-v2/style/index.mjs +17 -0
  71. package/es/index.mjs +5 -0
  72. package/es/version.d.ts +1 -1
  73. package/es/version.mjs +1 -1
  74. package/index.css +1 -1
  75. package/index.js +1111 -218
  76. package/index.min.js +5 -6
  77. package/index.min.mjs +5 -6
  78. package/index.mjs +1109 -221
  79. package/lib/component.js +40 -38
  80. package/lib/components/dialog/index.d.ts +30 -30
  81. package/lib/components/dialog/src/index.vue.d.ts +2 -2
  82. package/lib/components/dialog-form/index.d.ts +2 -2
  83. package/lib/components/dialog-form/src/index.vue.d.ts +2 -2
  84. package/lib/components/display-item/index.d.ts +25 -25
  85. package/lib/components/display-item/src/index.vue.d.ts +7 -7
  86. package/lib/components/drawer-form/index.d.ts +50 -50
  87. package/lib/components/drawer-form/src/index.vue.d.ts +10 -10
  88. package/lib/components/form/index.d.ts +99 -99
  89. package/lib/components/form/src/form-content.vue.d.ts +12 -12
  90. package/lib/components/form/src/index.vue.d.ts +11 -11
  91. package/lib/components/form-item/index.d.ts +80 -80
  92. package/lib/components/form-item/src/index.vue.d.ts +9 -9
  93. package/lib/components/index.d.ts +1 -0
  94. package/lib/components/index.js +49 -39
  95. package/lib/components/input-tag/index.d.ts +6 -6
  96. package/lib/components/input-tag/src/index.vue.d.ts +6 -6
  97. package/lib/components/layout/index.d.ts +30 -30
  98. package/lib/components/layout/src/index.vue.d.ts +10 -10
  99. package/lib/components/page/index.d.ts +1613 -1123
  100. package/lib/components/page/src/index.vue.d.ts +618 -430
  101. package/lib/components/page/src/index.vue2.js +34 -13
  102. package/lib/components/popover/index.d.ts +49 -49
  103. package/lib/components/popover/src/index.vue.d.ts +3 -3
  104. package/lib/components/render/index.d.ts +14 -14
  105. package/lib/components/render/src/index.vue.d.ts +1 -1
  106. package/lib/components/search/index.d.ts +298 -298
  107. package/lib/components/search/src/index.vue.d.ts +84 -84
  108. package/lib/components/sidebar/index.d.ts +31 -31
  109. package/lib/components/sidebar/src/index.vue.d.ts +5 -5
  110. package/lib/components/table/index.d.ts +165 -180
  111. package/lib/components/table/index.js +6 -0
  112. package/lib/components/table/src/index.vue.d.ts +12 -21
  113. package/lib/components/table/src/index.vue2.js +10 -33
  114. package/lib/components/table/src/table-action-bar-content.vue.d.ts +78 -0
  115. package/lib/components/table/src/table-action-bar-content.vue.js +10 -0
  116. package/lib/components/table/src/table-action-bar-content.vue2.js +399 -0
  117. package/lib/components/table/src/table-action-bar.vue.d.ts +4 -4
  118. package/lib/components/table/src/table-action-bar.vue2.js +28 -351
  119. package/lib/components/table/src/table-column-drag-sort.vue.d.ts +1 -1
  120. package/lib/components/table/src/table-column-index.vue.d.ts +1 -1
  121. package/lib/components/table/src/table-column.vue.d.ts +22 -29
  122. package/lib/components/table/src/table-column.vue2.js +2 -55
  123. package/lib/components/table/src/table-title-bar.vue.d.ts +2 -2
  124. package/lib/components/table/src/type.d.ts +0 -11
  125. package/lib/components/table/src/use-columns.d.ts +26 -0
  126. package/lib/components/table/src/use-columns.js +42 -0
  127. package/lib/components/table-v2/index.d.ts +174 -0
  128. package/lib/components/table-v2/index.js +10 -0
  129. package/lib/components/table-v2/src/column-converter.d.ts +27 -0
  130. package/lib/components/table-v2/src/column-converter.js +44 -0
  131. package/lib/components/table-v2/src/index.vue.d.ts +157 -0
  132. package/lib/components/table-v2/src/index.vue.js +10 -0
  133. package/lib/components/table-v2/src/index.vue2.js +495 -0
  134. package/lib/components/table-v2/src/special-columns.d.ts +61 -0
  135. package/lib/components/table-v2/src/special-columns.js +80 -0
  136. package/lib/components/table-v2/src/table-v2-cell.d.ts +104 -0
  137. package/lib/components/table-v2/src/table-v2-cell.js +143 -0
  138. package/lib/components/table-v2/src/table-v2-header-cell.vue.d.ts +61 -0
  139. package/lib/components/table-v2/src/table-v2-header-cell.vue.js +10 -0
  140. package/lib/components/table-v2/src/table-v2-header-cell.vue2.js +96 -0
  141. package/lib/components/table-v2/src/type.d.ts +95 -0
  142. package/lib/components/table-v2/src/type.js +2 -0
  143. package/lib/components/table-v2/src/use-table-v2-columns.d.ts +43 -0
  144. package/lib/components/table-v2/src/use-table-v2-columns.js +51 -0
  145. package/lib/components/table-v2/style/css.d.ts +17 -0
  146. package/lib/components/table-v2/style/css.js +20 -0
  147. package/lib/components/table-v2/style/index.d.ts +17 -0
  148. package/lib/components/table-v2/style/index.js +20 -0
  149. package/lib/index.js +49 -39
  150. package/lib/version.d.ts +1 -1
  151. package/lib/version.js +1 -1
  152. package/locale/en.js +1 -1
  153. package/locale/en.min.js +1 -1
  154. package/locale/en.min.mjs +1 -1
  155. package/locale/en.mjs +1 -1
  156. package/locale/ja.js +1 -1
  157. package/locale/ja.min.js +1 -1
  158. package/locale/ja.min.mjs +1 -1
  159. package/locale/ja.mjs +1 -1
  160. package/locale/ko.js +1 -1
  161. package/locale/ko.min.js +1 -1
  162. package/locale/ko.min.mjs +1 -1
  163. package/locale/ko.mjs +1 -1
  164. package/locale/zh-cn.js +1 -1
  165. package/locale/zh-cn.min.js +1 -1
  166. package/locale/zh-cn.min.mjs +1 -1
  167. package/locale/zh-cn.mjs +1 -1
  168. package/locale/zh-hk.js +1 -1
  169. package/locale/zh-hk.min.js +1 -1
  170. package/locale/zh-hk.min.mjs +1 -1
  171. package/locale/zh-hk.mjs +1 -1
  172. package/locale/zh-tw.js +1 -1
  173. package/locale/zh-tw.min.js +1 -1
  174. package/locale/zh-tw.min.mjs +1 -1
  175. package/locale/zh-tw.mjs +1 -1
  176. package/package.json +1 -1
  177. package/theme-chalk/index.css +1 -1
  178. package/theme-chalk/plus-table-v2.css +1 -0
  179. package/theme-chalk/src/index.scss +1 -0
  180. package/theme-chalk/src/table-v2.scss +71 -0
package/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- /*! tabula-vue v1.0.0 */
2
- import { unref, isRef, ref, isReactive, watch, computed, inject, shallowRef, defineComponent, watchEffect, openBlock, createBlock, mergeProps, createSlots, withCtx, createElementVNode, renderSlot, normalizeStyle, createVNode, createTextVNode, toDisplayString, createElementBlock, normalizeClass, createCommentVNode, reactive, useAttrs, Fragment, renderList, resolveDynamicComponent, normalizeProps, guardReactiveProps, h, withDirectives, isVNode, withKeys, withModifiers, TransitionGroup, toHandlers, toRaw, provide, useSlots, getCurrentInstance, resolveComponent, onMounted, onBeforeUnmount, toRefs, nextTick } from 'vue';
3
- import { dayjs, localeContextKey, ElDialog, ElButton, ElPagination, ElRadioGroup, ElRadio, ElTableColumn, ElDropdown, ElDropdownMenu, ElDropdownItem, ElIcon, ElTooltip, ElPopconfirm, ElLink, ElMessageBox, useFormDisabled, ElDatePicker, ClickOutside, ElTag, ElInput, ElAutocomplete, ElCascader, ElCheckboxGroup, ElCheckbox, ElColorPicker, ElInputNumber, ElRadioButton, ElRate, ElSelect, ElOption, ElSlider, ElSwitch, ElTimePicker, ElTimeSelect, ElTransfer, ElTreeSelect, ElSelectV2, ElText, ElDivider, ElFormItem, ElOptionGroup, ElRow, ElCol, ElForm, ElCard, ElMessage, ElImage, ElProgress, ElAvatar, ElPopover, ElTable, vLoading, ElDescriptions, ElDescriptionsItem, ElDrawer, ElSteps, ElStep, ElBreadcrumb, ElBreadcrumbItem, ElMenuItem, ElSubMenu, ElMenu, ElScrollbar, ElHeader, ElContainer, ElMain, ElBacktop } from 'element-plus';
1
+ /*! tabula-vue v1.0.1 */
2
+ import { unref, isRef, ref, isReactive, watch, computed, inject, shallowRef, defineComponent, watchEffect, openBlock, createBlock, mergeProps, createSlots, withCtx, createElementVNode, renderSlot, normalizeStyle, createVNode, createTextVNode, toDisplayString, createElementBlock, normalizeClass, createCommentVNode, reactive, useAttrs, Fragment, renderList, resolveDynamicComponent, normalizeProps, guardReactiveProps, h, withDirectives, isVNode, withKeys, withModifiers, TransitionGroup, toHandlers, toRaw, provide, getCurrentInstance, resolveComponent, onMounted, onBeforeUnmount, toRefs, nextTick, useSlots } from 'vue';
3
+ import { dayjs, localeContextKey, ElDialog, ElButton, ElPagination, ElRadioGroup, ElRadio, ElDropdown, ElDropdownMenu, ElDropdownItem, ElIcon, ElTooltip, ElPopconfirm, ElLink, ElMessageBox, ElTableColumn, useFormDisabled, ElDatePicker, ClickOutside, ElTag, ElInput, ElAutocomplete, ElCascader, ElCheckboxGroup, ElCheckbox, ElColorPicker, ElInputNumber, ElRadioButton, ElRate, ElSelect, ElOption, ElSlider, ElSwitch, ElTimePicker, ElTimeSelect, ElTransfer, ElTreeSelect, ElSelectV2, ElText, ElDivider, ElFormItem, ElOptionGroup, ElRow, ElCol, ElForm, ElCard, ElMessage, ElImage, ElProgress, ElAvatar, ElPopover, ElTable, vLoading, TableV2FixedDir, ElAutoResizer, ElTableV2, ElEmpty, ElDescriptions, ElDescriptionsItem, ElDrawer, ElSteps, ElStep, ElBreadcrumb, ElBreadcrumbItem, ElMenuItem, ElSubMenu, ElMenu, ElScrollbar, ElHeader, ElContainer, ElMain, ElBacktop } from 'element-plus';
4
4
 
5
5
  const makeInstaller = (components = []) => {
6
6
  const install = (app) => {
@@ -347,7 +347,7 @@ var freeParseInt = parseInt;
347
347
  * _.toNumber('3.2');
348
348
  * // => 3.2
349
349
  */
350
- function toNumber(value) {
350
+ function toNumber$1(value) {
351
351
  if (typeof value == 'number') {
352
352
  return value;
353
353
  }
@@ -1543,7 +1543,7 @@ ListCache.prototype.has = listCacheHas;
1543
1543
  ListCache.prototype.set = listCacheSet;
1544
1544
 
1545
1545
  /* Built-in method references that are verified to be native. */
1546
- var Map = getNative(root$1, 'Map');
1546
+ var Map$1 = getNative(root$1, 'Map');
1547
1547
 
1548
1548
  /**
1549
1549
  * Removes all key-value entries from the map.
@@ -1556,7 +1556,7 @@ function mapCacheClear() {
1556
1556
  this.size = 0;
1557
1557
  this.__data__ = {
1558
1558
  'hash': new Hash,
1559
- 'map': new (Map || ListCache),
1559
+ 'map': new (Map$1 || ListCache),
1560
1560
  'string': new Hash
1561
1561
  };
1562
1562
  }
@@ -1994,7 +1994,7 @@ function stackSet(key, value) {
1994
1994
  var data = this.__data__;
1995
1995
  if (data instanceof ListCache) {
1996
1996
  var pairs = data.__data__;
1997
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1997
+ if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1998
1998
  pairs.push([key, value]);
1999
1999
  this.size = ++data.size;
2000
2000
  return this;
@@ -2244,7 +2244,7 @@ var DataView = getNative(root$1, 'DataView');
2244
2244
  var Promise$1 = getNative(root$1, 'Promise');
2245
2245
 
2246
2246
  /* Built-in method references that are verified to be native. */
2247
- var Set$1 = getNative(root$1, 'Set');
2247
+ var Set = getNative(root$1, 'Set');
2248
2248
 
2249
2249
  /** `Object#toString` result references. */
2250
2250
  var mapTag$4 = '[object Map]',
@@ -2257,9 +2257,9 @@ var dataViewTag$3 = '[object DataView]';
2257
2257
 
2258
2258
  /** Used to detect maps, sets, and weakmaps. */
2259
2259
  var dataViewCtorString = toSource(DataView),
2260
- mapCtorString = toSource(Map),
2260
+ mapCtorString = toSource(Map$1),
2261
2261
  promiseCtorString = toSource(Promise$1),
2262
- setCtorString = toSource(Set$1),
2262
+ setCtorString = toSource(Set),
2263
2263
  weakMapCtorString = toSource(WeakMap);
2264
2264
 
2265
2265
  /**
@@ -2273,9 +2273,9 @@ var getTag = baseGetTag;
2273
2273
 
2274
2274
  // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2275
2275
  if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3) ||
2276
- (Map && getTag(new Map) != mapTag$4) ||
2276
+ (Map$1 && getTag(new Map$1) != mapTag$4) ||
2277
2277
  (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
2278
- (Set$1 && getTag(new Set$1) != setTag$4) ||
2278
+ (Set && getTag(new Set) != setTag$4) ||
2279
2279
  (WeakMap && getTag(new WeakMap) != weakMapTag$1)) {
2280
2280
  getTag = function(value) {
2281
2281
  var result = baseGetTag(value),
@@ -3689,11 +3689,11 @@ function debounce(func, wait, options) {
3689
3689
  if (typeof func != 'function') {
3690
3690
  throw new TypeError(FUNC_ERROR_TEXT);
3691
3691
  }
3692
- wait = toNumber(wait) || 0;
3692
+ wait = toNumber$1(wait) || 0;
3693
3693
  if (isObject$1(options)) {
3694
3694
  leading = !!options.leading;
3695
3695
  maxing = 'maxWait' in options;
3696
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
3696
+ maxWait = maxing ? nativeMax(toNumber$1(options.maxWait) || 0, wait) : maxWait;
3697
3697
  trailing = 'trailing' in options ? !!options.trailing : trailing;
3698
3698
  }
3699
3699
 
@@ -4478,8 +4478,8 @@ function useTable(_pageInfo) {
4478
4478
  };
4479
4479
  }
4480
4480
 
4481
- const _hoisted_1$j = { class: "plus-dialog-body" };
4482
- var _sfc_main$u = /* @__PURE__ */ defineComponent({
4481
+ const _hoisted_1$k = { class: "plus-dialog-body" };
4482
+ var _sfc_main$x = /* @__PURE__ */ defineComponent({
4483
4483
  ...{
4484
4484
  name: "PlusDialog",
4485
4485
  inheritAttrs: false
@@ -4529,7 +4529,7 @@ var _sfc_main$u = /* @__PURE__ */ defineComponent({
4529
4529
  class: "plus-dialog"
4530
4530
  }, _ctx.$attrs), createSlots({
4531
4531
  default: withCtx(() => [
4532
- createElementVNode("div", _hoisted_1$j, [
4532
+ createElementVNode("div", _hoisted_1$k, [
4533
4533
  renderSlot(_ctx.$slots, "default")
4534
4534
  ])
4535
4535
  ]),
@@ -4601,25 +4601,25 @@ var _export_sfc = (sfc, props) => {
4601
4601
  return target;
4602
4602
  };
4603
4603
 
4604
- var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__file", "index.vue"]]);
4604
+ var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__file", "index.vue"]]);
4605
4605
 
4606
4606
  const PlusDialog = Dialog;
4607
4607
 
4608
- const _hoisted_1$i = /* @__PURE__ */ createElementVNode(
4608
+ const _hoisted_1$j = /* @__PURE__ */ createElementVNode(
4609
4609
  "span",
4610
4610
  null,
4611
4611
  null,
4612
4612
  -1
4613
4613
  /* HOISTED */
4614
4614
  );
4615
- const _hoisted_2$a = /* @__PURE__ */ createElementVNode(
4615
+ const _hoisted_2$9 = /* @__PURE__ */ createElementVNode(
4616
4616
  "span",
4617
4617
  null,
4618
4618
  null,
4619
4619
  -1
4620
4620
  /* HOISTED */
4621
4621
  );
4622
- var _sfc_main$t = /* @__PURE__ */ defineComponent({
4622
+ var _sfc_main$w = /* @__PURE__ */ defineComponent({
4623
4623
  ...{
4624
4624
  name: "PlusPagination"
4625
4625
  },
@@ -4661,7 +4661,7 @@ var _sfc_main$t = /* @__PURE__ */ defineComponent({
4661
4661
  },
4662
4662
  [
4663
4663
  _ctx.align === "right" || _ctx.align === "center" ? renderSlot(_ctx.$slots, "pagination-left", { key: 0 }, () => [
4664
- _hoisted_1$i
4664
+ _hoisted_1$j
4665
4665
  ]) : createCommentVNode("v-if", true),
4666
4666
  createVNode(unref(ElPagination), mergeProps({
4667
4667
  layout: "total, sizes, prev, pager, next, jumper",
@@ -4675,7 +4675,7 @@ var _sfc_main$t = /* @__PURE__ */ defineComponent({
4675
4675
  onCurrentChange: handleCurrentChange
4676
4676
  }), null, 16, ["current-page", "page-size", "total", "page-sizes"]),
4677
4677
  _ctx.align === "left" || _ctx.align === "center" ? renderSlot(_ctx.$slots, "pagination-right", { key: 1 }, () => [
4678
- _hoisted_2$a
4678
+ _hoisted_2$9
4679
4679
  ]) : createCommentVNode("v-if", true)
4680
4680
  ],
4681
4681
  2
@@ -4685,11 +4685,11 @@ var _sfc_main$t = /* @__PURE__ */ defineComponent({
4685
4685
  }
4686
4686
  });
4687
4687
 
4688
- var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "index.vue"]]);
4688
+ var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "index.vue"]]);
4689
4689
 
4690
4690
  const PlusPagination = Pagination;
4691
4691
 
4692
- var _sfc_main$s = /* @__PURE__ */ defineComponent({
4692
+ var _sfc_main$v = /* @__PURE__ */ defineComponent({
4693
4693
  ...{
4694
4694
  name: "PlusRadio"
4695
4695
  },
@@ -4874,7 +4874,7 @@ var _sfc_main$s = /* @__PURE__ */ defineComponent({
4874
4874
  }
4875
4875
  });
4876
4876
 
4877
- var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "index.vue"]]);
4877
+ var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__file", "index.vue"]]);
4878
4878
 
4879
4879
  const PlusRadio = Radio;
4880
4880
 
@@ -5115,26 +5115,25 @@ var user_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
5115
5115
  // src/components/user.vue
5116
5116
  var user_default = user_vue_vue_type_script_setup_true_lang_default;
5117
5117
 
5118
- const _hoisted_1$h = {
5118
+ const _hoisted_1$i = {
5119
5119
  key: 0,
5120
5120
  class: "plus-table-action-bar__dropdown__link"
5121
5121
  };
5122
- const _hoisted_2$9 = { class: "plus-table-action-bar__dropdown__link" };
5122
+ const _hoisted_2$8 = { class: "plus-table-action-bar__dropdown__link" };
5123
5123
  const _hoisted_3$4 = { class: "plus-table-action-bar__more-text" };
5124
- var _sfc_main$r = /* @__PURE__ */ defineComponent({
5124
+ var _sfc_main$u = /* @__PURE__ */ defineComponent({
5125
5125
  ...{
5126
- name: "PlusTableActionBar"
5126
+ name: "PlusTableActionBarContent"
5127
5127
  },
5128
- __name: "table-action-bar",
5128
+ __name: "table-action-bar-content",
5129
5129
  props: {
5130
- label: { default: "" },
5131
- fixed: { default: "right" },
5130
+ row: {},
5131
+ index: {},
5132
+ rest: { default: () => ({}) },
5132
5133
  showNumber: { type: [Number, Function], default: 3 },
5133
5134
  showLimitIncludeMore: { type: Boolean, default: false },
5134
5135
  type: { default: "link" },
5135
5136
  buttons: { default: () => [] },
5136
- width: { default: 200 },
5137
- actionBarTableColumnProps: { default: () => ({}) },
5138
5137
  confirmType: { default: "messageBox" },
5139
5138
  moreType: { default: "text" }
5140
5139
  },
@@ -5181,20 +5180,23 @@ var _sfc_main$r = /* @__PURE__ */ defineComponent({
5181
5180
  nextButtons: data.slice(showNumber)
5182
5181
  };
5183
5182
  };
5184
- const createCallbackParams = (params, e) => ({
5185
- /**
5186
- * 解析后的按钮数据中的text
5187
- * @version v0.1.17
5188
- */
5189
- text: params.text,
5190
- row: params.row,
5191
- buttonRow: params.buttonRow,
5192
- index: params.index,
5193
- rowIndex: params.index,
5194
- e,
5195
- formRefs: formRefs.value[params.index],
5196
- ...params.rest
5197
- });
5183
+ const createCallbackParams = (params, e) => {
5184
+ var _a;
5185
+ return {
5186
+ /**
5187
+ * 解析后的按钮数据中的text
5188
+ * @version v0.1.17
5189
+ */
5190
+ text: params.text,
5191
+ row: params.row,
5192
+ buttonRow: params.buttonRow,
5193
+ index: params.index,
5194
+ rowIndex: params.index,
5195
+ e,
5196
+ formRefs: (_a = formRefs == null ? void 0 : formRefs.value) == null ? void 0 : _a[params.index],
5197
+ ...params.rest
5198
+ };
5199
+ };
5198
5200
  const getConfirmMsg = (buttonRow, callbackParams) => {
5199
5201
  var _a, _b;
5200
5202
  let message = t("plus.table.confirmToPerformThisOperation");
@@ -5367,30 +5369,28 @@ var _sfc_main$r = /* @__PURE__ */ defineComponent({
5367
5369
  }
5368
5370
  };
5369
5371
  return (_ctx, _cache) => {
5370
- return openBlock(), createBlock(unref(ElTableColumn), mergeProps({
5371
- key: "actionBar",
5372
- "class-name": "plus-table-action-bar",
5373
- label: unref(_ctx.label) || unref(t)("plus.table.action"),
5374
- fixed: _ctx.fixed || "right",
5375
- width: _ctx.width || 200
5376
- }, _ctx.actionBarTableColumnProps), {
5377
- default: withCtx(({ row, $index, ...rest }) => [
5378
- createCommentVNode("\n \u7528\u5355\u5143\u7D20\u6570\u7EC4\u8BA9 getSubButtons \u6BCF\u884C\u53EA\u6267\u884C\u4E00\u6B21\uFF1A\n \u539F\u5148 preButtons / showMore / nextButtons \u5404\u8C03\u7528\u4E00\u6B21\uFF0C\n 500 \u884C \xD7 11 \u4E2A\u6309\u94AE \u2248 \u4E0A\u4E07\u6B21 show()\uFF08\u542B\u6743\u9650\u5224\u65AD\uFF09\u3002\n "),
5372
+ return openBlock(), createElementBlock(
5373
+ Fragment,
5374
+ null,
5375
+ [
5376
+ createCommentVNode("\n \u7528\u5355\u5143\u7D20\u6570\u7EC4\u8BA9 getSubButtons \u6BCF\u884C\u53EA\u6267\u884C\u4E00\u6B21\uFF1A\n preButtons / showMore / nextButtons \u5171\u7528\u540C\u4E00\u4EFD\u8BA1\u7B97\u7ED3\u679C\n "),
5379
5377
  (openBlock(true), createElementBlock(
5380
5378
  Fragment,
5381
5379
  null,
5382
- renderList([getSubButtons(row, $index)], (cell) => {
5380
+ renderList([getSubButtons(_ctx.row, _ctx.index)], (cell) => {
5383
5381
  return openBlock(), createElementBlock(
5384
5382
  Fragment,
5385
- { key: $index },
5383
+ {
5384
+ key: cell.preButtons.length
5385
+ },
5386
5386
  [
5387
5387
  createCommentVNode(" \u663E\u793A\u51FA\u6765\u7684\u6309\u94AE "),
5388
5388
  (openBlock(true), createElementBlock(
5389
5389
  Fragment,
5390
5390
  null,
5391
5391
  renderList(cell.preButtons, (buttonRow) => {
5392
- return openBlock(), createBlock(resolveDynamicComponent(render(row, buttonRow, $index, rest)), {
5393
- key: getButtonKey(buttonRow, row, $index)
5392
+ return openBlock(), createBlock(resolveDynamicComponent(render(_ctx.row, buttonRow, _ctx.index, _ctx.rest)), {
5393
+ key: getButtonKey(buttonRow, _ctx.row, _ctx.index)
5394
5394
  });
5395
5395
  }),
5396
5396
  128
@@ -5417,11 +5417,11 @@ var _sfc_main$r = /* @__PURE__ */ defineComponent({
5417
5417
  return openBlock(), createBlock(
5418
5418
  unref(ElDropdownItem),
5419
5419
  {
5420
- key: getButtonKey(buttonRow, row, $index)
5420
+ key: getButtonKey(buttonRow, _ctx.row, _ctx.index)
5421
5421
  },
5422
5422
  {
5423
5423
  default: withCtx(() => [
5424
- (openBlock(), createBlock(resolveDynamicComponent(render(row, buttonRow, $index, rest))))
5424
+ (openBlock(), createBlock(resolveDynamicComponent(render(_ctx.row, buttonRow, _ctx.index, _ctx.rest))))
5425
5425
  ]),
5426
5426
  _: 2
5427
5427
  /* DYNAMIC */
@@ -5442,7 +5442,7 @@ var _sfc_main$r = /* @__PURE__ */ defineComponent({
5442
5442
  )
5443
5443
  ]),
5444
5444
  default: withCtx(() => [
5445
- _ctx.moreType === "icon" ? (openBlock(), createElementBlock("span", _hoisted_1$h, [
5445
+ _ctx.moreType === "icon" ? (openBlock(), createElementBlock("span", _hoisted_1$i, [
5446
5446
  renderSlot(_ctx.$slots, "action-bar-more-icon", {}, () => [
5447
5447
  createVNode(unref(ElIcon), null, {
5448
5448
  default: withCtx(() => [
@@ -5457,7 +5457,7 @@ var _sfc_main$r = /* @__PURE__ */ defineComponent({
5457
5457
  { key: 1 },
5458
5458
  [
5459
5459
  createCommentVNode(" \u9ED8\u8BA4 "),
5460
- createElementVNode("span", _hoisted_2$9, [
5460
+ createElementVNode("span", _hoisted_2$8, [
5461
5461
  createElementVNode(
5462
5462
  "span",
5463
5463
  _hoisted_3$4,
@@ -5491,6 +5491,73 @@ var _sfc_main$r = /* @__PURE__ */ defineComponent({
5491
5491
  128
5492
5492
  /* KEYED_FRAGMENT */
5493
5493
  ))
5494
+ ],
5495
+ 2112
5496
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
5497
+ );
5498
+ };
5499
+ }
5500
+ });
5501
+
5502
+ var PlusTableActionBarContent = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__file", "table-action-bar-content.vue"]]);
5503
+
5504
+ var _sfc_main$t = /* @__PURE__ */ defineComponent({
5505
+ ...{
5506
+ name: "PlusTableActionBar"
5507
+ },
5508
+ __name: "table-action-bar",
5509
+ props: {
5510
+ label: { default: "" },
5511
+ fixed: { default: "right" },
5512
+ showNumber: { type: [Number, Function], default: 3 },
5513
+ showLimitIncludeMore: { type: Boolean, default: false },
5514
+ type: { default: "link" },
5515
+ buttons: { default: () => [] },
5516
+ width: { default: 200 },
5517
+ actionBarTableColumnProps: { default: () => ({}) },
5518
+ confirmType: { default: "messageBox" },
5519
+ moreType: { default: "text" }
5520
+ },
5521
+ emits: ["clickAction", "clickActionConfirmCancel"],
5522
+ setup(__props, { emit: __emit }) {
5523
+ const emit = __emit;
5524
+ const { t } = useLocale();
5525
+ const handleClickAction = (data) => emit("clickAction", data);
5526
+ const handleClickActionConfirmCancel = (data) => emit("clickActionConfirmCancel", data);
5527
+ return (_ctx, _cache) => {
5528
+ return openBlock(), createBlock(unref(ElTableColumn), mergeProps({
5529
+ key: "actionBar",
5530
+ "class-name": "plus-table-action-bar",
5531
+ label: unref(_ctx.label) || unref(t)("plus.table.action"),
5532
+ fixed: _ctx.fixed || "right",
5533
+ width: _ctx.width || 200
5534
+ }, _ctx.actionBarTableColumnProps), {
5535
+ default: withCtx(({ row, $index, ...rest }) => [
5536
+ createCommentVNode(" \u6309\u94AE\u5185\u5BB9\u903B\u8F91\u4E0E PlusTableV2 \u5171\u7528 "),
5537
+ createVNode(PlusTableActionBarContent, {
5538
+ row,
5539
+ index: $index,
5540
+ rest,
5541
+ type: _ctx.type,
5542
+ buttons: _ctx.buttons,
5543
+ "show-number": _ctx.showNumber,
5544
+ "show-limit-include-more": _ctx.showLimitIncludeMore,
5545
+ "confirm-type": _ctx.confirmType,
5546
+ "more-type": _ctx.moreType,
5547
+ onClickAction: handleClickAction,
5548
+ onClickActionConfirmCancel: handleClickActionConfirmCancel
5549
+ }, createSlots({
5550
+ _: 2
5551
+ /* DYNAMIC */
5552
+ }, [
5553
+ _ctx.$slots["action-bar-more-icon"] ? {
5554
+ name: "action-bar-more-icon",
5555
+ fn: withCtx(() => [
5556
+ renderSlot(_ctx.$slots, "action-bar-more-icon")
5557
+ ]),
5558
+ key: "0"
5559
+ } : void 0
5560
+ ]), 1032, ["row", "index", "rest", "type", "buttons", "show-number", "show-limit-include-more", "confirm-type", "more-type"])
5494
5561
  ]),
5495
5562
  _: 3
5496
5563
  /* FORWARDED */
@@ -5499,9 +5566,9 @@ var _sfc_main$r = /* @__PURE__ */ defineComponent({
5499
5566
  }
5500
5567
  });
5501
5568
 
5502
- var PlusTableActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "table-action-bar.vue"]]);
5569
+ var PlusTableActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "table-action-bar.vue"]]);
5503
5570
 
5504
- var _sfc_main$q = /* @__PURE__ */ defineComponent({
5571
+ var _sfc_main$s = /* @__PURE__ */ defineComponent({
5505
5572
  ...{
5506
5573
  name: "PlusRender"
5507
5574
  },
@@ -5571,12 +5638,12 @@ var _sfc_main$q = /* @__PURE__ */ defineComponent({
5571
5638
  }
5572
5639
  });
5573
5640
 
5574
- var Render = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "index.vue"]]);
5641
+ var Render = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "index.vue"]]);
5575
5642
 
5576
5643
  const PlusRender = Render;
5577
5644
 
5578
- const _hoisted_1$g = { class: "plus-date-picker__middle" };
5579
- var _sfc_main$p = /* @__PURE__ */ defineComponent({
5645
+ const _hoisted_1$h = { class: "plus-date-picker__middle" };
5646
+ var _sfc_main$r = /* @__PURE__ */ defineComponent({
5580
5647
  ...{
5581
5648
  name: "PlusDatePicker"
5582
5649
  },
@@ -5681,7 +5748,7 @@ var _sfc_main$p = /* @__PURE__ */ defineComponent({
5681
5748
  }), null, 16, ["modelValue", "type", "value-format", "placeholder", "disabled"]),
5682
5749
  createElementVNode(
5683
5750
  "span",
5684
- _hoisted_1$g,
5751
+ _hoisted_1$h,
5685
5752
  toDisplayString(_ctx.rangeSeparator),
5686
5753
  1
5687
5754
  /* TEXT */
@@ -5712,11 +5779,11 @@ var _sfc_main$p = /* @__PURE__ */ defineComponent({
5712
5779
  }
5713
5780
  });
5714
5781
 
5715
- var DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "index.vue"]]);
5782
+ var DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "index.vue"]]);
5716
5783
 
5717
5784
  const PlusDatePicker = DatePicker;
5718
5785
 
5719
- var _sfc_main$o = /* @__PURE__ */ defineComponent({
5786
+ var _sfc_main$q = /* @__PURE__ */ defineComponent({
5720
5787
  ...{
5721
5788
  name: "PlusInputTag"
5722
5789
  },
@@ -5853,7 +5920,7 @@ var _sfc_main$o = /* @__PURE__ */ defineComponent({
5853
5920
  }
5854
5921
  });
5855
5922
 
5856
- var InputTag = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__file", "index.vue"]]);
5923
+ var InputTag = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "index.vue"]]);
5857
5924
 
5858
5925
  const PlusInputTag = InputTag;
5859
5926
 
@@ -5950,9 +6017,9 @@ const hasFieldComponent = (valueType) => Object.keys(FieldComponentMap).includes
5950
6017
  );
5951
6018
  const getFieldComponent = (valueType) => Reflect.get(FieldComponentMap, valueType) || {};
5952
6019
 
5953
- const _hoisted_1$f = { class: "el-form-item__error" };
5954
- const _hoisted_2$8 = { class: "plus-form-item__label" };
5955
- var _sfc_main$n = /* @__PURE__ */ defineComponent({
6020
+ const _hoisted_1$g = { class: "el-form-item__error" };
6021
+ const _hoisted_2$7 = { class: "plus-form-item__label" };
6022
+ var _sfc_main$p = /* @__PURE__ */ defineComponent({
5956
6023
  ...{
5957
6024
  name: "PlusFormItem"
5958
6025
  },
@@ -6507,7 +6574,7 @@ var _sfc_main$n = /* @__PURE__ */ defineComponent({
6507
6574
  unref(isFunction)(_ctx.renderErrorMessage) ? {
6508
6575
  name: "error",
6509
6576
  fn: withCtx(({ error }) => [
6510
- createElementVNode("div", _hoisted_1$f, [
6577
+ createElementVNode("div", _hoisted_1$g, [
6511
6578
  (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderErrorMessage), mergeProps(props, {
6512
6579
  value: state.value,
6513
6580
  error,
@@ -6520,7 +6587,7 @@ var _sfc_main$n = /* @__PURE__ */ defineComponent({
6520
6587
  _ctx.hasLabel ? {
6521
6588
  name: "label",
6522
6589
  fn: withCtx(({ label: currentLabel }) => [
6523
- createElementVNode("span", _hoisted_2$8, [
6590
+ createElementVNode("span", _hoisted_2$7, [
6524
6591
  _ctx.renderLabel && unref(isFunction)(_ctx.renderLabel) ? (openBlock(), createElementBlock(
6525
6592
  Fragment,
6526
6593
  { key: 0 },
@@ -6578,11 +6645,11 @@ var _sfc_main$n = /* @__PURE__ */ defineComponent({
6578
6645
  }
6579
6646
  });
6580
6647
 
6581
- var FormItem = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "index.vue"]]);
6648
+ var FormItem = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "index.vue"]]);
6582
6649
 
6583
6650
  const PlusFormItem = FormItem;
6584
6651
 
6585
- var _sfc_main$m = /* @__PURE__ */ defineComponent({
6652
+ var _sfc_main$o = /* @__PURE__ */ defineComponent({
6586
6653
  ...{
6587
6654
  name: "PlusCollapseTransition"
6588
6655
  },
@@ -6633,17 +6700,17 @@ var _sfc_main$m = /* @__PURE__ */ defineComponent({
6633
6700
  }
6634
6701
  });
6635
6702
 
6636
- var PlusCollapseTransition = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "collapse-transition.vue"]]);
6703
+ var PlusCollapseTransition = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__file", "collapse-transition.vue"]]);
6637
6704
 
6638
- const _hoisted_1$e = {
6705
+ const _hoisted_1$f = {
6639
6706
  key: 0,
6640
6707
  class: "plus-form-item-previous"
6641
6708
  };
6642
- const _hoisted_2$7 = {
6709
+ const _hoisted_2$6 = {
6643
6710
  key: 1,
6644
6711
  class: "plus-form-item-extra"
6645
6712
  };
6646
- var _sfc_main$l = /* @__PURE__ */ defineComponent({
6713
+ var _sfc_main$n = /* @__PURE__ */ defineComponent({
6647
6714
  ...{
6648
6715
  name: "PlusFormContent"
6649
6716
  },
@@ -6708,7 +6775,7 @@ var _sfc_main$l = /* @__PURE__ */ defineComponent({
6708
6775
  {
6709
6776
  default: withCtx(() => [
6710
6777
  createCommentVNode(" el-form-item\u4E0A\u4E00\u884C\u7684\u5185\u5BB9 "),
6711
- item.renderPrevious || _ctx.$slots[unref(getPreviousSlotName)(item.prop)] ? (openBlock(), createElementBlock("div", _hoisted_1$e, [
6778
+ item.renderPrevious || _ctx.$slots[unref(getPreviousSlotName)(item.prop)] ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
6712
6779
  unref(isFunction)(item.renderPrevious) ? (openBlock(), createBlock(
6713
6780
  resolveDynamicComponent(item.renderPrevious),
6714
6781
  normalizeProps(mergeProps({ key: 0 }, item)),
@@ -6750,7 +6817,7 @@ var _sfc_main$l = /* @__PURE__ */ defineComponent({
6750
6817
  } : void 0
6751
6818
  ]), 1040, ["model-value", "clearable", "has-label", "onChange"]),
6752
6819
  createCommentVNode(" el-form-item \u4E0B\u4E00\u884C\u989D\u5916\u7684\u5185\u5BB9 "),
6753
- item.renderExtra || _ctx.$slots[unref(getExtraSlotName)(item.prop)] ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
6820
+ item.renderExtra || _ctx.$slots[unref(getExtraSlotName)(item.prop)] ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
6754
6821
  item.renderExtra && unref(isFunction)(item.renderExtra) ? (openBlock(), createBlock(
6755
6822
  resolveDynamicComponent(item.renderExtra),
6756
6823
  normalizeProps(mergeProps({ key: 0 }, item)),
@@ -6787,10 +6854,10 @@ var _sfc_main$l = /* @__PURE__ */ defineComponent({
6787
6854
  }
6788
6855
  });
6789
6856
 
6790
- var PlusFormContent = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__file", "form-content.vue"]]);
6857
+ var PlusFormContent = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "form-content.vue"]]);
6791
6858
 
6792
- const _hoisted_1$d = { class: "plus-form__group__item__icon" };
6793
- var _sfc_main$k = /* @__PURE__ */ defineComponent({
6859
+ const _hoisted_1$e = { class: "plus-form__group__item__icon" };
6860
+ var _sfc_main$m = /* @__PURE__ */ defineComponent({
6794
6861
  ...{
6795
6862
  name: "PlusForm",
6796
6863
  inheritAttrs: false
@@ -6940,7 +7007,7 @@ var _sfc_main$k = /* @__PURE__ */ defineComponent({
6940
7007
  icon: groupItem.icon,
6941
7008
  index
6942
7009
  }, () => [
6943
- createElementVNode("div", _hoisted_1$d, [
7010
+ createElementVNode("div", _hoisted_1$e, [
6944
7011
  groupItem.icon ? (openBlock(), createBlock(
6945
7012
  unref(ElIcon),
6946
7013
  { key: 0 },
@@ -7085,7 +7152,7 @@ var _sfc_main$k = /* @__PURE__ */ defineComponent({
7085
7152
  }
7086
7153
  });
7087
7154
 
7088
- var Form = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__file", "index.vue"]]);
7155
+ var Form = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "index.vue"]]);
7089
7156
 
7090
7157
  const PlusForm = Form;
7091
7158
 
@@ -7128,8 +7195,8 @@ const DisplayComponentMap = {
7128
7195
  const hasDisplayComponent = (valueType) => Object.keys(DisplayComponentMap).includes(valueType);
7129
7196
  const getDisplayComponent = (valueType) => Reflect.get(DisplayComponentMap, valueType) || {};
7130
7197
 
7131
- const _hoisted_1$c = ["innerHTML"];
7132
- const _hoisted_2$6 = { class: "plus-display-item" };
7198
+ const _hoisted_1$d = ["innerHTML"];
7199
+ const _hoisted_2$5 = { class: "plus-display-item" };
7133
7200
  const _hoisted_3$3 = /* @__PURE__ */ createElementVNode(
7134
7201
  "svg",
7135
7202
  {
@@ -7149,7 +7216,7 @@ const _hoisted_3$3 = /* @__PURE__ */ createElementVNode(
7149
7216
  -1
7150
7217
  /* HOISTED */
7151
7218
  );
7152
- var _sfc_main$j = /* @__PURE__ */ defineComponent({
7219
+ var _sfc_main$l = /* @__PURE__ */ defineComponent({
7153
7220
  ...{
7154
7221
  name: "PlusDisplayItem"
7155
7222
  },
@@ -7520,7 +7587,7 @@ var _sfc_main$j = /* @__PURE__ */ defineComponent({
7520
7587
  createElementVNode("span", {
7521
7588
  class: "plus-display-item",
7522
7589
  innerHTML: _ctx.column.renderHTML(displayValue.value, renderParams.value)
7523
- }, null, 8, _hoisted_1$c)
7590
+ }, null, 8, _hoisted_1$d)
7524
7591
  ],
7525
7592
  2112
7526
7593
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
@@ -7649,7 +7716,7 @@ var _sfc_main$j = /* @__PURE__ */ defineComponent({
7649
7716
  { key: 5 },
7650
7717
  [
7651
7718
  createCommentVNode(" \u590D\u5236 "),
7652
- createElementVNode("span", _hoisted_2$6, [
7719
+ createElementVNode("span", _hoisted_2$5, [
7653
7720
  createTextVNode(
7654
7721
  toDisplayString(formatterValue.value) + " ",
7655
7722
  1
@@ -7787,13 +7854,12 @@ var _sfc_main$j = /* @__PURE__ */ defineComponent({
7787
7854
  }
7788
7855
  });
7789
7856
 
7790
- var DisplayItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__file", "index.vue"]]);
7857
+ var DisplayItem = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__file", "index.vue"]]);
7791
7858
 
7792
7859
  const PlusDisplayItem = DisplayItem;
7793
7860
 
7794
- const _hoisted_1$b = { class: "plus-table-column__header" };
7795
- const _hoisted_2$5 = { class: "plus-display-item" };
7796
- var _sfc_main$i = /* @__PURE__ */ defineComponent({
7861
+ const _hoisted_1$c = { class: "plus-table-column__header" };
7862
+ var _sfc_main$k = /* @__PURE__ */ defineComponent({
7797
7863
  ...{
7798
7864
  name: "PlusTableColumn"
7799
7865
  },
@@ -7803,14 +7869,12 @@ var _sfc_main$i = /* @__PURE__ */ defineComponent({
7803
7869
  editable: { type: [Boolean, String], default: false },
7804
7870
  tableDataLength: { default: 0 },
7805
7871
  subPageInfo: { default: () => ({}) },
7806
- emptyValue: { default: void 0 },
7807
- plainTextCell: { type: Boolean, default: false }
7872
+ emptyValue: { default: void 0 }
7808
7873
  },
7809
7874
  emits: ["formChange"],
7810
7875
  setup(__props, { expose: __expose, emit: __emit }) {
7811
7876
  const props = __props;
7812
7877
  const emit = __emit;
7813
- const slots = useSlots();
7814
7878
  const instance = getCurrentInstance();
7815
7879
  const store = computed(() => {
7816
7880
  var _a;
@@ -7829,36 +7893,6 @@ var _sfc_main$i = /* @__PURE__ */ defineComponent({
7829
7893
  );
7830
7894
  const plusDisplayItemInstance = ref();
7831
7895
  const formRefs = inject(TableFormRefInjectionKey);
7832
- const PLAIN_VALUE_TYPE_SET = /* @__PURE__ */ new Set([void 0, "", "input"]);
7833
- const isPlainColumn = (item) => {
7834
- if (!props.plainTextCell) return false;
7835
- if (props.editable !== false) return false;
7836
- if (item.editable === true) return false;
7837
- if (!PLAIN_VALUE_TYPE_SET.has(item.valueType)) return false;
7838
- if (item.render || item.renderHTML || item.formatter || item.customGetStatus) return false;
7839
- if (item.fieldProps !== void 0 && item.fieldProps !== null) return false;
7840
- if (item.formProps !== void 0 && item.formProps !== null) return false;
7841
- if (item.fieldSlots && Object.keys(item.fieldSlots).length) return false;
7842
- if (slots && slots[getTableCellSlotName(item.prop)]) return false;
7843
- return true;
7844
- };
7845
- const plainColumnSet = computed(() => {
7846
- const set2 = /* @__PURE__ */ new Set();
7847
- props.columns.forEach((item) => {
7848
- var _a;
7849
- if ((_a = item.children) == null ? void 0 : _a.length) return;
7850
- if (isPlainColumn(item)) set2.add(item);
7851
- });
7852
- return set2;
7853
- });
7854
- const getPlainValue = (item, row) => {
7855
- var _a, _b;
7856
- const value = getValue(row, item.prop);
7857
- if (value === null || value === void 0 || value === "") {
7858
- return (_b = (_a = item.emptyValue) != null ? _a : props.emptyValue) != null ? _b : "";
7859
- }
7860
- return value;
7861
- };
7862
7896
  const setFormRef = () => {
7863
7897
  var _a, _b;
7864
7898
  if (!((_a = plusDisplayItemInstance.value) == null ? void 0 : _a.length)) return;
@@ -7871,11 +7905,7 @@ var _sfc_main$i = /* @__PURE__ */ defineComponent({
7871
7905
  set(formRefs.value[item.rowIndex], item.cellIndex, item);
7872
7906
  }
7873
7907
  };
7874
- const needFormRefs = computed(
7875
- () => props.editable !== false || !props.plainTextCell || props.columns.some((item) => item.editable === true)
7876
- );
7877
7908
  const cellInstanceSignature = computed(() => {
7878
- if (!needFormRefs.value) return "";
7879
7909
  const list = plusDisplayItemInstance.value;
7880
7910
  if (!(list == null ? void 0 : list.length)) return "";
7881
7911
  return list.map((item) => {
@@ -7886,7 +7916,6 @@ var _sfc_main$i = /* @__PURE__ */ defineComponent({
7886
7916
  watch(
7887
7917
  () => [props.tableDataLength, cellInstanceSignature.value, props.subPageInfo],
7888
7918
  () => {
7889
- if (!needFormRefs.value) return;
7890
7919
  setFormRef();
7891
7920
  },
7892
7921
  {
@@ -7928,7 +7957,7 @@ var _sfc_main$i = /* @__PURE__ */ defineComponent({
7928
7957
  "min-width": item.minWidth
7929
7958
  }), {
7930
7959
  header: withCtx((scoped) => [
7931
- createElementVNode("span", _hoisted_1$b, [
7960
+ createElementVNode("span", _hoisted_1$c, [
7932
7961
  item.renderHeader && unref(isFunction)(item.renderHeader) ? (openBlock(), createBlock(unref(PlusRender), {
7933
7962
  key: 0,
7934
7963
  render: item.renderHeader,
@@ -8021,23 +8050,8 @@ var _sfc_main$i = /* @__PURE__ */ defineComponent({
8021
8050
  ],
8022
8051
  64
8023
8052
  /* STABLE_FRAGMENT */
8024
- )) : plainColumnSet.value.has(item) ? (openBlock(), createElementBlock(
8025
- Fragment,
8026
- { key: 1 },
8027
- [
8028
- createCommentVNode(" \u7EAF\u6587\u672C\u5217\u5FEB\u8DEF\u5F84\uFF1A\u4E0D\u521B\u5EFA\u7EC4\u4EF6\u5B9E\u4F8B\u3001\u4E0D\u6CE8\u518C\u4EFB\u4F55 watcher "),
8029
- createElementVNode(
8030
- "span",
8031
- _hoisted_2$5,
8032
- toDisplayString(getPlainValue(item, row)),
8033
- 1
8034
- /* TEXT */
8035
- )
8036
- ],
8037
- 2112
8038
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
8039
8053
  )) : (openBlock(), createBlock(unref(PlusDisplayItem), {
8040
- key: 2,
8054
+ key: 1,
8041
8055
  ref_for: true,
8042
8056
  ref_key: "plusDisplayItemInstance",
8043
8057
  ref: plusDisplayItemInstance,
@@ -8074,9 +8088,9 @@ var _sfc_main$i = /* @__PURE__ */ defineComponent({
8074
8088
  }
8075
8089
  });
8076
8090
 
8077
- var PlusTableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "table-column.vue"]]);
8091
+ var PlusTableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__file", "table-column.vue"]]);
8078
8092
 
8079
- var _sfc_main$h = /* @__PURE__ */ defineComponent({
8093
+ var _sfc_main$j = /* @__PURE__ */ defineComponent({
8080
8094
  ...{
8081
8095
  name: "PlusTableTableColumnIndex"
8082
8096
  },
@@ -8150,7 +8164,7 @@ var _sfc_main$h = /* @__PURE__ */ defineComponent({
8150
8164
  }
8151
8165
  });
8152
8166
 
8153
- var PlusTableTableColumnIndex = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "table-column-index.vue"]]);
8167
+ var PlusTableTableColumnIndex = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__file", "table-column-index.vue"]]);
8154
8168
 
8155
8169
  /**!
8156
8170
  * Sortable 1.15.0
@@ -11172,8 +11186,8 @@ _extends(Remove, {
11172
11186
  Sortable.mount(new AutoScrollPlugin());
11173
11187
  Sortable.mount(Remove, Revert);
11174
11188
 
11175
- const _hoisted_1$a = { class: "plus-table-column-drag-icon" };
11176
- var _sfc_main$g = /* @__PURE__ */ defineComponent({
11189
+ const _hoisted_1$b = { class: "plus-table-column-drag-icon" };
11190
+ var _sfc_main$i = /* @__PURE__ */ defineComponent({
11177
11191
  ...{
11178
11192
  name: "PlusTableColumnDragSort"
11179
11193
  },
@@ -11224,7 +11238,7 @@ var _sfc_main$g = /* @__PURE__ */ defineComponent({
11224
11238
  "class-name": "plus-table-column-drag-sort"
11225
11239
  }, _ctx.dragSortableTableColumnProps), {
11226
11240
  default: withCtx(() => [
11227
- createElementVNode("span", _hoisted_1$a, [
11241
+ createElementVNode("span", _hoisted_1$b, [
11228
11242
  renderSlot(_ctx.$slots, "drag-sort-icon", {}, () => [
11229
11243
  createTextVNode("\u2637")
11230
11244
  ])
@@ -11237,13 +11251,13 @@ var _sfc_main$g = /* @__PURE__ */ defineComponent({
11237
11251
  }
11238
11252
  });
11239
11253
 
11240
- var PlusTableColumnDragSort = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "table-column-drag-sort.vue"]]);
11254
+ var PlusTableColumnDragSort = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "table-column-drag-sort.vue"]]);
11241
11255
 
11242
- const _hoisted_1$9 = {
11256
+ const _hoisted_1$a = {
11243
11257
  key: 0,
11244
11258
  style: { "padding-top": "12px" }
11245
11259
  };
11246
- var _sfc_main$f = /* @__PURE__ */ defineComponent({
11260
+ var _sfc_main$h = /* @__PURE__ */ defineComponent({
11247
11261
  ...{
11248
11262
  name: "PlusPopover"
11249
11263
  },
@@ -11289,7 +11303,7 @@ var _sfc_main$f = /* @__PURE__ */ defineComponent({
11289
11303
  ]),
11290
11304
  default: withCtx(() => [
11291
11305
  renderSlot(_ctx.$slots, "default"),
11292
- _ctx.hasShowBottomButton ? (openBlock(), createElementBlock("div", _hoisted_1$9, [
11306
+ _ctx.hasShowBottomButton ? (openBlock(), createElementBlock("div", _hoisted_1$a, [
11293
11307
  createVNode(unref(ElButton), {
11294
11308
  size: "small",
11295
11309
  plain: "",
@@ -11330,11 +11344,11 @@ var _sfc_main$f = /* @__PURE__ */ defineComponent({
11330
11344
  }
11331
11345
  });
11332
11346
 
11333
- var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__file", "index.vue"]]);
11347
+ var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "index.vue"]]);
11334
11348
 
11335
11349
  const PlusPopover = Popover;
11336
11350
 
11337
- const _hoisted_1$8 = { class: "plus-table-title-bar" };
11351
+ const _hoisted_1$9 = { class: "plus-table-title-bar" };
11338
11352
  const _hoisted_2$4 = { class: "plus-table-title-bar__title" };
11339
11353
  const _hoisted_3$2 = { class: "plus-table-title-bar__toolbar" };
11340
11354
  const _hoisted_4$2 = { class: "plus-table-title-bar__toolbar__density" };
@@ -11360,7 +11374,7 @@ const _hoisted_7$1 = {
11360
11374
  };
11361
11375
  const _hoisted_8$1 = { key: 1 };
11362
11376
  const _hoisted_9$1 = { key: 1 };
11363
- var _sfc_main$e = /* @__PURE__ */ defineComponent({
11377
+ var _sfc_main$g = /* @__PURE__ */ defineComponent({
11364
11378
  ...{
11365
11379
  name: "PlusTableToolbar"
11366
11380
  },
@@ -11511,7 +11525,7 @@ var _sfc_main$e = /* @__PURE__ */ defineComponent({
11511
11525
  });
11512
11526
  return (_ctx, _cache) => {
11513
11527
  var _a, _b, _c;
11514
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
11528
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [
11515
11529
  createElementVNode("div", _hoisted_2$4, [
11516
11530
  renderSlot(_ctx.$slots, "title", {}, () => [
11517
11531
  createTextVNode(
@@ -11813,10 +11827,46 @@ var _sfc_main$e = /* @__PURE__ */ defineComponent({
11813
11827
  }
11814
11828
  });
11815
11829
 
11816
- var PlusTableTitleBar = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__file", "table-title-bar.vue"]]);
11830
+ var PlusTableTitleBar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "table-title-bar.vue"]]);
11831
+
11832
+ const useTableColumns = ({ columns, skipEqual = true }) => {
11833
+ const filterColumns = shallowRef([]);
11834
+ const subColumns = shallowRef([]);
11835
+ const columnsIsChange = ref(false);
11836
+ const resolveSubColumns = (list) => list.filter((item) => unref(item.hideInTable) !== true && item.headerIsChecked !== false);
11837
+ watch(
11838
+ columns,
11839
+ (val, oldVal) => {
11840
+ if (skipEqual && oldVal && isEqual(val, oldVal)) return;
11841
+ const filterOriginColumns = val.filter((item) => unref(item.hideInTable) !== true);
11842
+ filterColumns.value = filterOriginColumns.map((item) => {
11843
+ var _a;
11844
+ return {
11845
+ ...item,
11846
+ headerIsChecked: (_a = item.headerIsChecked) != null ? _a : true
11847
+ };
11848
+ });
11849
+ subColumns.value = filterOriginColumns.filter((item) => unref(item.headerIsChecked) !== false);
11850
+ columnsIsChange.value = !columnsIsChange.value;
11851
+ },
11852
+ {
11853
+ immediate: true
11854
+ }
11855
+ );
11856
+ const setFilterColumns = (_columns) => {
11857
+ filterColumns.value = _columns;
11858
+ subColumns.value = resolveSubColumns(_columns);
11859
+ };
11860
+ return {
11861
+ filterColumns,
11862
+ subColumns,
11863
+ columnsIsChange,
11864
+ setFilterColumns
11865
+ };
11866
+ };
11817
11867
 
11818
- const _hoisted_1$7 = { class: "plus-table-expand-col" };
11819
- var _sfc_main$d = /* @__PURE__ */ defineComponent({
11868
+ const _hoisted_1$8 = { class: "plus-table-expand-col" };
11869
+ var _sfc_main$f = /* @__PURE__ */ defineComponent({
11820
11870
  ...{
11821
11871
  name: "PlusTable",
11822
11872
  inheritAttrs: false
@@ -11857,8 +11907,7 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
11857
11907
  editable: { type: [Boolean, String], default: false },
11858
11908
  adaptive: { type: [Boolean, Object], default: false },
11859
11909
  filterTableHeaderOverflowLabelLength: {},
11860
- emptyValue: { default: void 0 },
11861
- plainTextCell: { type: Boolean, default: false }
11910
+ emptyValue: { default: void 0 }
11862
11911
  },
11863
11912
  emits: ["paginationChange", "clickAction", "clickActionConfirmCancel", "dragSortEnd", "formChange", "refresh", "edited", "cell-click", "cell-dblclick", "filterTableHeader", "radioChange"],
11864
11913
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -11866,9 +11915,6 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
11866
11915
  const props = __props;
11867
11916
  const emit = __emit;
11868
11917
  const radioRow = ref();
11869
- const subColumns = shallowRef([]);
11870
- const columnsIsChange = ref(false);
11871
- const filterColumns = shallowRef([]);
11872
11918
  const tableInstance = shallowRef(null);
11873
11919
  const tableWrapperInstance = ref(null);
11874
11920
  const paginationInstance = ref(null);
@@ -11911,25 +11957,9 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
11911
11957
  provide(TableFormRefInjectionKey, formRefs);
11912
11958
  const formFieldRefs = shallowRef({});
11913
11959
  provide(TableFormFieldRefInjectionKey, formFieldRefs);
11914
- watch(
11915
- () => props.columns,
11916
- (val, oldVal) => {
11917
- if (oldVal && isEqual(val, oldVal)) return;
11918
- const filterOriginColumns = val.filter((item) => unref(item.hideInTable) !== true);
11919
- filterColumns.value = filterOriginColumns.map((item) => {
11920
- var _a2;
11921
- return {
11922
- ...item,
11923
- headerIsChecked: (_a2 = item.headerIsChecked) != null ? _a2 : true
11924
- };
11925
- });
11926
- subColumns.value = filterOriginColumns.filter((item) => unref(item.headerIsChecked) !== false);
11927
- columnsIsChange.value = !columnsIsChange.value;
11928
- },
11929
- {
11930
- immediate: true
11931
- }
11932
- );
11960
+ const { subColumns, filterColumns, columnsIsChange, setFilterColumns } = useTableColumns({
11961
+ columns: () => props.columns
11962
+ });
11933
11963
  watch(
11934
11964
  () => props.defaultSelectedRadioRow,
11935
11965
  (val) => {
@@ -11949,11 +11979,8 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
11949
11979
  emit("clickActionConfirmCancel", callbackParams);
11950
11980
  };
11951
11981
  const handleFilterTableConfirm = (_columns, eventType) => {
11952
- filterColumns.value = _columns;
11982
+ setFilterColumns(_columns);
11953
11983
  emit("filterTableHeader", _columns, eventType);
11954
- subColumns.value = _columns.filter(
11955
- (item) => unref(item.hideInTable) !== true && item.headerIsChecked !== false
11956
- );
11957
11984
  };
11958
11985
  const handleClickDensity = (size2) => {
11959
11986
  state.size = size2;
@@ -12069,9 +12096,9 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
12069
12096
  _ctx.titleBar ? (openBlock(), createBlock(PlusTableTitleBar, {
12070
12097
  key: 0,
12071
12098
  "origin-columns": _ctx.columns,
12072
- columns: filterColumns.value,
12099
+ columns: unref(filterColumns),
12073
12100
  "default-size": unref(size),
12074
- "columns-is-change": columnsIsChange.value,
12101
+ "columns-is-change": unref(columnsIsChange),
12075
12102
  "title-bar": _ctx.titleBar,
12076
12103
  onClickDensity: handleClickDensity,
12077
12104
  onFilterTableHeader: handleFilterTableConfirm,
@@ -12200,7 +12227,7 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
12200
12227
  }, _ctx.expandTableColumnProps),
12201
12228
  {
12202
12229
  default: withCtx((scoped) => [
12203
- createElementVNode("div", _hoisted_1$7, [
12230
+ createElementVNode("div", _hoisted_1$8, [
12204
12231
  renderSlot(_ctx.$slots, "expand", mergeProps({
12205
12232
  index: scoped.$index
12206
12233
  }, scoped))
@@ -12223,12 +12250,11 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
12223
12250
  renderSlot(_ctx.$slots, "default", {}, () => [
12224
12251
  createCommentVNode("\u914D\u7F6E\u6E32\u67D3\u680F "),
12225
12252
  createVNode(PlusTableColumn, {
12226
- columns: subColumns.value,
12253
+ columns: unref(subColumns),
12227
12254
  editable: _ctx.editable,
12228
12255
  "sub-page-info": unref(subPageInfo),
12229
12256
  "table-data-length": tableDataLength.value,
12230
12257
  "empty-value": _ctx.emptyValue,
12231
- "plain-text-cell": _ctx.plainTextCell,
12232
12258
  onFormChange: handleFormChange
12233
12259
  }, createSlots({
12234
12260
  _: 2
@@ -12242,7 +12268,7 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
12242
12268
  ])
12243
12269
  };
12244
12270
  })
12245
- ]), 1032, ["columns", "editable", "sub-page-info", "table-data-length", "empty-value", "plain-text-cell"])
12271
+ ]), 1032, ["columns", "editable", "sub-page-info", "table-data-length", "empty-value"])
12246
12272
  ]),
12247
12273
  createCommentVNode(" \u64CD\u4F5C\u680F "),
12248
12274
  _ctx.actionBar ? (openBlock(), createBlock(
@@ -12312,10 +12338,851 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
12312
12338
  }
12313
12339
  });
12314
12340
 
12315
- var _Table = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "index.vue"]]);
12341
+ var _Table = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__file", "index.vue"]]);
12316
12342
 
12317
12343
  const PlusTable = _Table;
12318
12344
 
12345
+ const _hoisted_1$7 = { class: "plus-table-v2-header" };
12346
+ var _sfc_main$e = /* @__PURE__ */ defineComponent({
12347
+ ...{
12348
+ name: "PlusTableV2HeaderCell"
12349
+ },
12350
+ __name: "table-v2-header-cell",
12351
+ props: {
12352
+ column: {},
12353
+ cellIndex: {}
12354
+ },
12355
+ setup(__props) {
12356
+ const props = __props;
12357
+ const labelText = computed(() => getLabel(props.column.label));
12358
+ return (_ctx, _cache) => {
12359
+ return openBlock(), createElementBlock(
12360
+ Fragment,
12361
+ null,
12362
+ [
12363
+ createCommentVNode(" \u8868\u5934\u5355\u5143\u683C\uFF1A\u4E0E el-table \u7248\u672C\u7684 PlusTableColumn header \u903B\u8F91\u4FDD\u6301\u4E00\u81F4 "),
12364
+ createElementVNode("span", _hoisted_1$7, [
12365
+ _ctx.column.renderHeader && unref(isFunction)(_ctx.column.renderHeader) ? (openBlock(), createBlock(unref(PlusRender), {
12366
+ key: 0,
12367
+ render: _ctx.column.renderHeader,
12368
+ params: { column: _ctx.column, cellIndex: _ctx.cellIndex },
12369
+ "callback-value": labelText.value
12370
+ }, null, 8, ["render", "params", "callback-value"])) : (openBlock(), createElementBlock(
12371
+ Fragment,
12372
+ { key: 1 },
12373
+ [
12374
+ createCommentVNode("\u8868\u683C\u5355\u5143\u683C Header \u7684\u63D2\u69FD "),
12375
+ renderSlot(_ctx.$slots, unref(getTableHeaderSlotName)(_ctx.column.prop), {
12376
+ prop: _ctx.column.prop,
12377
+ label: labelText.value,
12378
+ fieldProps: _ctx.column.fieldProps,
12379
+ valueType: _ctx.column.valueType,
12380
+ cellIndex: _ctx.cellIndex,
12381
+ column: _ctx.column
12382
+ }, () => [
12383
+ createTextVNode(
12384
+ toDisplayString(labelText.value),
12385
+ 1
12386
+ /* TEXT */
12387
+ )
12388
+ ])
12389
+ ],
12390
+ 2112
12391
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
12392
+ )),
12393
+ _ctx.column.tooltip ? (openBlock(), createBlock(
12394
+ unref(ElTooltip),
12395
+ mergeProps({
12396
+ key: 2,
12397
+ placement: "top"
12398
+ }, unref(getTooltip)(_ctx.column.tooltip)),
12399
+ {
12400
+ default: withCtx(() => [
12401
+ renderSlot(_ctx.$slots, "tooltip-icon", {}, () => [
12402
+ createVNode(unref(ElIcon), {
12403
+ class: "plus-table-v2-header__icon",
12404
+ size: 16
12405
+ }, {
12406
+ default: withCtx(() => [
12407
+ createVNode(unref(question_filled_default))
12408
+ ]),
12409
+ _: 1
12410
+ /* STABLE */
12411
+ })
12412
+ ])
12413
+ ]),
12414
+ _: 3
12415
+ /* FORWARDED */
12416
+ },
12417
+ 16
12418
+ /* FULL_PROPS */
12419
+ )) : createCommentVNode("v-if", true)
12420
+ ])
12421
+ ],
12422
+ 2112
12423
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
12424
+ );
12425
+ };
12426
+ }
12427
+ });
12428
+
12429
+ var TableV2HeaderCell = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__file", "table-v2-header-cell.vue"]]);
12430
+
12431
+ const buildDataColumns = ({
12432
+ columns,
12433
+ renderCell,
12434
+ slots
12435
+ }) => {
12436
+ const headerSlots = {};
12437
+ Object.keys(slots || {}).forEach((key) => {
12438
+ if (key.startsWith("plus-header-") || key === "tooltip-icon") {
12439
+ headerSlots[key] = slots == null ? void 0 : slots[key];
12440
+ }
12441
+ });
12442
+ return columns.filter((col) => {
12443
+ var _a;
12444
+ return !((_a = col.children) == null ? void 0 : _a.length);
12445
+ }).map((col, columnIndex) => {
12446
+ const tableColumnProps = col.tableColumnProps || {};
12447
+ const fixed = tableColumnProps.fixed === true ? "left" : tableColumnProps.fixed;
12448
+ return {
12449
+ key: getTableKey(col, true),
12450
+ dataKey: col.prop,
12451
+ title: getLabel(col.label),
12452
+ width: typeof col.width === "number" ? col.width : Number(col.width) || void 0,
12453
+ minWidth: typeof col.minWidth === "number" ? col.minWidth : Number(col.minWidth) || void 0,
12454
+ fixed,
12455
+ align: tableColumnProps.align,
12456
+ class: tableColumnProps.className,
12457
+ cellRenderer: ({ rowData, rowIndex }) => renderCell({
12458
+ column: col,
12459
+ row: rowData,
12460
+ rowIndex,
12461
+ columnIndex
12462
+ }),
12463
+ headerCellRenderer: () => h(TableV2HeaderCell, { column: col, cellIndex: columnIndex }, headerSlots)
12464
+ };
12465
+ });
12466
+ };
12467
+
12468
+ const toNumber = (value, fallback) => {
12469
+ const num = Number(value);
12470
+ return Number.isFinite(num) && num > 0 ? num : fallback;
12471
+ };
12472
+ const buildIndexColumn = ({
12473
+ pageInfo,
12474
+ indexContentStyle,
12475
+ columnProps = {}
12476
+ }) => {
12477
+ const getIndex = isNumber(columnProps.index) ? () => columnProps.index : isFunction(columnProps.index) ? columnProps.index : (index) => (((pageInfo == null ? void 0 : pageInfo.page) || 1) - 1) * ((pageInfo == null ? void 0 : pageInfo.pageSize) || 10) + index + 1;
12478
+ const resolveStyle = (row, index) => {
12479
+ if (isFunction(indexContentStyle)) return indexContentStyle(row, index);
12480
+ if (isPlainObject(indexContentStyle)) return indexContentStyle;
12481
+ return {};
12482
+ };
12483
+ return {
12484
+ key: "index",
12485
+ title: "#",
12486
+ width: toNumber(columnProps.width, 60),
12487
+ fixed: TableV2FixedDir.LEFT,
12488
+ align: "center",
12489
+ cellRenderer: ({ rowData, rowIndex }) => h("div", { class: "plus-table-v2-index", style: resolveStyle(rowData, rowIndex) }, [
12490
+ String(getIndex(rowIndex))
12491
+ ])
12492
+ };
12493
+ };
12494
+ const buildRadioColumn = ({
12495
+ radioRow,
12496
+ onChange,
12497
+ radioProps,
12498
+ columnProps = {}
12499
+ }) => ({
12500
+ key: "radio",
12501
+ title: "",
12502
+ width: toNumber(columnProps.width, 50),
12503
+ fixed: TableV2FixedDir.LEFT,
12504
+ align: "center",
12505
+ cellRenderer: ({ rowData }) => h(PlusRadio, {
12506
+ modelValue: isEqual(radioRow(), rowData),
12507
+ options: [{ value: true }],
12508
+ ...radioProps,
12509
+ onChange: (value) => onChange(value, rowData)
12510
+ })
12511
+ });
12512
+ const buildSelectionColumn = ({
12513
+ isSelected,
12514
+ isAllSelected,
12515
+ isIndeterminate,
12516
+ onToggleRow,
12517
+ onToggleAll,
12518
+ columnProps = {}
12519
+ }) => ({
12520
+ key: "selection",
12521
+ title: "",
12522
+ width: toNumber(columnProps.width, 40),
12523
+ fixed: TableV2FixedDir.LEFT,
12524
+ align: "center",
12525
+ headerCellRenderer: () => h(ElCheckbox, {
12526
+ modelValue: isAllSelected(),
12527
+ indeterminate: isIndeterminate(),
12528
+ "onUpdate:modelValue": (checked) => onToggleAll(Boolean(checked))
12529
+ }),
12530
+ cellRenderer: ({ rowData }) => h(ElCheckbox, {
12531
+ modelValue: isSelected(rowData),
12532
+ "onUpdate:modelValue": (checked) => onToggleRow(rowData, Boolean(checked))
12533
+ })
12534
+ });
12535
+
12536
+ const DEFAULT_TABLE_V2_MIN_WIDTH = 100;
12537
+ const toColumnNumber = (value) => {
12538
+ if (typeof value === "number") return Number.isFinite(value) ? value : 0;
12539
+ if (typeof value === "string") return Number.parseFloat(value) || 0;
12540
+ return 0;
12541
+ };
12542
+ const useTableV2Columns = ({
12543
+ columns,
12544
+ containerWidth,
12545
+ excludeKeys = [],
12546
+ defaultMinWidth = DEFAULT_TABLE_V2_MIN_WIDTH
12547
+ }) => {
12548
+ const resolvedColumns = computed(() => {
12549
+ const cols = columns();
12550
+ const floors = cols.map(
12551
+ (col) => toColumnNumber(col.minWidth) || toColumnNumber(col.width) || defaultMinWidth
12552
+ );
12553
+ const sumFloor = floors.reduce((total, item) => total + item, 0);
12554
+ const target = Math.max(sumFloor, containerWidth());
12555
+ const stretchableIndexes = cols.map(
12556
+ (col, index) => col.fixed || col.key !== void 0 && excludeKeys.includes(String(col.key)) ? -1 : index
12557
+ ).filter((index) => index >= 0);
12558
+ const extra = target - sumFloor;
12559
+ const stretchCount = stretchableIndexes.length;
12560
+ const base = stretchCount ? Math.floor(extra / stretchCount) : 0;
12561
+ let remainder = stretchCount ? extra % stretchCount : 0;
12562
+ const widths = floors.map((floor, index) => {
12563
+ if (!stretchableIndexes.includes(index)) return floor;
12564
+ let width = floor + base;
12565
+ if (remainder > 0) {
12566
+ width += 1;
12567
+ remainder -= 1;
12568
+ }
12569
+ return width;
12570
+ });
12571
+ return cols.map((col, index) => ({
12572
+ ...col,
12573
+ minWidth: floors[index],
12574
+ width: widths[index]
12575
+ }));
12576
+ });
12577
+ return { resolvedColumns };
12578
+ };
12579
+
12580
+ const TableV2Cell = defineComponent({
12581
+ name: "PlusTableV2Cell",
12582
+ props: {
12583
+ /** 列配置 */
12584
+ column: {
12585
+ type: Object,
12586
+ required: true
12587
+ },
12588
+ /** 行数据 */
12589
+ row: {
12590
+ type: Object,
12591
+ required: true
12592
+ },
12593
+ /** 行索引 */
12594
+ index: {
12595
+ type: Number,
12596
+ default: 0
12597
+ },
12598
+ /** 单元格列索引 */
12599
+ cellIndex: {
12600
+ type: Number,
12601
+ default: 0
12602
+ },
12603
+ /** 是否可编辑 */
12604
+ editable: {
12605
+ type: [Boolean, String],
12606
+ default: false
12607
+ },
12608
+ /** 空值默认值 */
12609
+ emptyValue: {
12610
+ type: [String, Number],
12611
+ default: void 0
12612
+ },
12613
+ /** 透传给展示组件的额外参数 */
12614
+ rest: {
12615
+ type: Object,
12616
+ default: () => ({})
12617
+ }
12618
+ },
12619
+ emits: {
12620
+ /** 单元格点击 */
12621
+ cellClick: (_row, _column, _event) => true,
12622
+ /** 单元格双击 */
12623
+ cellDblclick: (_row, _column, _event) => true,
12624
+ /** 表单值变化 */
12625
+ formChange: (_data) => true
12626
+ },
12627
+ setup(props, { emit, slots, expose }) {
12628
+ const displayItemInstance = ref(null);
12629
+ const cellInstance = ref(null);
12630
+ const formRefs = inject(
12631
+ TableFormRefInjectionKey,
12632
+ null
12633
+ );
12634
+ const handleClick = (event) => {
12635
+ emit("cellClick", props.row, props.column, event);
12636
+ };
12637
+ const handleDblclick = (event) => {
12638
+ emit("cellDblclick", props.row, props.column, event);
12639
+ };
12640
+ const handleChange = (data) => {
12641
+ emit("formChange", {
12642
+ ...data,
12643
+ index: props.index,
12644
+ rowIndex: props.index,
12645
+ cellIndex: props.cellIndex,
12646
+ column: { ...props.rest.column, ...props.column }
12647
+ });
12648
+ };
12649
+ const syncFormRef = () => {
12650
+ const instance = displayItemInstance.value;
12651
+ if (!formRefs || !instance) return;
12652
+ const info = {
12653
+ ...instance,
12654
+ ...instance.getDisplayItemInstance(),
12655
+ index: props.index,
12656
+ rowIndex: props.index,
12657
+ cellIndex: props.cellIndex
12658
+ };
12659
+ set(formRefs.value, [props.index, props.cellIndex], info);
12660
+ };
12661
+ watch(
12662
+ () => [props.index, props.cellIndex, props.column.prop, displayItemInstance.value],
12663
+ syncFormRef,
12664
+ {
12665
+ flush: "post",
12666
+ immediate: true
12667
+ }
12668
+ );
12669
+ expose({
12670
+ cellInstance,
12671
+ startCellEdit: () => {
12672
+ var _a;
12673
+ return (_a = displayItemInstance.value) == null ? void 0 : _a.startCellEdit();
12674
+ },
12675
+ stopCellEdit: () => {
12676
+ var _a;
12677
+ return (_a = displayItemInstance.value) == null ? void 0 : _a.stopCellEdit();
12678
+ },
12679
+ getDisplayItemInstance: () => {
12680
+ var _a;
12681
+ return (_a = displayItemInstance.value) == null ? void 0 : _a.getDisplayItemInstance();
12682
+ }
12683
+ });
12684
+ return () => h(
12685
+ "div",
12686
+ {
12687
+ ref: cellInstance,
12688
+ class: "plus-table-v2-cell",
12689
+ onClick: handleClick,
12690
+ onDblclick: handleDblclick
12691
+ },
12692
+ [
12693
+ h(
12694
+ PlusDisplayItem,
12695
+ {
12696
+ ref: displayItemInstance,
12697
+ column: props.column,
12698
+ row: props.row,
12699
+ index: props.index,
12700
+ editable: props.editable,
12701
+ rest: props.rest,
12702
+ emptyValue: props.emptyValue,
12703
+ onChange: handleChange
12704
+ },
12705
+ slots
12706
+ )
12707
+ ]
12708
+ );
12709
+ }
12710
+ });
12711
+
12712
+ var _sfc_main$d = /* @__PURE__ */ defineComponent({
12713
+ ...{
12714
+ name: "PlusTableV2",
12715
+ inheritAttrs: false
12716
+ },
12717
+ __name: "index",
12718
+ props: {
12719
+ tableData: { default: () => [] },
12720
+ data: { default: () => [] },
12721
+ columns: { default: () => [] },
12722
+ defaultSize: { default: "default" },
12723
+ pagination: { type: [Boolean, Object], default: false },
12724
+ actionBar: { type: [Boolean, Object], default: false },
12725
+ hasIndexColumn: { type: Boolean, default: false },
12726
+ titleBar: { type: [Boolean, Object], default: true },
12727
+ isSelection: { type: Boolean, default: false },
12728
+ isRadio: { type: Boolean, default: false },
12729
+ specialColumnsOrder: { default: () => ["radio", "selection", "index"] },
12730
+ loadingStatus: { type: Boolean, default: false },
12731
+ height: { default: void 0 },
12732
+ width: { default: void 0 },
12733
+ rowHeight: { default: void 0 },
12734
+ headerHeight: { default: 50 },
12735
+ headerCellStyle: { default: () => ({
12736
+ "background-color": "var(--el-fill-color-light)"
12737
+ }) },
12738
+ rowKey: { default: "id" },
12739
+ defaultSelectedRadioRow: { default: void 0 },
12740
+ radioProps: { default: void 0 },
12741
+ selectionTableColumnProps: { default: () => ({ width: 40 }) },
12742
+ radioTableColumnProps: { default: () => ({ width: 50 }) },
12743
+ indexTableColumnProps: { default: () => ({}) },
12744
+ indexContentStyle: { type: [Object, Function], default: () => ({}) },
12745
+ editable: { type: [Boolean, String], default: false },
12746
+ adaptive: { type: [Boolean, Object], default: false },
12747
+ emptyValue: { default: void 0 }
12748
+ },
12749
+ emits: ["paginationChange", "clickAction", "clickActionConfirmCancel", "formChange", "refresh", "edited", "cell-click", "cell-dblclick", "filterTableHeader", "radioChange", "selection-change", "row-click", "row-dblclick"],
12750
+ setup(__props, { expose: __expose, emit: __emit }) {
12751
+ var _a, _b;
12752
+ const props = __props;
12753
+ const emit = __emit;
12754
+ const { t } = useLocale();
12755
+ const slots = useSlots();
12756
+ const tableWrapperInstance = ref(null);
12757
+ const tableInstance = shallowRef(null);
12758
+ const paginationInstance = ref(null);
12759
+ const state = reactive({
12760
+ size: props.defaultSize,
12761
+ subPageInfo: {
12762
+ ...((_a = props.pagination) == null ? void 0 : _a.modelValue) || DefaultPageInfo
12763
+ }
12764
+ });
12765
+ const __tableData = computed(
12766
+ () => {
12767
+ var _a2;
12768
+ return ((_a2 = props.tableData) == null ? void 0 : _a2.length) ? props.tableData : props.data;
12769
+ }
12770
+ );
12771
+ const { subColumns, filterColumns, columnsIsChange, setFilterColumns } = useTableColumns({
12772
+ columns: () => props.columns
12773
+ });
12774
+ const formRefs = shallowRef({});
12775
+ const formFieldRefs = shallowRef({});
12776
+ const sizeRowHeightMap = {
12777
+ default: 50,
12778
+ large: 60,
12779
+ small: 40
12780
+ };
12781
+ const currentRowHeight = computed(() => {
12782
+ var _a2, _b2;
12783
+ return (_b2 = (_a2 = props.rowHeight) != null ? _a2 : sizeRowHeightMap[state.size]) != null ? _b2 : 50;
12784
+ });
12785
+ const containerWidth = ref(0);
12786
+ const fillHeight = ref(400);
12787
+ const tableWidth = computed(() => {
12788
+ if (props.width !== void 0) return toColumnNumber(props.width);
12789
+ return Math.max(containerWidth.value, 1);
12790
+ });
12791
+ const tableHeight = computed(() => {
12792
+ if (props.height !== void 0) return toColumnNumber(props.height);
12793
+ return fillHeight.value;
12794
+ });
12795
+ const bodyHeight = computed(() => `${tableHeight.value}px`);
12796
+ const calcFillHeight = () => {
12797
+ var _a2;
12798
+ if (!tableWrapperInstance.value) return;
12799
+ let offsetBottom = 20;
12800
+ if (isPlainObject(props.adaptive)) {
12801
+ offsetBottom = (_a2 = props.adaptive.offsetBottom) != null ? _a2 : offsetBottom;
12802
+ }
12803
+ const paginationHeight = paginationInstance.value && props.pagination ? paginationInstance.value.$el.offsetHeight : 0;
12804
+ const top = tableWrapperInstance.value.getBoundingClientRect().top;
12805
+ fillHeight.value = Math.max(window.innerHeight - top - offsetBottom - paginationHeight, 100);
12806
+ };
12807
+ const handleResize = ({ width }) => {
12808
+ containerWidth.value = width;
12809
+ };
12810
+ const debounceCalcFillHeight = debounce(
12811
+ calcFillHeight,
12812
+ isPlainObject(props.adaptive) ? (_b = props.adaptive.timeout) != null ? _b : 60 : 60
12813
+ );
12814
+ const radioRow = ref({});
12815
+ watch(
12816
+ () => props.defaultSelectedRadioRow,
12817
+ (val) => {
12818
+ radioRow.value = val != null ? val : {};
12819
+ },
12820
+ { immediate: true }
12821
+ );
12822
+ const selectedRows = ref([]);
12823
+ const getRowKeyValue = (row) => row == null ? void 0 : row[props.rowKey];
12824
+ const isRowSelected = (row) => {
12825
+ const key = getRowKeyValue(row);
12826
+ return selectedRows.value.some((item) => getRowKeyValue(item) === key);
12827
+ };
12828
+ const isAllSelected = () => __tableData.value.length > 0 && selectedRows.value.length === __tableData.value.length;
12829
+ const isIndeterminate = () => selectedRows.value.length > 0 && selectedRows.value.length < __tableData.value.length;
12830
+ const handleToggleRow = (row, checked) => {
12831
+ const key = getRowKeyValue(row);
12832
+ const rest = selectedRows.value.filter((item) => getRowKeyValue(item) !== key);
12833
+ selectedRows.value = checked ? [...rest, row] : rest;
12834
+ emit("selection-change", selectedRows.value);
12835
+ };
12836
+ const handleToggleAll = (checked) => {
12837
+ selectedRows.value = checked ? [...__tableData.value] : [];
12838
+ emit("selection-change", selectedRows.value);
12839
+ };
12840
+ const handleRadioChange = (value, row) => {
12841
+ radioRow.value = value ? row : {};
12842
+ emit("radioChange", row, __tableData.value.indexOf(row), !!value);
12843
+ };
12844
+ const handleFormChange = (data) => {
12845
+ emit("formChange", data);
12846
+ };
12847
+ const handleRefresh = () => {
12848
+ emit("refresh");
12849
+ };
12850
+ const handleClickDensity = (size) => {
12851
+ state.size = size;
12852
+ };
12853
+ const handleFilterTableConfirm = (list, eventType) => {
12854
+ setFilterColumns(list);
12855
+ emit("filterTableHeader", list, eventType);
12856
+ };
12857
+ const handlePaginationChange = () => {
12858
+ emit("paginationChange", { ...state.subPageInfo });
12859
+ };
12860
+ const getCellForm = (row, column) => {
12861
+ var _a2;
12862
+ const rowIndex = __tableData.value.indexOf(row);
12863
+ const columnIndex = subColumns.value.findIndex((item) => item.prop === column.prop);
12864
+ if (rowIndex < 0 || columnIndex < 0) return null;
12865
+ return ((_a2 = formRefs.value[rowIndex]) == null ? void 0 : _a2[columnIndex]) || null;
12866
+ };
12867
+ const currentForm = shallowRef(null);
12868
+ const startCellEdit = (row, column) => {
12869
+ var _a2;
12870
+ const cellForm = getCellForm(row, column);
12871
+ if (!cellForm) return;
12872
+ document.addEventListener("click", handleStopEditClick);
12873
+ (_a2 = currentForm.value) == null ? void 0 : _a2.stopCellEdit();
12874
+ currentForm.value = cellForm;
12875
+ cellForm.startCellEdit();
12876
+ const unwatch = watch(
12877
+ () => formFieldRefs.value.valueIsReady,
12878
+ (val) => {
12879
+ var _a3, _b2;
12880
+ if ((val == null ? void 0 : val.value) && ((_b2 = (_a3 = formFieldRefs.value) == null ? void 0 : _a3.fieldInstance) == null ? void 0 : _b2.focus)) {
12881
+ formFieldRefs.value.fieldInstance.focus();
12882
+ unwatch();
12883
+ }
12884
+ }
12885
+ );
12886
+ };
12887
+ const handleStopEditClick = (event) => {
12888
+ var _a2;
12889
+ if (!tableWrapperInstance.value || !currentForm.value) return;
12890
+ const target = event == null ? void 0 : event.target;
12891
+ if ((_a2 = target == null ? void 0 : target.classList) == null ? void 0 : _a2.contains("el-icon")) return;
12892
+ if (tableWrapperInstance.value.contains(target)) return;
12893
+ currentForm.value.stopCellEdit();
12894
+ currentForm.value = null;
12895
+ emit("edited");
12896
+ document.removeEventListener("click", handleStopEditClick);
12897
+ };
12898
+ const handleCellClick = (row, column, event) => {
12899
+ if (props.editable === "click") startCellEdit(row, column);
12900
+ emit("cell-click", row, column, event.currentTarget, event);
12901
+ };
12902
+ const handleCellDblclick = (row, column, event) => {
12903
+ if (props.editable === "dblclick") startCellEdit(row, column);
12904
+ emit("cell-dblclick", row, column, event.currentTarget, event);
12905
+ };
12906
+ const getCellSlots = () => {
12907
+ const cellSlots = {};
12908
+ Object.keys(slots).forEach((key) => {
12909
+ if (key.startsWith("plus-") || key === "edit-icon") {
12910
+ cellSlots[key] = slots[key];
12911
+ }
12912
+ });
12913
+ return cellSlots;
12914
+ };
12915
+ const renderCell = ({
12916
+ column,
12917
+ row,
12918
+ rowIndex,
12919
+ columnIndex
12920
+ }) => h(
12921
+ TableV2Cell,
12922
+ {
12923
+ column,
12924
+ row,
12925
+ index: rowIndex,
12926
+ cellIndex: columnIndex,
12927
+ editable: props.editable,
12928
+ emptyValue: props.emptyValue,
12929
+ onCellClick: handleCellClick,
12930
+ onCellDblclick: handleCellDblclick,
12931
+ onFormChange: handleFormChange
12932
+ },
12933
+ getCellSlots()
12934
+ );
12935
+ const dataColumns = computed(
12936
+ () => buildDataColumns({
12937
+ columns: subColumns.value,
12938
+ renderCell,
12939
+ slots
12940
+ })
12941
+ );
12942
+ const actionBarColumn = computed(() => {
12943
+ var _a2;
12944
+ if (!props.actionBar) return null;
12945
+ const actionBar = props.actionBar;
12946
+ return {
12947
+ key: "actionBar",
12948
+ title: actionBar.label || t("plus.table.action"),
12949
+ width: toColumnNumber(actionBar.width) || 200,
12950
+ fixed: actionBar.fixed || "right",
12951
+ align: (_a2 = actionBar.actionBarTableColumnProps) == null ? void 0 : _a2.align,
12952
+ cellRenderer: ({ rowData, rowIndex }) => h(
12953
+ PlusTableActionBarContent,
12954
+ {
12955
+ row: rowData,
12956
+ index: rowIndex,
12957
+ type: actionBar.type,
12958
+ buttons: actionBar.buttons,
12959
+ showNumber: actionBar.showNumber,
12960
+ showLimitIncludeMore: actionBar.showLimitIncludeMore,
12961
+ confirmType: actionBar.confirmType,
12962
+ moreType: actionBar.moreType,
12963
+ onClickAction: (data) => emit("clickAction", data),
12964
+ onClickActionConfirmCancel: (data) => emit("clickActionConfirmCancel", data)
12965
+ },
12966
+ {
12967
+ "action-bar-more-icon": () => {
12968
+ var _a3;
12969
+ return (_a3 = slots["action-bar-more-icon"]) == null ? void 0 : _a3.call(slots);
12970
+ }
12971
+ }
12972
+ )
12973
+ };
12974
+ });
12975
+ const specialColumns = computed(() => {
12976
+ const activeList = [];
12977
+ if (props.isRadio) activeList.push("radio");
12978
+ if (props.isSelection) activeList.push("selection");
12979
+ if (props.hasIndexColumn) activeList.push("index");
12980
+ const defaultOrder = ["radio", "selection", "index"];
12981
+ const order = [...props.specialColumnsOrder || [], ...defaultOrder].filter(
12982
+ (item, index, array) => array.indexOf(item) === index
12983
+ );
12984
+ return order.filter((item) => activeList.includes(item)).map((item) => {
12985
+ if (item === "radio") {
12986
+ return buildRadioColumn({
12987
+ radioRow: () => radioRow.value,
12988
+ onChange: handleRadioChange,
12989
+ radioProps: props.radioProps,
12990
+ columnProps: props.radioTableColumnProps
12991
+ });
12992
+ }
12993
+ if (item === "selection") {
12994
+ return buildSelectionColumn({
12995
+ isSelected: isRowSelected,
12996
+ isAllSelected,
12997
+ isIndeterminate,
12998
+ onToggleRow: handleToggleRow,
12999
+ onToggleAll: handleToggleAll,
13000
+ columnProps: props.selectionTableColumnProps
13001
+ });
13002
+ }
13003
+ return buildIndexColumn({
13004
+ pageInfo: state.subPageInfo,
13005
+ indexContentStyle: props.indexContentStyle,
13006
+ columnProps: props.indexTableColumnProps
13007
+ });
13008
+ });
13009
+ });
13010
+ const allColumns = computed(() => {
13011
+ const list = [...specialColumns.value, ...dataColumns.value];
13012
+ if (actionBarColumn.value) list.push(actionBarColumn.value);
13013
+ return list;
13014
+ });
13015
+ const { resolvedColumns } = useTableV2Columns({
13016
+ columns: () => allColumns.value,
13017
+ containerWidth: () => tableWidth.value
13018
+ });
13019
+ const headerCellProps = () => ({ style: props.headerCellStyle });
13020
+ const rowEventHandlers = computed(() => ({
13021
+ onClick: ({ rowData, rowIndex, event }) => {
13022
+ emit("row-click", rowData, rowIndex, event);
13023
+ },
13024
+ onDblclick: ({ rowData, rowIndex, event }) => {
13025
+ emit("row-dblclick", rowData, rowIndex, event);
13026
+ }
13027
+ }));
13028
+ onMounted(() => {
13029
+ calcFillHeight();
13030
+ window.addEventListener("resize", debounceCalcFillHeight);
13031
+ });
13032
+ onBeforeUnmount(() => {
13033
+ window.removeEventListener("resize", debounceCalcFillHeight);
13034
+ document.removeEventListener("click", handleStopEditClick);
13035
+ });
13036
+ provide(TableFormRefInjectionKey, formRefs);
13037
+ provide(TableFormFieldRefInjectionKey, formFieldRefs);
13038
+ __expose({
13039
+ formRefs,
13040
+ tableInstance,
13041
+ /** 滚动到指定垂直位置 */
13042
+ scrollToTop: (top) => {
13043
+ var _a2;
13044
+ return (_a2 = tableInstance.value) == null ? void 0 : _a2.scrollToTop(top);
13045
+ },
13046
+ /** 滚动到指定水平位置 */
13047
+ scrollToLeft: (left) => {
13048
+ var _a2;
13049
+ return (_a2 = tableInstance.value) == null ? void 0 : _a2.scrollToLeft(left);
13050
+ },
13051
+ /** 滚动到指定行 */
13052
+ scrollToRow: (row, strategy) => {
13053
+ var _a2;
13054
+ return (_a2 = tableInstance.value) == null ? void 0 : _a2.scrollToRow(row, strategy);
13055
+ }
13056
+ });
13057
+ return (_ctx, _cache) => {
13058
+ return openBlock(), createElementBlock(
13059
+ "div",
13060
+ {
13061
+ ref_key: "tableWrapperInstance",
13062
+ ref: tableWrapperInstance,
13063
+ class: "plus-table-v2"
13064
+ },
13065
+ [
13066
+ createCommentVNode(" \u6807\u9898\u680F\uFF1A\u5237\u65B0 / \u5BC6\u5EA6 / \u5217\u8BBE\u7F6E\uFF0C\u4E0E el-table \u7248\u672C\u590D\u7528\u540C\u4E00\u7EC4\u4EF6 "),
13067
+ _ctx.titleBar ? (openBlock(), createBlock(unref(PlusTableTitleBar), {
13068
+ key: 0,
13069
+ "origin-columns": _ctx.columns,
13070
+ columns: unref(filterColumns),
13071
+ "default-size": state.size,
13072
+ "columns-is-change": unref(columnsIsChange),
13073
+ "title-bar": _ctx.titleBar,
13074
+ onClickDensity: handleClickDensity,
13075
+ onFilterTableHeader: handleFilterTableConfirm,
13076
+ onRefresh: handleRefresh
13077
+ }, createSlots({
13078
+ title: withCtx(() => [
13079
+ renderSlot(_ctx.$slots, "title")
13080
+ ]),
13081
+ toolbar: withCtx(() => [
13082
+ renderSlot(_ctx.$slots, "toolbar")
13083
+ ]),
13084
+ _: 2
13085
+ /* DYNAMIC */
13086
+ }, [
13087
+ _ctx.$slots["column-settings-icon"] ? {
13088
+ name: "column-settings-icon",
13089
+ fn: withCtx(() => [
13090
+ renderSlot(_ctx.$slots, "column-settings-icon")
13091
+ ]),
13092
+ key: "0"
13093
+ } : void 0,
13094
+ _ctx.$slots["density-icon"] ? {
13095
+ name: "density-icon",
13096
+ fn: withCtx(() => [
13097
+ renderSlot(_ctx.$slots, "density-icon")
13098
+ ]),
13099
+ key: "1"
13100
+ } : void 0
13101
+ ]), 1032, ["origin-columns", "columns", "default-size", "columns-is-change", "title-bar"])) : createCommentVNode("v-if", true),
13102
+ createCommentVNode(" \u865A\u62DF\u8868\u683C\u4E3B\u4F53\uFF1A\u5BBD\u5EA6\u6491\u6EE1\u7236\u5BB9\u5668\uFF0C\u9AD8\u5EA6\u6309 props.height / adaptive \u8BA1\u7B97 "),
13103
+ withDirectives((openBlock(), createElementBlock(
13104
+ "div",
13105
+ {
13106
+ class: "plus-table-v2__body",
13107
+ style: normalizeStyle({ height: bodyHeight.value })
13108
+ },
13109
+ [
13110
+ createVNode(unref(ElAutoResizer), {
13111
+ "disable-height": true,
13112
+ "on-resize": handleResize
13113
+ }, {
13114
+ default: withCtx(() => [
13115
+ createVNode(unref(ElTableV2), mergeProps({
13116
+ ref_key: "tableInstance",
13117
+ ref: tableInstance,
13118
+ columns: unref(resolvedColumns),
13119
+ data: __tableData.value,
13120
+ width: tableWidth.value,
13121
+ height: tableHeight.value,
13122
+ "row-height": currentRowHeight.value,
13123
+ "header-height": _ctx.headerHeight,
13124
+ "row-key": _ctx.rowKey,
13125
+ "header-cell-props": headerCellProps,
13126
+ "row-event-handlers": rowEventHandlers.value,
13127
+ fixed: true,
13128
+ "scrollbar-always-on": true
13129
+ }, _ctx.$attrs), {
13130
+ empty: withCtx(() => [
13131
+ renderSlot(_ctx.$slots, "empty", {}, () => [
13132
+ createVNode(unref(ElEmpty))
13133
+ ])
13134
+ ]),
13135
+ _: 3
13136
+ /* FORWARDED */
13137
+ }, 16, ["columns", "data", "width", "height", "row-height", "header-height", "row-key", "row-event-handlers"])
13138
+ ]),
13139
+ _: 3
13140
+ /* FORWARDED */
13141
+ })
13142
+ ],
13143
+ 4
13144
+ /* STYLE */
13145
+ )), [
13146
+ [unref(vLoading), _ctx.loadingStatus]
13147
+ ]),
13148
+ createCommentVNode(" \u5206\u9875 "),
13149
+ _ctx.pagination ? (openBlock(), createBlock(unref(PlusPagination), mergeProps({
13150
+ key: 1,
13151
+ ref_key: "paginationInstance",
13152
+ ref: paginationInstance,
13153
+ modelValue: state.subPageInfo,
13154
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.subPageInfo = $event)
13155
+ }, _ctx.pagination, { onChange: handlePaginationChange }), createSlots({
13156
+ _: 2
13157
+ /* DYNAMIC */
13158
+ }, [
13159
+ _ctx.$slots["pagination-left"] ? {
13160
+ name: "pagination-left",
13161
+ fn: withCtx(() => [
13162
+ renderSlot(_ctx.$slots, "pagination-left")
13163
+ ]),
13164
+ key: "0"
13165
+ } : void 0,
13166
+ _ctx.$slots["pagination-right"] ? {
13167
+ name: "pagination-right",
13168
+ fn: withCtx(() => [
13169
+ renderSlot(_ctx.$slots, "pagination-right")
13170
+ ]),
13171
+ key: "1"
13172
+ } : void 0
13173
+ ]), 1040, ["modelValue"])) : createCommentVNode("v-if", true)
13174
+ ],
13175
+ 512
13176
+ /* NEED_PATCH */
13177
+ );
13178
+ };
13179
+ }
13180
+ });
13181
+
13182
+ var TableV2 = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "index.vue"]]);
13183
+
13184
+ const PlusTableV2 = TableV2;
13185
+
12319
13186
  var _sfc_main$c = /* @__PURE__ */ defineComponent({
12320
13187
  ...{
12321
13188
  name: "PlusDescriptions"
@@ -13096,6 +13963,8 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
13096
13963
  request: {},
13097
13964
  search: { type: [Boolean, Object], default: () => ({}) },
13098
13965
  table: { default: () => ({}) },
13966
+ tableType: { default: "table" },
13967
+ tableV2: { default: void 0 },
13099
13968
  params: { default: () => ({}) },
13100
13969
  postData: { type: Function, default: void 0 },
13101
13970
  beforeSearchSubmit: { type: Function, default: void 0 },
@@ -13149,6 +14018,26 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
13149
14018
  const values = ref(
13150
14019
  (_b = props.searchValues) != null ? _b : { ...(_a = props.search) == null ? void 0 : _a.defaultValues }
13151
14020
  );
14021
+ const tableComponentMap = /* @__PURE__ */ new Map([
14022
+ ["table", PlusTable],
14023
+ ["table-v2", PlusTableV2]
14024
+ ]);
14025
+ const tableComponent = computed(() => tableComponentMap.get(props.tableType) || PlusTable);
14026
+ const tableProps = computed(() => {
14027
+ if (props.tableType === "table-v2") {
14028
+ return { ...props.table, ...props.tableV2 };
14029
+ }
14030
+ return props.table;
14031
+ });
14032
+ const tablePagination = computed(() => {
14033
+ if (props.pagination === false) return void 0;
14034
+ return {
14035
+ ...props.pagination,
14036
+ total: total.value,
14037
+ modelValue: pageInfo.value,
14038
+ pageSizeList: computedDefaultPageSizeList.value
14039
+ };
14040
+ });
13152
14041
  watch(
13153
14042
  () => props.searchValues,
13154
14043
  (val) => {
@@ -13198,6 +14087,9 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
13198
14087
  getList();
13199
14088
  emit("paginationChange", _pageInfo);
13200
14089
  };
14090
+ const handleTablePaginationChange = (data) => {
14091
+ handlePaginationChange(data);
14092
+ };
13201
14093
  const handleSearchChange = (val, column) => {
13202
14094
  emit("update:searchValues", val);
13203
14095
  emit("searchChange", val, column);
@@ -13312,21 +14204,16 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
13312
14204
  class: "plus-page__table_wrapper"
13313
14205
  }, {
13314
14206
  default: withCtx(() => [
13315
- createVNode(unref(PlusTable), mergeProps({
14207
+ (openBlock(), createBlock(resolveDynamicComponent(tableComponent.value), mergeProps({
13316
14208
  ref_key: "plusTableInstance",
13317
14209
  ref: plusTableInstance,
13318
14210
  "title-bar": { refresh: true }
13319
- }, _ctx.table, {
14211
+ }, tableProps.value, {
13320
14212
  "table-data": unref(tableData),
13321
14213
  "loading-status": unref(loadingStatus),
13322
14214
  columns: _ctx.columns,
13323
- pagination: _ctx.pagination === false ? void 0 : {
13324
- ..._ctx.pagination,
13325
- total: unref(total),
13326
- modelValue: unref(pageInfo),
13327
- pageSizeList: computedDefaultPageSizeList.value
13328
- },
13329
- onPaginationChange: handlePaginationChange,
14215
+ pagination: tablePagination.value,
14216
+ onPaginationChange: handleTablePaginationChange,
13330
14217
  onRefresh: handleRefresh
13331
14218
  }), createSlots({
13332
14219
  _: 2
@@ -13375,7 +14262,7 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
13375
14262
  ])
13376
14263
  };
13377
14264
  })
13378
- ]), 1040, ["table-data", "loading-status", "columns", "pagination"])
14265
+ ]), 1040, ["table-data", "loading-status", "columns", "pagination"]))
13379
14266
  ]),
13380
14267
  _: 3
13381
14268
  /* FORWARDED */
@@ -14770,6 +15657,7 @@ const plugins = [
14770
15657
  PlusDialog,
14771
15658
  PlusPagination,
14772
15659
  PlusTable,
15660
+ PlusTableV2,
14773
15661
  PlusRadio,
14774
15662
  PlusDatePicker,
14775
15663
  PlusDescriptions,
@@ -14793,8 +15681,8 @@ const plugins = [
14793
15681
 
14794
15682
  var installer = makeInstaller([...plugins]);
14795
15683
 
14796
- const version = "1.0.0";
15684
+ const version = "1.0.1";
14797
15685
 
14798
15686
  const install = installer.install;
14799
15687
 
14800
- export { DatePickerValueIsArrayList, DefaultPageInfo, DefaultPageSizeList, PlusBreadcrumb, PlusCheckCard, PlusCheckCardGroup, PlusDatePicker, PlusDescriptions, PlusDialog, PlusDialogForm, PlusDisplayItem, PlusDrawerForm, PlusForm, PlusFormItem, PlusHeader, PlusInputTag, PlusLayout, PlusPage, PlusPagination, PlusPopover, PlusRadio, PlusSearch, PlusSidebar, PlusSidebarItem, PlusStepsForm, PlusTable, TableFormFieldRefInjectionKey, TableFormRefInjectionKey, TableFormRowInfoInjectionKey, ValueIsArrayList, ValueIsBooleanList, ValueIsNumberList, buildLocaleContext, buildTranslator, installer as default, getOptionsByOptionsMap, install, selectValueTypeList, translate, useGetOptions, useLocale, useTable, version };
15688
+ export { DatePickerValueIsArrayList, DefaultPageInfo, DefaultPageSizeList, PlusBreadcrumb, PlusCheckCard, PlusCheckCardGroup, PlusDatePicker, PlusDescriptions, PlusDialog, PlusDialogForm, PlusDisplayItem, PlusDrawerForm, PlusForm, PlusFormItem, PlusHeader, PlusInputTag, PlusLayout, PlusPage, PlusPagination, PlusPopover, PlusRadio, PlusSearch, PlusSidebar, PlusSidebarItem, PlusStepsForm, PlusTable, PlusTableActionBarContent, PlusTableTitleBar, PlusTableV2, TableFormFieldRefInjectionKey, TableFormRefInjectionKey, TableFormRowInfoInjectionKey, ValueIsArrayList, ValueIsBooleanList, ValueIsNumberList, buildLocaleContext, buildTranslator, installer as default, getOptionsByOptionsMap, install, selectValueTypeList, translate, useGetOptions, useLocale, useTable, useTableColumns, useTableV2Columns, version };