tabula-vue 1.0.1 → 1.0.2

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 (74) hide show
  1. package/es/component.mjs +2 -0
  2. package/es/components/index.d.ts +1 -0
  3. package/es/components/index.mjs +1 -0
  4. package/es/components/page/index.d.ts +8861 -5128
  5. package/es/components/page/src/index.vue.d.ts +1470 -268
  6. package/es/components/page/src/index.vue2.mjs +13 -3
  7. package/es/components/table-lite/index.d.ts +1783 -0
  8. package/es/components/table-lite/index.mjs +6 -0
  9. package/es/components/table-lite/src/index.vue.d.ts +672 -0
  10. package/es/components/table-lite/src/index.vue.mjs +6 -0
  11. package/es/components/table-lite/src/index.vue2.mjs +681 -0
  12. package/es/components/table-lite/src/type.d.ts +91 -0
  13. package/es/components/table-lite/src/type.mjs +1 -0
  14. package/es/components/table-lite/style/css.d.ts +16 -0
  15. package/es/components/table-lite/style/css.mjs +16 -0
  16. package/es/components/table-lite/style/index.d.ts +16 -0
  17. package/es/components/table-lite/style/index.mjs +16 -0
  18. package/es/index.mjs +1 -0
  19. package/es/version.d.ts +1 -1
  20. package/es/version.mjs +1 -1
  21. package/index.css +1 -1
  22. package/index.js +762 -84
  23. package/index.min.js +7 -3
  24. package/index.min.mjs +7 -3
  25. package/index.mjs +762 -85
  26. package/lib/component.js +42 -40
  27. package/lib/components/index.d.ts +1 -0
  28. package/lib/components/index.js +43 -41
  29. package/lib/components/page/index.d.ts +8861 -5128
  30. package/lib/components/page/src/index.vue.d.ts +1470 -268
  31. package/lib/components/page/src/index.vue2.js +15 -5
  32. package/lib/components/table-lite/index.d.ts +1783 -0
  33. package/lib/components/table-lite/index.js +8 -0
  34. package/lib/components/table-lite/src/index.vue.d.ts +672 -0
  35. package/lib/components/table-lite/src/index.vue.js +10 -0
  36. package/lib/components/table-lite/src/index.vue2.js +685 -0
  37. package/lib/components/table-lite/src/type.d.ts +91 -0
  38. package/lib/components/table-lite/src/type.js +2 -0
  39. package/lib/components/table-lite/style/css.d.ts +16 -0
  40. package/lib/components/table-lite/style/css.js +19 -0
  41. package/lib/components/table-lite/style/index.d.ts +16 -0
  42. package/lib/components/table-lite/style/index.js +19 -0
  43. package/lib/index.js +43 -41
  44. package/lib/version.d.ts +1 -1
  45. package/lib/version.js +1 -1
  46. package/locale/en.js +1 -1
  47. package/locale/en.min.js +1 -1
  48. package/locale/en.min.mjs +1 -1
  49. package/locale/en.mjs +1 -1
  50. package/locale/ja.js +1 -1
  51. package/locale/ja.min.js +1 -1
  52. package/locale/ja.min.mjs +1 -1
  53. package/locale/ja.mjs +1 -1
  54. package/locale/ko.js +1 -1
  55. package/locale/ko.min.js +1 -1
  56. package/locale/ko.min.mjs +1 -1
  57. package/locale/ko.mjs +1 -1
  58. package/locale/zh-cn.js +1 -1
  59. package/locale/zh-cn.min.js +1 -1
  60. package/locale/zh-cn.min.mjs +1 -1
  61. package/locale/zh-cn.mjs +1 -1
  62. package/locale/zh-hk.js +1 -1
  63. package/locale/zh-hk.min.js +1 -1
  64. package/locale/zh-hk.min.mjs +1 -1
  65. package/locale/zh-hk.mjs +1 -1
  66. package/locale/zh-tw.js +1 -1
  67. package/locale/zh-tw.min.js +1 -1
  68. package/locale/zh-tw.min.mjs +1 -1
  69. package/locale/zh-tw.mjs +1 -1
  70. package/package.json +1 -1
  71. package/theme-chalk/index.css +1 -1
  72. package/theme-chalk/plus-table-lite.css +1 -0
  73. package/theme-chalk/src/index.scss +1 -0
  74. package/theme-chalk/src/table-lite.scss +53 -0
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! tabula-vue v1.0.1 */
1
+ /*! tabula-vue v1.0.2 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('element-plus')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vue', 'element-plus'], factory) :
@@ -2247,7 +2247,7 @@
2247
2247
  var Promise$1 = getNative(root$1, 'Promise');
2248
2248
 
2249
2249
  /* Built-in method references that are verified to be native. */
2250
- var Set = getNative(root$1, 'Set');
2250
+ var Set$1 = getNative(root$1, 'Set');
2251
2251
 
2252
2252
  /** `Object#toString` result references. */
2253
2253
  var mapTag$4 = '[object Map]',
@@ -2262,7 +2262,7 @@
2262
2262
  var dataViewCtorString = toSource(DataView),
2263
2263
  mapCtorString = toSource(Map$1),
2264
2264
  promiseCtorString = toSource(Promise$1),
2265
- setCtorString = toSource(Set),
2265
+ setCtorString = toSource(Set$1),
2266
2266
  weakMapCtorString = toSource(WeakMap);
2267
2267
 
2268
2268
  /**
@@ -2278,7 +2278,7 @@
2278
2278
  if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3) ||
2279
2279
  (Map$1 && getTag(new Map$1) != mapTag$4) ||
2280
2280
  (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
2281
- (Set && getTag(new Set) != setTag$4) ||
2281
+ (Set$1 && getTag(new Set$1) != setTag$4) ||
2282
2282
  (WeakMap && getTag(new WeakMap) != weakMapTag$1)) {
2283
2283
  getTag = function(value) {
2284
2284
  var result = baseGetTag(value),
@@ -4481,8 +4481,8 @@
4481
4481
  };
4482
4482
  }
4483
4483
 
4484
- const _hoisted_1$k = { class: "plus-dialog-body" };
4485
- var _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
4484
+ const _hoisted_1$l = { class: "plus-dialog-body" };
4485
+ var _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
4486
4486
  ...{
4487
4487
  name: "PlusDialog",
4488
4488
  inheritAttrs: false
@@ -4532,7 +4532,7 @@
4532
4532
  class: "plus-dialog"
4533
4533
  }, _ctx.$attrs), vue.createSlots({
4534
4534
  default: vue.withCtx(() => [
4535
- vue.createElementVNode("div", _hoisted_1$k, [
4535
+ vue.createElementVNode("div", _hoisted_1$l, [
4536
4536
  vue.renderSlot(_ctx.$slots, "default")
4537
4537
  ])
4538
4538
  ]),
@@ -4604,25 +4604,25 @@
4604
4604
  return target;
4605
4605
  };
4606
4606
 
4607
- var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__file", "index.vue"]]);
4607
+ var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__file", "index.vue"]]);
4608
4608
 
4609
4609
  const PlusDialog = Dialog;
4610
4610
 
4611
- const _hoisted_1$j = /* @__PURE__ */ vue.createElementVNode(
4611
+ const _hoisted_1$k = /* @__PURE__ */ vue.createElementVNode(
4612
4612
  "span",
4613
4613
  null,
4614
4614
  null,
4615
4615
  -1
4616
4616
  /* HOISTED */
4617
4617
  );
4618
- const _hoisted_2$9 = /* @__PURE__ */ vue.createElementVNode(
4618
+ const _hoisted_2$a = /* @__PURE__ */ vue.createElementVNode(
4619
4619
  "span",
4620
4620
  null,
4621
4621
  null,
4622
4622
  -1
4623
4623
  /* HOISTED */
4624
4624
  );
4625
- var _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
4625
+ var _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
4626
4626
  ...{
4627
4627
  name: "PlusPagination"
4628
4628
  },
@@ -4664,7 +4664,7 @@
4664
4664
  },
4665
4665
  [
4666
4666
  _ctx.align === "right" || _ctx.align === "center" ? vue.renderSlot(_ctx.$slots, "pagination-left", { key: 0 }, () => [
4667
- _hoisted_1$j
4667
+ _hoisted_1$k
4668
4668
  ]) : vue.createCommentVNode("v-if", true),
4669
4669
  vue.createVNode(vue.unref(elementPlus.ElPagination), vue.mergeProps({
4670
4670
  layout: "total, sizes, prev, pager, next, jumper",
@@ -4678,7 +4678,7 @@
4678
4678
  onCurrentChange: handleCurrentChange
4679
4679
  }), null, 16, ["current-page", "page-size", "total", "page-sizes"]),
4680
4680
  _ctx.align === "left" || _ctx.align === "center" ? vue.renderSlot(_ctx.$slots, "pagination-right", { key: 1 }, () => [
4681
- _hoisted_2$9
4681
+ _hoisted_2$a
4682
4682
  ]) : vue.createCommentVNode("v-if", true)
4683
4683
  ],
4684
4684
  2
@@ -4688,11 +4688,11 @@
4688
4688
  }
4689
4689
  });
4690
4690
 
4691
- var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "index.vue"]]);
4691
+ var Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__file", "index.vue"]]);
4692
4692
 
4693
4693
  const PlusPagination = Pagination;
4694
4694
 
4695
- var _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
4695
+ var _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
4696
4696
  ...{
4697
4697
  name: "PlusRadio"
4698
4698
  },
@@ -4877,7 +4877,7 @@
4877
4877
  }
4878
4878
  });
4879
4879
 
4880
- var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__file", "index.vue"]]);
4880
+ var Radio = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__file", "index.vue"]]);
4881
4881
 
4882
4882
  const PlusRadio = Radio;
4883
4883
 
@@ -5118,13 +5118,13 @@
5118
5118
  // src/components/user.vue
5119
5119
  var user_default = user_vue_vue_type_script_setup_true_lang_default;
5120
5120
 
5121
- const _hoisted_1$i = {
5121
+ const _hoisted_1$j = {
5122
5122
  key: 0,
5123
5123
  class: "plus-table-action-bar__dropdown__link"
5124
5124
  };
5125
- const _hoisted_2$8 = { class: "plus-table-action-bar__dropdown__link" };
5125
+ const _hoisted_2$9 = { class: "plus-table-action-bar__dropdown__link" };
5126
5126
  const _hoisted_3$4 = { class: "plus-table-action-bar__more-text" };
5127
- var _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
5127
+ var _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
5128
5128
  ...{
5129
5129
  name: "PlusTableActionBarContent"
5130
5130
  },
@@ -5445,7 +5445,7 @@
5445
5445
  )
5446
5446
  ]),
5447
5447
  default: vue.withCtx(() => [
5448
- _ctx.moreType === "icon" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$i, [
5448
+ _ctx.moreType === "icon" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$j, [
5449
5449
  vue.renderSlot(_ctx.$slots, "action-bar-more-icon", {}, () => [
5450
5450
  vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
5451
5451
  default: vue.withCtx(() => [
@@ -5460,7 +5460,7 @@
5460
5460
  { key: 1 },
5461
5461
  [
5462
5462
  vue.createCommentVNode(" \u9ED8\u8BA4 "),
5463
- vue.createElementVNode("span", _hoisted_2$8, [
5463
+ vue.createElementVNode("span", _hoisted_2$9, [
5464
5464
  vue.createElementVNode(
5465
5465
  "span",
5466
5466
  _hoisted_3$4,
@@ -5502,9 +5502,9 @@
5502
5502
  }
5503
5503
  });
5504
5504
 
5505
- var PlusTableActionBarContent = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__file", "table-action-bar-content.vue"]]);
5505
+ var PlusTableActionBarContent = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__file", "table-action-bar-content.vue"]]);
5506
5506
 
5507
- var _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
5507
+ var _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
5508
5508
  ...{
5509
5509
  name: "PlusTableActionBar"
5510
5510
  },
@@ -5569,9 +5569,9 @@
5569
5569
  }
5570
5570
  });
5571
5571
 
5572
- var PlusTableActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "table-action-bar.vue"]]);
5572
+ var PlusTableActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__file", "table-action-bar.vue"]]);
5573
5573
 
5574
- var _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
5574
+ var _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
5575
5575
  ...{
5576
5576
  name: "PlusRender"
5577
5577
  },
@@ -5641,12 +5641,12 @@
5641
5641
  }
5642
5642
  });
5643
5643
 
5644
- var Render = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "index.vue"]]);
5644
+ var Render = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__file", "index.vue"]]);
5645
5645
 
5646
5646
  const PlusRender = Render;
5647
5647
 
5648
- const _hoisted_1$h = { class: "plus-date-picker__middle" };
5649
- var _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
5648
+ const _hoisted_1$i = { class: "plus-date-picker__middle" };
5649
+ var _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
5650
5650
  ...{
5651
5651
  name: "PlusDatePicker"
5652
5652
  },
@@ -5751,7 +5751,7 @@
5751
5751
  }), null, 16, ["modelValue", "type", "value-format", "placeholder", "disabled"]),
5752
5752
  vue.createElementVNode(
5753
5753
  "span",
5754
- _hoisted_1$h,
5754
+ _hoisted_1$i,
5755
5755
  vue.toDisplayString(_ctx.rangeSeparator),
5756
5756
  1
5757
5757
  /* TEXT */
@@ -5782,11 +5782,11 @@
5782
5782
  }
5783
5783
  });
5784
5784
 
5785
- var DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "index.vue"]]);
5785
+ var DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__file", "index.vue"]]);
5786
5786
 
5787
5787
  const PlusDatePicker = DatePicker;
5788
5788
 
5789
- var _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
5789
+ var _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
5790
5790
  ...{
5791
5791
  name: "PlusInputTag"
5792
5792
  },
@@ -5923,7 +5923,7 @@
5923
5923
  }
5924
5924
  });
5925
5925
 
5926
- var InputTag = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "index.vue"]]);
5926
+ var InputTag = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__file", "index.vue"]]);
5927
5927
 
5928
5928
  const PlusInputTag = InputTag;
5929
5929
 
@@ -6020,9 +6020,9 @@
6020
6020
  );
6021
6021
  const getFieldComponent = (valueType) => Reflect.get(FieldComponentMap, valueType) || {};
6022
6022
 
6023
- const _hoisted_1$g = { class: "el-form-item__error" };
6024
- const _hoisted_2$7 = { class: "plus-form-item__label" };
6025
- var _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
6023
+ const _hoisted_1$h = { class: "el-form-item__error" };
6024
+ const _hoisted_2$8 = { class: "plus-form-item__label" };
6025
+ var _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
6026
6026
  ...{
6027
6027
  name: "PlusFormItem"
6028
6028
  },
@@ -6577,7 +6577,7 @@
6577
6577
  vue.unref(isFunction)(_ctx.renderErrorMessage) ? {
6578
6578
  name: "error",
6579
6579
  fn: vue.withCtx(({ error }) => [
6580
- vue.createElementVNode("div", _hoisted_1$g, [
6580
+ vue.createElementVNode("div", _hoisted_1$h, [
6581
6581
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.renderErrorMessage), vue.mergeProps(props, {
6582
6582
  value: state.value,
6583
6583
  error,
@@ -6590,7 +6590,7 @@
6590
6590
  _ctx.hasLabel ? {
6591
6591
  name: "label",
6592
6592
  fn: vue.withCtx(({ label: currentLabel }) => [
6593
- vue.createElementVNode("span", _hoisted_2$7, [
6593
+ vue.createElementVNode("span", _hoisted_2$8, [
6594
6594
  _ctx.renderLabel && vue.unref(isFunction)(_ctx.renderLabel) ? (vue.openBlock(), vue.createElementBlock(
6595
6595
  vue.Fragment,
6596
6596
  { key: 0 },
@@ -6648,11 +6648,11 @@
6648
6648
  }
6649
6649
  });
6650
6650
 
6651
- var FormItem = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "index.vue"]]);
6651
+ var FormItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__file", "index.vue"]]);
6652
6652
 
6653
6653
  const PlusFormItem = FormItem;
6654
6654
 
6655
- var _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
6655
+ var _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
6656
6656
  ...{
6657
6657
  name: "PlusCollapseTransition"
6658
6658
  },
@@ -6703,17 +6703,17 @@
6703
6703
  }
6704
6704
  });
6705
6705
 
6706
- var PlusCollapseTransition = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__file", "collapse-transition.vue"]]);
6706
+ var PlusCollapseTransition = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__file", "collapse-transition.vue"]]);
6707
6707
 
6708
- const _hoisted_1$f = {
6708
+ const _hoisted_1$g = {
6709
6709
  key: 0,
6710
6710
  class: "plus-form-item-previous"
6711
6711
  };
6712
- const _hoisted_2$6 = {
6712
+ const _hoisted_2$7 = {
6713
6713
  key: 1,
6714
6714
  class: "plus-form-item-extra"
6715
6715
  };
6716
- var _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
6716
+ var _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
6717
6717
  ...{
6718
6718
  name: "PlusFormContent"
6719
6719
  },
@@ -6778,7 +6778,7 @@
6778
6778
  {
6779
6779
  default: vue.withCtx(() => [
6780
6780
  vue.createCommentVNode(" el-form-item\u4E0A\u4E00\u884C\u7684\u5185\u5BB9 "),
6781
- item.renderPrevious || _ctx.$slots[vue.unref(getPreviousSlotName)(item.prop)] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
6781
+ item.renderPrevious || _ctx.$slots[vue.unref(getPreviousSlotName)(item.prop)] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
6782
6782
  vue.unref(isFunction)(item.renderPrevious) ? (vue.openBlock(), vue.createBlock(
6783
6783
  vue.resolveDynamicComponent(item.renderPrevious),
6784
6784
  vue.normalizeProps(vue.mergeProps({ key: 0 }, item)),
@@ -6820,7 +6820,7 @@
6820
6820
  } : void 0
6821
6821
  ]), 1040, ["model-value", "clearable", "has-label", "onChange"]),
6822
6822
  vue.createCommentVNode(" el-form-item \u4E0B\u4E00\u884C\u989D\u5916\u7684\u5185\u5BB9 "),
6823
- item.renderExtra || _ctx.$slots[vue.unref(getExtraSlotName)(item.prop)] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$6, [
6823
+ item.renderExtra || _ctx.$slots[vue.unref(getExtraSlotName)(item.prop)] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
6824
6824
  item.renderExtra && vue.unref(isFunction)(item.renderExtra) ? (vue.openBlock(), vue.createBlock(
6825
6825
  vue.resolveDynamicComponent(item.renderExtra),
6826
6826
  vue.normalizeProps(vue.mergeProps({ key: 0 }, item)),
@@ -6857,10 +6857,10 @@
6857
6857
  }
6858
6858
  });
6859
6859
 
6860
- var PlusFormContent = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "form-content.vue"]]);
6860
+ var PlusFormContent = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__file", "form-content.vue"]]);
6861
6861
 
6862
- const _hoisted_1$e = { class: "plus-form__group__item__icon" };
6863
- var _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
6862
+ const _hoisted_1$f = { class: "plus-form__group__item__icon" };
6863
+ var _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
6864
6864
  ...{
6865
6865
  name: "PlusForm",
6866
6866
  inheritAttrs: false
@@ -7010,7 +7010,7 @@
7010
7010
  icon: groupItem.icon,
7011
7011
  index
7012
7012
  }, () => [
7013
- vue.createElementVNode("div", _hoisted_1$e, [
7013
+ vue.createElementVNode("div", _hoisted_1$f, [
7014
7014
  groupItem.icon ? (vue.openBlock(), vue.createBlock(
7015
7015
  vue.unref(elementPlus.ElIcon),
7016
7016
  { key: 0 },
@@ -7155,7 +7155,7 @@
7155
7155
  }
7156
7156
  });
7157
7157
 
7158
- var Form = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "index.vue"]]);
7158
+ var Form = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__file", "index.vue"]]);
7159
7159
 
7160
7160
  const PlusForm = Form;
7161
7161
 
@@ -7198,8 +7198,8 @@
7198
7198
  const hasDisplayComponent = (valueType) => Object.keys(DisplayComponentMap).includes(valueType);
7199
7199
  const getDisplayComponent = (valueType) => Reflect.get(DisplayComponentMap, valueType) || {};
7200
7200
 
7201
- const _hoisted_1$d = ["innerHTML"];
7202
- const _hoisted_2$5 = { class: "plus-display-item" };
7201
+ const _hoisted_1$e = ["innerHTML"];
7202
+ const _hoisted_2$6 = { class: "plus-display-item" };
7203
7203
  const _hoisted_3$3 = /* @__PURE__ */ vue.createElementVNode(
7204
7204
  "svg",
7205
7205
  {
@@ -7219,7 +7219,7 @@
7219
7219
  -1
7220
7220
  /* HOISTED */
7221
7221
  );
7222
- var _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
7222
+ var _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
7223
7223
  ...{
7224
7224
  name: "PlusDisplayItem"
7225
7225
  },
@@ -7590,7 +7590,7 @@
7590
7590
  vue.createElementVNode("span", {
7591
7591
  class: "plus-display-item",
7592
7592
  innerHTML: _ctx.column.renderHTML(displayValue.value, renderParams.value)
7593
- }, null, 8, _hoisted_1$d)
7593
+ }, null, 8, _hoisted_1$e)
7594
7594
  ],
7595
7595
  2112
7596
7596
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
@@ -7719,7 +7719,7 @@
7719
7719
  { key: 5 },
7720
7720
  [
7721
7721
  vue.createCommentVNode(" \u590D\u5236 "),
7722
- vue.createElementVNode("span", _hoisted_2$5, [
7722
+ vue.createElementVNode("span", _hoisted_2$6, [
7723
7723
  vue.createTextVNode(
7724
7724
  vue.toDisplayString(formatterValue.value) + " ",
7725
7725
  1
@@ -7857,12 +7857,12 @@
7857
7857
  }
7858
7858
  });
7859
7859
 
7860
- var DisplayItem = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__file", "index.vue"]]);
7860
+ var DisplayItem = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__file", "index.vue"]]);
7861
7861
 
7862
7862
  const PlusDisplayItem = DisplayItem;
7863
7863
 
7864
- const _hoisted_1$c = { class: "plus-table-column__header" };
7865
- var _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
7864
+ const _hoisted_1$d = { class: "plus-table-column__header" };
7865
+ var _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
7866
7866
  ...{
7867
7867
  name: "PlusTableColumn"
7868
7868
  },
@@ -7960,7 +7960,7 @@
7960
7960
  "min-width": item.minWidth
7961
7961
  }), {
7962
7962
  header: vue.withCtx((scoped) => [
7963
- vue.createElementVNode("span", _hoisted_1$c, [
7963
+ vue.createElementVNode("span", _hoisted_1$d, [
7964
7964
  item.renderHeader && vue.unref(isFunction)(item.renderHeader) ? (vue.openBlock(), vue.createBlock(vue.unref(PlusRender), {
7965
7965
  key: 0,
7966
7966
  render: item.renderHeader,
@@ -8091,9 +8091,9 @@
8091
8091
  }
8092
8092
  });
8093
8093
 
8094
- var PlusTableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__file", "table-column.vue"]]);
8094
+ var PlusTableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__file", "table-column.vue"]]);
8095
8095
 
8096
- var _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
8096
+ var _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
8097
8097
  ...{
8098
8098
  name: "PlusTableTableColumnIndex"
8099
8099
  },
@@ -8167,7 +8167,7 @@
8167
8167
  }
8168
8168
  });
8169
8169
 
8170
- var PlusTableTableColumnIndex = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__file", "table-column-index.vue"]]);
8170
+ var PlusTableTableColumnIndex = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__file", "table-column-index.vue"]]);
8171
8171
 
8172
8172
  /**!
8173
8173
  * Sortable 1.15.0
@@ -11189,8 +11189,8 @@
11189
11189
  Sortable.mount(new AutoScrollPlugin());
11190
11190
  Sortable.mount(Remove, Revert);
11191
11191
 
11192
- const _hoisted_1$b = { class: "plus-table-column-drag-icon" };
11193
- var _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
11192
+ const _hoisted_1$c = { class: "plus-table-column-drag-icon" };
11193
+ var _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
11194
11194
  ...{
11195
11195
  name: "PlusTableColumnDragSort"
11196
11196
  },
@@ -11241,7 +11241,7 @@
11241
11241
  "class-name": "plus-table-column-drag-sort"
11242
11242
  }, _ctx.dragSortableTableColumnProps), {
11243
11243
  default: vue.withCtx(() => [
11244
- vue.createElementVNode("span", _hoisted_1$b, [
11244
+ vue.createElementVNode("span", _hoisted_1$c, [
11245
11245
  vue.renderSlot(_ctx.$slots, "drag-sort-icon", {}, () => [
11246
11246
  vue.createTextVNode("\u2637")
11247
11247
  ])
@@ -11254,13 +11254,13 @@
11254
11254
  }
11255
11255
  });
11256
11256
 
11257
- var PlusTableColumnDragSort = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "table-column-drag-sort.vue"]]);
11257
+ var PlusTableColumnDragSort = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__file", "table-column-drag-sort.vue"]]);
11258
11258
 
11259
- const _hoisted_1$a = {
11259
+ const _hoisted_1$b = {
11260
11260
  key: 0,
11261
11261
  style: { "padding-top": "12px" }
11262
11262
  };
11263
- var _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
11263
+ var _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
11264
11264
  ...{
11265
11265
  name: "PlusPopover"
11266
11266
  },
@@ -11306,7 +11306,7 @@
11306
11306
  ]),
11307
11307
  default: vue.withCtx(() => [
11308
11308
  vue.renderSlot(_ctx.$slots, "default"),
11309
- _ctx.hasShowBottomButton ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
11309
+ _ctx.hasShowBottomButton ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
11310
11310
  vue.createVNode(vue.unref(elementPlus.ElButton), {
11311
11311
  size: "small",
11312
11312
  plain: "",
@@ -11347,12 +11347,12 @@
11347
11347
  }
11348
11348
  });
11349
11349
 
11350
- var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "index.vue"]]);
11350
+ var Popover = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "index.vue"]]);
11351
11351
 
11352
11352
  const PlusPopover = Popover;
11353
11353
 
11354
- const _hoisted_1$9 = { class: "plus-table-title-bar" };
11355
- const _hoisted_2$4 = { class: "plus-table-title-bar__title" };
11354
+ const _hoisted_1$a = { class: "plus-table-title-bar" };
11355
+ const _hoisted_2$5 = { class: "plus-table-title-bar__title" };
11356
11356
  const _hoisted_3$2 = { class: "plus-table-title-bar__toolbar" };
11357
11357
  const _hoisted_4$2 = { class: "plus-table-title-bar__toolbar__density" };
11358
11358
  const _hoisted_5$2 = /* @__PURE__ */ vue.createElementVNode(
@@ -11377,7 +11377,7 @@
11377
11377
  };
11378
11378
  const _hoisted_8$1 = { key: 1 };
11379
11379
  const _hoisted_9$1 = { key: 1 };
11380
- var _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
11380
+ var _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
11381
11381
  ...{
11382
11382
  name: "PlusTableToolbar"
11383
11383
  },
@@ -11528,8 +11528,8 @@
11528
11528
  });
11529
11529
  return (_ctx, _cache) => {
11530
11530
  var _a, _b, _c;
11531
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
11532
- vue.createElementVNode("div", _hoisted_2$4, [
11531
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
11532
+ vue.createElementVNode("div", _hoisted_2$5, [
11533
11533
  vue.renderSlot(_ctx.$slots, "title", {}, () => [
11534
11534
  vue.createTextVNode(
11535
11535
  vue.toDisplayString(titleBarConfig.value.title),
@@ -11830,7 +11830,7 @@
11830
11830
  }
11831
11831
  });
11832
11832
 
11833
- var PlusTableTitleBar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "table-title-bar.vue"]]);
11833
+ var PlusTableTitleBar = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "table-title-bar.vue"]]);
11834
11834
 
11835
11835
  const useTableColumns = ({ columns, skipEqual = true }) => {
11836
11836
  const filterColumns = vue.shallowRef([]);
@@ -11868,8 +11868,8 @@
11868
11868
  };
11869
11869
  };
11870
11870
 
11871
- const _hoisted_1$8 = { class: "plus-table-expand-col" };
11872
- var _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
11871
+ const _hoisted_1$9 = { class: "plus-table-expand-col" };
11872
+ var _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
11873
11873
  ...{
11874
11874
  name: "PlusTable",
11875
11875
  inheritAttrs: false
@@ -12230,7 +12230,7 @@
12230
12230
  }, _ctx.expandTableColumnProps),
12231
12231
  {
12232
12232
  default: vue.withCtx((scoped) => [
12233
- vue.createElementVNode("div", _hoisted_1$8, [
12233
+ vue.createElementVNode("div", _hoisted_1$9, [
12234
12234
  vue.renderSlot(_ctx.$slots, "expand", vue.mergeProps({
12235
12235
  index: scoped.$index
12236
12236
  }, scoped))
@@ -12341,10 +12341,677 @@
12341
12341
  }
12342
12342
  });
12343
12343
 
12344
- var _Table = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__file", "index.vue"]]);
12344
+ var _Table = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "index.vue"]]);
12345
12345
 
12346
12346
  const PlusTable = _Table;
12347
12347
 
12348
+ const _hoisted_1$8 = { class: "plus-table-lite__header" };
12349
+ const _hoisted_2$4 = ["innerHTML"];
12350
+ var _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
12351
+ ...{
12352
+ name: "PlusTableLite",
12353
+ inheritAttrs: false
12354
+ },
12355
+ __name: "index",
12356
+ props: {
12357
+ tableData: { default: void 0 },
12358
+ data: { default: void 0 },
12359
+ columns: { default: () => [] },
12360
+ defaultSize: { default: "default" },
12361
+ pagination: { type: [Boolean, Object], default: false },
12362
+ actionBar: { type: [Boolean, Object], default: false },
12363
+ hasIndexColumn: { type: Boolean, default: false },
12364
+ titleBar: { type: [Boolean, Object], default: true },
12365
+ isSelection: { type: Boolean, default: false },
12366
+ specialColumnsOrder: { default: void 0 },
12367
+ loadingStatus: { type: Boolean, default: false },
12368
+ rowKey: { type: [String, Function], default: "id" },
12369
+ defaultSelectedKeys: { default: () => [] },
12370
+ selectionTableColumnProps: { default: () => ({ width: 40 }) },
12371
+ indexTableColumnProps: { default: () => ({}) },
12372
+ indexContentStyle: { type: [Object, Function], default: () => ({}) },
12373
+ headerCellStyle: { default: () => ({
12374
+ "background-color": "var(--el-fill-color-light)"
12375
+ }) },
12376
+ emptyValue: { default: void 0 },
12377
+ size: {},
12378
+ width: {},
12379
+ height: {},
12380
+ maxHeight: {},
12381
+ fit: { type: Boolean },
12382
+ stripe: { type: Boolean },
12383
+ border: { type: Boolean, default: true },
12384
+ context: {},
12385
+ showHeader: { type: Boolean },
12386
+ showSummary: { type: Boolean },
12387
+ sumText: {},
12388
+ summaryMethod: {},
12389
+ rowClassName: {},
12390
+ rowStyle: {},
12391
+ cellClassName: {},
12392
+ cellStyle: {},
12393
+ headerRowClassName: {},
12394
+ headerRowStyle: {},
12395
+ headerCellClassName: {},
12396
+ highlightCurrentRow: { type: Boolean },
12397
+ currentRowKey: {},
12398
+ emptyText: {},
12399
+ expandRowKeys: {},
12400
+ defaultExpandAll: { type: Boolean },
12401
+ defaultSort: {},
12402
+ tooltipEffect: {},
12403
+ tooltipOptions: {},
12404
+ spanMethod: {},
12405
+ selectOnIndeterminate: { type: Boolean },
12406
+ indent: {},
12407
+ treeProps: {},
12408
+ lazy: { type: Boolean },
12409
+ load: {},
12410
+ className: {},
12411
+ style: {},
12412
+ tableLayout: {},
12413
+ scrollbarAlwaysOn: { type: Boolean },
12414
+ flexible: { type: Boolean },
12415
+ showOverflowTooltip: { type: [Boolean, Object] }
12416
+ },
12417
+ emits: ["selection-change", "paginationChange", "clickAction", "clickActionConfirmCancel", "refresh", "filterTableHeader"],
12418
+ setup(__props, { expose: __expose, emit: __emit }) {
12419
+ var _a, _b;
12420
+ const props = __props;
12421
+ const emit = __emit;
12422
+ const { t } = useLocale();
12423
+ const tableInstance = vue.shallowRef(null);
12424
+ const wrapperInstance = vue.ref(null);
12425
+ const paginationInstance = vue.ref(null);
12426
+ const state = vue.reactive({
12427
+ size: props.defaultSize,
12428
+ subPageInfo: {
12429
+ ...((_a = props.pagination) == null ? void 0 : _a.modelValue) || DefaultPageInfo
12430
+ }
12431
+ });
12432
+ const __tableData = vue.computed(() => {
12433
+ var _a2, _b2;
12434
+ return (_b2 = (_a2 = props.tableData) != null ? _a2 : props.data) != null ? _b2 : [];
12435
+ });
12436
+ const { subColumns, filterColumns, columnsIsChange, setFilterColumns } = useTableColumns({
12437
+ columns: () => props.columns || []
12438
+ });
12439
+ const resolveEmptyText = (column) => {
12440
+ var _a2, _b2;
12441
+ return (_b2 = (_a2 = column.emptyValue) != null ? _a2 : props.emptyValue) != null ? _b2 : "";
12442
+ };
12443
+ const toVNode = (result) => {
12444
+ if (result === null || result === void 0 || result === "") return vue.createTextVNode("");
12445
+ if (isString(result) || typeof result === "number") return vue.createTextVNode(String(result));
12446
+ if (vue.isVNode(result)) return result;
12447
+ return vue.h(result);
12448
+ };
12449
+ const getByPath = (target, path) => {
12450
+ const keys = path.replace(/\[(\w+)\]/g, ".$1").split(".").filter(Boolean);
12451
+ let current = target;
12452
+ for (const key of keys) {
12453
+ if (current === null || current === void 0) return void 0;
12454
+ current = current[key];
12455
+ }
12456
+ return current;
12457
+ };
12458
+ const preparedColumns = vue.computed(
12459
+ () => subColumns.value.map((column) => {
12460
+ const prop = column.prop;
12461
+ const label = getLabel(column.label);
12462
+ const isSimpleProp = !prop.includes(".") && !prop.includes("[");
12463
+ const readValue = isSimpleProp ? (row) => row == null ? void 0 : row[prop] : (row) => getByPath(row, prop);
12464
+ const cellText = (row, index) => {
12465
+ const value = readValue(row);
12466
+ if (isFunction(column.formatter)) {
12467
+ const formatted = column.formatter(value, { row, column, index });
12468
+ return String(
12469
+ formatted === null || formatted === void 0 ? resolveEmptyText(column) : formatted
12470
+ );
12471
+ }
12472
+ return value === null || value === void 0 || value === "" ? String(resolveEmptyText(column)) : String(value);
12473
+ };
12474
+ const prepared = {
12475
+ key: getTableKey(column, true),
12476
+ prop,
12477
+ column,
12478
+ tableColumnProps: column.tableColumnProps || {},
12479
+ label,
12480
+ width: column.width,
12481
+ minWidth: column.minWidth,
12482
+ headerSlotName: getTableHeaderSlotName(prop),
12483
+ cellSlotName: getTableCellSlotName(prop),
12484
+ tooltip: !!column.tooltip,
12485
+ tooltipProps: getTooltip(column.tooltip),
12486
+ readValue,
12487
+ cellText
12488
+ };
12489
+ if (isFunction(column.renderHeader)) {
12490
+ prepared.headerRender = () => {
12491
+ var _a2;
12492
+ return toVNode((_a2 = column.renderHeader) == null ? void 0 : _a2.call(column, label, column));
12493
+ };
12494
+ }
12495
+ if (isFunction(column.render)) {
12496
+ prepared.cellRender = ({ row, index }) => {
12497
+ var _a2;
12498
+ return toVNode((_a2 = column.render) == null ? void 0 : _a2.call(column, readValue(row), { row, column, index }));
12499
+ };
12500
+ } else if (isFunction(column.renderHTML)) {
12501
+ prepared.cellHTML = (row, index) => {
12502
+ var _a2, _b2;
12503
+ return String((_b2 = (_a2 = column.renderHTML) == null ? void 0 : _a2.call(column, readValue(row), { row, column, index })) != null ? _b2 : "");
12504
+ };
12505
+ }
12506
+ return prepared;
12507
+ })
12508
+ );
12509
+ const getRowKeyValue = (row) => {
12510
+ const { rowKey } = props;
12511
+ if (isFunction(rowKey)) return rowKey(row);
12512
+ return row == null ? void 0 : row[rowKey];
12513
+ };
12514
+ const selectedKeys = vue.ref(new Set(props.defaultSelectedKeys));
12515
+ let selectedRowCache = /* @__PURE__ */ new Map();
12516
+ function isRowSelectable(row, index) {
12517
+ var _a2;
12518
+ const selectable = (_a2 = props.selectionTableColumnProps) == null ? void 0 : _a2.selectable;
12519
+ return isFunction(selectable) ? selectable(row, index) !== false : true;
12520
+ }
12521
+ const selectableRows = vue.computed(
12522
+ () => __tableData.value.filter((row, index) => isRowSelectable(row, index))
12523
+ );
12524
+ const isRowSelected = (row) => {
12525
+ const key = getRowKeyValue(row);
12526
+ return key === void 0 ? false : selectedKeys.value.has(key);
12527
+ };
12528
+ const isAllSelected = vue.computed(
12529
+ () => selectableRows.value.length > 0 && selectableRows.value.every((row) => selectedKeys.value.has(getRowKeyValue(row)))
12530
+ );
12531
+ const isIndeterminate = vue.computed(
12532
+ () => !isAllSelected.value && selectableRows.value.some((row) => selectedKeys.value.has(getRowKeyValue(row)))
12533
+ );
12534
+ const getSelectedRows = () => {
12535
+ const rows = [];
12536
+ selectedRowCache.forEach((row, key) => {
12537
+ if (selectedKeys.value.has(key)) rows.push(row);
12538
+ });
12539
+ return rows;
12540
+ };
12541
+ const handleToggleRow = (row, checked) => {
12542
+ const key = getRowKeyValue(row);
12543
+ if (key === void 0) return;
12544
+ if (checked) {
12545
+ selectedKeys.value.add(key);
12546
+ selectedRowCache.set(key, row);
12547
+ } else {
12548
+ selectedKeys.value.delete(key);
12549
+ selectedRowCache.delete(key);
12550
+ }
12551
+ emit("selection-change", getSelectedRows());
12552
+ };
12553
+ const handleToggleAll = () => {
12554
+ const nextAllSelected = !isAllSelected.value;
12555
+ selectableRows.value.forEach((row) => {
12556
+ const key = getRowKeyValue(row);
12557
+ if (key === void 0) return;
12558
+ if (nextAllSelected) {
12559
+ selectedKeys.value.add(key);
12560
+ selectedRowCache.set(key, row);
12561
+ } else {
12562
+ selectedKeys.value.delete(key);
12563
+ selectedRowCache.delete(key);
12564
+ }
12565
+ });
12566
+ emit("selection-change", getSelectedRows());
12567
+ };
12568
+ const clearSelection = () => {
12569
+ selectedKeys.value = /* @__PURE__ */ new Set();
12570
+ selectedRowCache = /* @__PURE__ */ new Map();
12571
+ };
12572
+ const syncSelectedRowCache = (rows) => {
12573
+ if (!selectedKeys.value.size || !(rows == null ? void 0 : rows.length)) return;
12574
+ rows.forEach((row) => {
12575
+ const key = getRowKeyValue(row);
12576
+ if (key !== void 0 && selectedKeys.value.has(key)) {
12577
+ selectedRowCache.set(key, row);
12578
+ }
12579
+ });
12580
+ };
12581
+ vue.watch(
12582
+ () => __tableData.value,
12583
+ (rows) => syncSelectedRowCache(rows || []),
12584
+ { immediate: true }
12585
+ );
12586
+ vue.watch(
12587
+ () => props.defaultSelectedKeys,
12588
+ (keys) => {
12589
+ if (!(keys == null ? void 0 : keys.length)) return;
12590
+ keys.forEach((key) => selectedKeys.value.add(key));
12591
+ syncSelectedRowCache(__tableData.value);
12592
+ }
12593
+ );
12594
+ const specialColumns = vue.computed(() => {
12595
+ const active = [];
12596
+ if (props.isSelection) active.push("selection");
12597
+ if (props.hasIndexColumn) active.push("index");
12598
+ const defaultOrder = ["selection", "index"];
12599
+ const order = [...props.specialColumnsOrder || [], ...defaultOrder].filter(
12600
+ (item, index, array) => array.indexOf(item) === index
12601
+ );
12602
+ return order.filter((item) => active.includes(item));
12603
+ });
12604
+ const selectionProps = vue.computed(() => props.selectionTableColumnProps || {});
12605
+ const selectionWidth = vue.computed(() => selectionProps.value.width || 40);
12606
+ const selectionAlign = vue.computed(() => selectionProps.value.align || "center");
12607
+ const selectionFixed = vue.computed(
12608
+ () => {
12609
+ var _a2;
12610
+ return (_a2 = selectionProps.value.fixed) != null ? _a2 : "left";
12611
+ }
12612
+ );
12613
+ const indexProps = vue.computed(() => props.indexTableColumnProps || {});
12614
+ const indexFixed = vue.computed(
12615
+ () => indexProps.value.fixed || "left"
12616
+ );
12617
+ const getIndexValue = (index) => {
12618
+ const customIndex = indexProps.value.index;
12619
+ if (isFunction(customIndex)) return customIndex(index);
12620
+ if (typeof customIndex === "number") return customIndex;
12621
+ const { page, pageSize } = state.subPageInfo;
12622
+ return (page - 1) * pageSize + index + 1;
12623
+ };
12624
+ const getIndexStyle = (row, index) => {
12625
+ const style = props.indexContentStyle;
12626
+ if (isFunction(style)) return style(row, index);
12627
+ if (isPlainObject(style)) return style;
12628
+ return {};
12629
+ };
12630
+ const actionBarLabel = vue.computed(
12631
+ () => props.actionBar ? vue.unref(props.actionBar.label) || t("plus.table.action") : ""
12632
+ );
12633
+ const actionBarFixed = vue.computed(
12634
+ () => (props.actionBar ? props.actionBar.fixed : void 0) || "right"
12635
+ );
12636
+ const handlePaginationChange = () => {
12637
+ emit("paginationChange", { ...state.subPageInfo });
12638
+ };
12639
+ const handleRefresh = () => emit("refresh");
12640
+ const handleClickDensity = (size) => {
12641
+ state.size = size;
12642
+ };
12643
+ const handleFilterTableConfirm = (list, eventType) => {
12644
+ setFilterColumns(list);
12645
+ emit("filterTableHeader", list, eventType);
12646
+ };
12647
+ const adaptiveHeight = vue.ref();
12648
+ const resolvedHeight = vue.computed(() => {
12649
+ const height = props.height;
12650
+ return height !== void 0 ? height : adaptiveHeight.value;
12651
+ });
12652
+ const hasAdaptive = vue.computed(() => props.height === void 0 && !!props.adaptive);
12653
+ const calcAdaptiveHeight = () => {
12654
+ var _a2;
12655
+ if (!wrapperInstance.value) return;
12656
+ let offsetBottom = 20;
12657
+ if (isPlainObject(props.adaptive)) {
12658
+ offsetBottom = (_a2 = props.adaptive.offsetBottom) != null ? _a2 : offsetBottom;
12659
+ }
12660
+ const paginationHeight = paginationInstance.value && props.pagination ? paginationInstance.value.$el.offsetHeight : 0;
12661
+ const top = wrapperInstance.value.getBoundingClientRect().top;
12662
+ adaptiveHeight.value = Math.max(window.innerHeight - top - offsetBottom - paginationHeight, 100);
12663
+ };
12664
+ const debounceCalcAdaptiveHeight = debounce(
12665
+ calcAdaptiveHeight,
12666
+ isPlainObject(props.adaptive) ? (_b = props.adaptive.timeout) != null ? _b : 60 : 60
12667
+ );
12668
+ vue.onMounted(() => {
12669
+ if (hasAdaptive.value) {
12670
+ calcAdaptiveHeight();
12671
+ window.addEventListener("resize", debounceCalcAdaptiveHeight);
12672
+ }
12673
+ });
12674
+ vue.onBeforeUnmount(() => {
12675
+ window.removeEventListener("resize", debounceCalcAdaptiveHeight);
12676
+ });
12677
+ vue.provide(TableFormRefInjectionKey, vue.shallowRef({}));
12678
+ __expose({
12679
+ /** el-table 实例,可用于 doLayout 等 */
12680
+ tableInstance,
12681
+ /** 获取所有已选行(跨页累计) */
12682
+ getSelectedRows,
12683
+ /** 清空所有已选(跨页) */
12684
+ clearSelection,
12685
+ /** 当前已选 rowKey 列表 */
12686
+ getSelectedKeys: () => Array.from(selectedKeys.value)
12687
+ });
12688
+ return (_ctx, _cache) => {
12689
+ return vue.openBlock(), vue.createElementBlock(
12690
+ "div",
12691
+ {
12692
+ ref_key: "wrapperInstance",
12693
+ ref: wrapperInstance,
12694
+ class: "plus-table-lite"
12695
+ },
12696
+ [
12697
+ vue.createCommentVNode(" \u6807\u9898\u680F\uFF1A\u5237\u65B0 / \u5BC6\u5EA6 / \u5217\u8BBE\u7F6E\uFF0C\u4E0E PlusTable \u5171\u7528\u540C\u4E00\u4EFD\u5B9E\u73B0 "),
12698
+ _ctx.titleBar ? (vue.openBlock(), vue.createBlock(vue.unref(PlusTableTitleBar), {
12699
+ key: 0,
12700
+ "origin-columns": _ctx.columns || [],
12701
+ columns: vue.unref(filterColumns),
12702
+ "default-size": state.size,
12703
+ "columns-is-change": vue.unref(columnsIsChange),
12704
+ "title-bar": _ctx.titleBar,
12705
+ onClickDensity: handleClickDensity,
12706
+ onFilterTableHeader: handleFilterTableConfirm,
12707
+ onRefresh: handleRefresh
12708
+ }, vue.createSlots({
12709
+ title: vue.withCtx(() => [
12710
+ vue.renderSlot(_ctx.$slots, "title")
12711
+ ]),
12712
+ toolbar: vue.withCtx(() => [
12713
+ vue.renderSlot(_ctx.$slots, "toolbar")
12714
+ ]),
12715
+ _: 2
12716
+ /* DYNAMIC */
12717
+ }, [
12718
+ _ctx.$slots["drag-sort-icon"] ? {
12719
+ name: "drag-sort-icon",
12720
+ fn: vue.withCtx(() => [
12721
+ vue.renderSlot(_ctx.$slots, "drag-sort-icon")
12722
+ ]),
12723
+ key: "0"
12724
+ } : void 0,
12725
+ _ctx.$slots["column-settings-icon"] ? {
12726
+ name: "column-settings-icon",
12727
+ fn: vue.withCtx(() => [
12728
+ vue.renderSlot(_ctx.$slots, "column-settings-icon")
12729
+ ]),
12730
+ key: "1"
12731
+ } : void 0,
12732
+ _ctx.$slots["density-icon"] ? {
12733
+ name: "density-icon",
12734
+ fn: vue.withCtx(() => [
12735
+ vue.renderSlot(_ctx.$slots, "density-icon")
12736
+ ]),
12737
+ key: "2"
12738
+ } : void 0
12739
+ ]), 1032, ["origin-columns", "columns", "default-size", "columns-is-change", "title-bar"])) : vue.createCommentVNode("v-if", true),
12740
+ vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTable), vue.mergeProps({
12741
+ ref_key: "tableInstance",
12742
+ ref: tableInstance,
12743
+ data: __tableData.value,
12744
+ border: _ctx.border,
12745
+ height: resolvedHeight.value,
12746
+ "header-cell-style": _ctx.headerCellStyle,
12747
+ size: state.size,
12748
+ "row-key": _ctx.rowKey
12749
+ }, _ctx.$attrs), {
12750
+ empty: vue.withCtx(() => [
12751
+ vue.renderSlot(_ctx.$slots, "empty")
12752
+ ]),
12753
+ default: vue.withCtx(() => [
12754
+ (vue.openBlock(true), vue.createElementBlock(
12755
+ vue.Fragment,
12756
+ null,
12757
+ vue.renderList(specialColumns.value, (type) => {
12758
+ return vue.openBlock(), vue.createElementBlock(
12759
+ vue.Fragment,
12760
+ { key: type },
12761
+ [
12762
+ vue.createCommentVNode("\n \u591A\u9009\u5217\n \u52FE\u9009\u72B6\u6001\u7531\u7EC4\u4EF6\u81EA\u8EAB\u7684 selectedKeys \u7EF4\u62A4\uFF0C\u56E0\u6B64\u7FFB\u9875\u540E\u4F9D\u7136\u4FDD\u7559\uFF1B\n \u4E0D\u4F7F\u7528 el-table \u5185\u7F6E\u7684 reserve-selection\uFF08\u5176\u884C\u4E3A\u4F9D\u8D56 selection \u5185\u90E8\u72B6\u6001\uFF0C\u8DE8\u9875\u4E0D\u53EF\u9760\uFF09\u3002\n "),
12763
+ type === "selection" ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableColumn), {
12764
+ key: "selection",
12765
+ "class-name": "plus-table-lite-selection",
12766
+ width: selectionWidth.value,
12767
+ align: selectionAlign.value,
12768
+ fixed: selectionFixed.value
12769
+ }, {
12770
+ header: vue.withCtx(() => [
12771
+ vue.createVNode(vue.unref(elementPlus.ElCheckbox), {
12772
+ "model-value": isAllSelected.value,
12773
+ indeterminate: isIndeterminate.value,
12774
+ onChange: handleToggleAll
12775
+ }, null, 8, ["model-value", "indeterminate"])
12776
+ ]),
12777
+ default: vue.withCtx(({ row, $index }) => [
12778
+ vue.createVNode(vue.unref(elementPlus.ElCheckbox), {
12779
+ "model-value": isRowSelected(row),
12780
+ disabled: !isRowSelectable(row, $index),
12781
+ onChange: (checked) => handleToggleRow(row, !!checked)
12782
+ }, null, 8, ["model-value", "disabled", "onChange"])
12783
+ ]),
12784
+ _: 1
12785
+ /* STABLE */
12786
+ }, 8, ["width", "align", "fixed"])) : (vue.openBlock(), vue.createElementBlock(
12787
+ vue.Fragment,
12788
+ { key: 1 },
12789
+ [
12790
+ vue.createCommentVNode(" \u5E8F\u53F7\u5217 "),
12791
+ vue.createVNode(vue.unref(elementPlus.ElTableColumn), {
12792
+ key: "index",
12793
+ type: "index",
12794
+ label: "#",
12795
+ "class-name": "plus-table-lite-index",
12796
+ width: indexProps.value.width || 60,
12797
+ fixed: indexFixed.value,
12798
+ align: "center",
12799
+ index: getIndexValue
12800
+ }, {
12801
+ default: vue.withCtx(({ $index }) => [
12802
+ vue.createElementVNode(
12803
+ "div",
12804
+ {
12805
+ class: "plus-table-lite-index__content",
12806
+ style: vue.normalizeStyle(getIndexStyle(__tableData.value[$index], $index))
12807
+ },
12808
+ vue.toDisplayString(getIndexValue($index)),
12809
+ 5
12810
+ /* TEXT, STYLE */
12811
+ )
12812
+ ]),
12813
+ _: 1
12814
+ /* STABLE */
12815
+ }, 8, ["width", "fixed"])
12816
+ ],
12817
+ 2112
12818
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
12819
+ ))
12820
+ ],
12821
+ 64
12822
+ /* STABLE_FRAGMENT */
12823
+ );
12824
+ }),
12825
+ 128
12826
+ /* KEYED_FRAGMENT */
12827
+ )),
12828
+ (vue.openBlock(true), vue.createElementBlock(
12829
+ vue.Fragment,
12830
+ null,
12831
+ vue.renderList(preparedColumns.value, (col) => {
12832
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableColumn), vue.mergeProps({
12833
+ key: col.key
12834
+ }, col.tableColumnProps, {
12835
+ prop: col.prop,
12836
+ label: col.label,
12837
+ width: col.width,
12838
+ "min-width": col.minWidth
12839
+ }), {
12840
+ header: vue.withCtx((scoped) => [
12841
+ vue.createElementVNode("span", _hoisted_1$8, [
12842
+ vue.renderSlot(_ctx.$slots, col.headerSlotName, vue.mergeProps(scoped, {
12843
+ prop: col.prop,
12844
+ label: col.label,
12845
+ column: col.column
12846
+ }), () => [
12847
+ col.headerRender ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(col.headerRender), { key: 0 })) : (vue.openBlock(), vue.createElementBlock(
12848
+ vue.Fragment,
12849
+ { key: 1 },
12850
+ [
12851
+ vue.createTextVNode(
12852
+ vue.toDisplayString(col.label),
12853
+ 1
12854
+ /* TEXT */
12855
+ )
12856
+ ],
12857
+ 64
12858
+ /* STABLE_FRAGMENT */
12859
+ ))
12860
+ ]),
12861
+ col.tooltip ? (vue.openBlock(), vue.createBlock(
12862
+ vue.unref(elementPlus.ElTooltip),
12863
+ vue.mergeProps({
12864
+ key: 0,
12865
+ placement: "top"
12866
+ }, col.tooltipProps),
12867
+ {
12868
+ default: vue.withCtx(() => [
12869
+ vue.renderSlot(_ctx.$slots, "tooltip-icon", {}, () => [
12870
+ vue.createVNode(vue.unref(elementPlus.ElIcon), {
12871
+ class: "plus-table-lite__header__icon",
12872
+ size: 16
12873
+ }, {
12874
+ default: vue.withCtx(() => [
12875
+ vue.createVNode(vue.unref(question_filled_default))
12876
+ ]),
12877
+ _: 1
12878
+ /* STABLE */
12879
+ })
12880
+ ])
12881
+ ]),
12882
+ _: 2
12883
+ /* DYNAMIC */
12884
+ },
12885
+ 1040
12886
+ /* FULL_PROPS, DYNAMIC_SLOTS */
12887
+ )) : vue.createCommentVNode("v-if", true)
12888
+ ])
12889
+ ]),
12890
+ default: vue.withCtx(({ row, $index }) => [
12891
+ vue.renderSlot(_ctx.$slots, col.cellSlotName, {
12892
+ row,
12893
+ index: $index,
12894
+ value: col.readValue(row),
12895
+ column: col.column
12896
+ }, () => [
12897
+ vue.createCommentVNode(" \u81EA\u5B9A\u4E49 render\uFF1A\u552F\u4E00\u9700\u8981\u7EC4\u4EF6\u7684\u4F4D\u7F6E\uFF0C\u6309\u5217\u521B\u5EFA\u4E00\u6B21 "),
12898
+ col.cellRender ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(col.cellRender), {
12899
+ key: 0,
12900
+ row,
12901
+ index: $index
12902
+ }, null, 8, ["row", "index"])) : col.cellHTML ? (vue.openBlock(), vue.createElementBlock(
12903
+ vue.Fragment,
12904
+ { key: 1 },
12905
+ [
12906
+ vue.createCommentVNode(" renderHTML "),
12907
+ vue.createElementVNode("span", {
12908
+ innerHTML: col.cellHTML(row, $index)
12909
+ }, null, 8, _hoisted_2$4)
12910
+ ],
12911
+ 2112
12912
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
12913
+ )) : (vue.openBlock(), vue.createElementBlock(
12914
+ vue.Fragment,
12915
+ { key: 2 },
12916
+ [
12917
+ vue.createCommentVNode(" \u7EAF\u6587\u672C\uFF1A\u96F6\u5B9E\u4F8B "),
12918
+ vue.createTextVNode(
12919
+ vue.toDisplayString(col.cellText(row, $index)),
12920
+ 1
12921
+ /* TEXT */
12922
+ )
12923
+ ],
12924
+ 64
12925
+ /* STABLE_FRAGMENT */
12926
+ ))
12927
+ ])
12928
+ ]),
12929
+ _: 2
12930
+ /* DYNAMIC */
12931
+ }, 1040, ["prop", "label", "width", "min-width"]);
12932
+ }),
12933
+ 128
12934
+ /* KEYED_FRAGMENT */
12935
+ )),
12936
+ _ctx.actionBar ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableColumn), vue.mergeProps({
12937
+ key: 0,
12938
+ "class-name": "plus-table-action-bar",
12939
+ label: actionBarLabel.value,
12940
+ fixed: actionBarFixed.value,
12941
+ width: _ctx.actionBar.width || 200
12942
+ }, _ctx.actionBar.actionBarTableColumnProps), {
12943
+ default: vue.withCtx(({ row, $index }) => [
12944
+ vue.createVNode(vue.unref(PlusTableActionBarContent), {
12945
+ row,
12946
+ index: $index,
12947
+ type: _ctx.actionBar.type,
12948
+ buttons: _ctx.actionBar.buttons,
12949
+ "show-number": _ctx.actionBar.showNumber,
12950
+ "show-limit-include-more": _ctx.actionBar.showLimitIncludeMore,
12951
+ "confirm-type": _ctx.actionBar.confirmType,
12952
+ "more-type": _ctx.actionBar.moreType,
12953
+ onClickAction: _cache[0] || (_cache[0] = (data) => emit("clickAction", data)),
12954
+ onClickActionConfirmCancel: _cache[1] || (_cache[1] = (data) => emit("clickActionConfirmCancel", data))
12955
+ }, vue.createSlots({
12956
+ _: 2
12957
+ /* DYNAMIC */
12958
+ }, [
12959
+ _ctx.$slots["action-bar-more-icon"] ? {
12960
+ name: "action-bar-more-icon",
12961
+ fn: vue.withCtx(() => [
12962
+ vue.renderSlot(_ctx.$slots, "action-bar-more-icon")
12963
+ ]),
12964
+ key: "0"
12965
+ } : void 0
12966
+ ]), 1032, ["row", "index", "type", "buttons", "show-number", "show-limit-include-more", "confirm-type", "more-type"])
12967
+ ]),
12968
+ _: 3
12969
+ /* FORWARDED */
12970
+ }, 16, ["label", "fixed", "width"])) : vue.createCommentVNode("v-if", true)
12971
+ ]),
12972
+ _: 3
12973
+ /* FORWARDED */
12974
+ }, 16, ["data", "border", "height", "header-cell-style", "size", "row-key"])), [
12975
+ [vue.unref(elementPlus.vLoading), _ctx.loadingStatus]
12976
+ ]),
12977
+ vue.createCommentVNode(" \u5206\u9875 "),
12978
+ _ctx.pagination ? (vue.openBlock(), vue.createBlock(vue.unref(PlusPagination), vue.mergeProps({
12979
+ key: 1,
12980
+ ref_key: "paginationInstance",
12981
+ ref: paginationInstance,
12982
+ modelValue: state.subPageInfo,
12983
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => state.subPageInfo = $event)
12984
+ }, _ctx.pagination, { onChange: handlePaginationChange }), vue.createSlots({
12985
+ _: 2
12986
+ /* DYNAMIC */
12987
+ }, [
12988
+ _ctx.$slots["pagination-left"] ? {
12989
+ name: "pagination-left",
12990
+ fn: vue.withCtx(() => [
12991
+ vue.renderSlot(_ctx.$slots, "pagination-left")
12992
+ ]),
12993
+ key: "0"
12994
+ } : void 0,
12995
+ _ctx.$slots["pagination-right"] ? {
12996
+ name: "pagination-right",
12997
+ fn: vue.withCtx(() => [
12998
+ vue.renderSlot(_ctx.$slots, "pagination-right")
12999
+ ]),
13000
+ key: "1"
13001
+ } : void 0
13002
+ ]), 1040, ["modelValue"])) : vue.createCommentVNode("v-if", true)
13003
+ ],
13004
+ 512
13005
+ /* NEED_PATCH */
13006
+ );
13007
+ };
13008
+ }
13009
+ });
13010
+
13011
+ var TableLite = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__file", "index.vue"]]);
13012
+
13013
+ const PlusTableLite = TableLite;
13014
+
12348
13015
  const _hoisted_1$7 = { class: "plus-table-v2-header" };
12349
13016
  var _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
12350
13017
  ...{
@@ -13968,6 +14635,7 @@
13968
14635
  table: { default: () => ({}) },
13969
14636
  tableType: { default: "table" },
13970
14637
  tableV2: { default: void 0 },
14638
+ tableLite: { default: void 0 },
13971
14639
  params: { default: () => ({}) },
13972
14640
  postData: { type: Function, default: void 0 },
13973
14641
  beforeSearchSubmit: { type: Function, default: void 0 },
@@ -13986,7 +14654,7 @@
13986
14654
  searchSlot: { type: Boolean, default: false },
13987
14655
  resetSearch: { type: Boolean, default: true }
13988
14656
  },
13989
- emits: ["update:searchValues", "search", "reset", "searchChange", "paginationChange", "requestError", "requestComplete"],
14657
+ emits: ["update:searchValues", "search", "reset", "searchChange", "paginationChange", "selectionChange", "requestError", "requestComplete"],
13990
14658
  setup(__props, { expose: __expose, emit: __emit }) {
13991
14659
  var _a, _b;
13992
14660
  const props = __props;
@@ -14023,13 +14691,17 @@
14023
14691
  );
14024
14692
  const tableComponentMap = /* @__PURE__ */ new Map([
14025
14693
  ["table", PlusTable],
14026
- ["table-v2", PlusTableV2]
14694
+ ["table-v2", PlusTableV2],
14695
+ ["table-lite", PlusTableLite]
14027
14696
  ]);
14028
14697
  const tableComponent = vue.computed(() => tableComponentMap.get(props.tableType) || PlusTable);
14029
14698
  const tableProps = vue.computed(() => {
14030
14699
  if (props.tableType === "table-v2") {
14031
14700
  return { ...props.table, ...props.tableV2 };
14032
14701
  }
14702
+ if (props.tableType === "table-lite") {
14703
+ return { ...props.table, ...props.tableLite };
14704
+ }
14033
14705
  return props.table;
14034
14706
  });
14035
14707
  const tablePagination = vue.computed(() => {
@@ -14093,6 +14765,9 @@
14093
14765
  const handleTablePaginationChange = (data) => {
14094
14766
  handlePaginationChange(data);
14095
14767
  };
14768
+ const handleTableSelectionChange = (data) => {
14769
+ emit("selectionChange", data || []);
14770
+ };
14096
14771
  const handleSearchChange = (val, column) => {
14097
14772
  emit("update:searchValues", val);
14098
14773
  emit("searchChange", val, column);
@@ -14217,7 +14892,8 @@
14217
14892
  columns: _ctx.columns,
14218
14893
  pagination: tablePagination.value,
14219
14894
  onPaginationChange: handleTablePaginationChange,
14220
- onRefresh: handleRefresh
14895
+ onRefresh: handleRefresh,
14896
+ onSelectionChange: handleTableSelectionChange
14221
14897
  }), vue.createSlots({
14222
14898
  _: 2
14223
14899
  /* DYNAMIC */
@@ -15660,6 +16336,7 @@
15660
16336
  PlusDialog,
15661
16337
  PlusPagination,
15662
16338
  PlusTable,
16339
+ PlusTableLite,
15663
16340
  PlusTableV2,
15664
16341
  PlusRadio,
15665
16342
  PlusDatePicker,
@@ -15684,7 +16361,7 @@
15684
16361
 
15685
16362
  var installer = makeInstaller([...plugins]);
15686
16363
 
15687
- const version = "1.0.1";
16364
+ const version = "1.0.2";
15688
16365
 
15689
16366
  const install = installer.install;
15690
16367
 
@@ -15715,6 +16392,7 @@
15715
16392
  exports.PlusStepsForm = PlusStepsForm;
15716
16393
  exports.PlusTable = PlusTable;
15717
16394
  exports.PlusTableActionBarContent = PlusTableActionBarContent;
16395
+ exports.PlusTableLite = PlusTableLite;
15718
16396
  exports.PlusTableTitleBar = PlusTableTitleBar;
15719
16397
  exports.PlusTableV2 = PlusTableV2;
15720
16398
  exports.TableFormFieldRefInjectionKey = TableFormFieldRefInjectionKey;