bkui-vue 0.0.1-beta.49 → 0.0.1-beta.51

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 (76) hide show
  1. package/dist/index.cjs.js +25 -25
  2. package/dist/index.esm.js +448 -419
  3. package/dist/index.umd.js +26 -26
  4. package/dist/style.css +1 -1
  5. package/lib/alert/alert.d.ts +1 -1
  6. package/lib/alert/index.d.ts +4 -4
  7. package/lib/animate-number/animate-number.d.ts +1 -1
  8. package/lib/animate-number/index.d.ts +4 -4
  9. package/lib/backtop/backtop.d.ts +1 -1
  10. package/lib/backtop/index.d.ts +4 -4
  11. package/lib/badge/badge.d.ts +2 -2
  12. package/lib/badge/index.d.ts +7 -7
  13. package/lib/breadcrumb/breadcrumb.d.ts +1 -1
  14. package/lib/breadcrumb/index.d.ts +4 -4
  15. package/lib/button/button.d.ts +2 -2
  16. package/lib/button/index.d.ts +7 -7
  17. package/lib/components.js +1 -0
  18. package/lib/date-picker/date-picker.d.ts +6 -6
  19. package/lib/date-picker/index.d.ts +17 -17
  20. package/lib/date-picker/props.d.ts +1 -1
  21. package/lib/dialog/dialog.css +8 -8
  22. package/lib/dialog/dialog.d.ts +1 -1
  23. package/lib/dialog/dialog.variable.css +8 -8
  24. package/lib/dialog/index.d.ts +4 -4
  25. package/lib/dropdown/dropdown.d.ts +1 -1
  26. package/lib/dropdown/index.d.ts +4 -4
  27. package/lib/icon/help.js +1 -1
  28. package/lib/icon/index.js +1 -1
  29. package/lib/index.d.ts +0 -1
  30. package/lib/index.js +1 -0
  31. package/lib/input/index.d.ts +11 -3
  32. package/lib/input/index.js +1 -1
  33. package/lib/input/input.css +6 -2
  34. package/lib/input/input.d.ts +7 -1
  35. package/lib/input/input.less +6 -2
  36. package/lib/input/input.variable.css +6 -2
  37. package/lib/link/index.d.ts +7 -7
  38. package/lib/link/link.d.ts +2 -2
  39. package/lib/loading/index.d.ts +8 -0
  40. package/lib/loading/index.js +1 -1
  41. package/lib/loading/loading.d.ts +6 -0
  42. package/lib/modal/index.d.ts +4 -4
  43. package/lib/modal/modal.css +8 -8
  44. package/lib/modal/modal.d.ts +1 -1
  45. package/lib/modal/modal.less +25 -23
  46. package/lib/modal/modal.variable.css +8 -8
  47. package/lib/popover/index.d.ts +4 -4
  48. package/lib/popover/popover.d.ts +1 -1
  49. package/lib/preset.js +1 -0
  50. package/lib/resize-layout/index.d.ts +4 -4
  51. package/lib/resize-layout/resize-layout.d.ts +1 -1
  52. package/lib/select/index.d.ts +34 -4
  53. package/lib/select/index.js +1 -1
  54. package/lib/select/select.css +5 -0
  55. package/lib/select/select.d.ts +14 -1
  56. package/lib/select/select.less +6 -0
  57. package/lib/select/select.variable.css +5 -0
  58. package/lib/sideslider/index.d.ts +4 -4
  59. package/lib/sideslider/sideslider.d.ts +1 -1
  60. package/lib/slider/slider.d.ts +1 -1
  61. package/lib/switcher/index.d.ts +4 -4
  62. package/lib/switcher/switcher.d.ts +1 -1
  63. package/lib/tab/index.d.ts +8 -8
  64. package/lib/tab/tab-nav.d.ts +1 -1
  65. package/lib/tab/tab-panel.d.ts +1 -1
  66. package/lib/tab/tab.d.ts +2 -2
  67. package/lib/table/index.d.ts +4 -4
  68. package/lib/table/index.js +1 -1
  69. package/lib/table/table.css +8 -1
  70. package/lib/table/table.d.ts +3 -4
  71. package/lib/table/table.less +13 -1
  72. package/lib/table/table.variable.css +8 -1
  73. package/lib/table/use-common.d.ts +17 -0
  74. package/lib/table/utils.d.ts +0 -8
  75. package/package.json +8 -4
  76. package/lib/icon/help-fill.js +0 -1
package/dist/index.esm.js CHANGED
@@ -34,53 +34,6 @@ var __publicField = (obj, key, value) => {
34
34
  return value;
35
35
  };
36
36
  import { createVNode, h as h$1, mergeProps, defineComponent, reactive, ref, computed, watch, onMounted, onBeforeUnmount, Transition, getCurrentInstance, provide, inject, nextTick, isVNode, createTextVNode, Fragment, toRefs, customRef, onBeforeMount, withDirectives, vShow, toRef, unref, resolveDirective, vModelText, watchEffect, onUpdated, render, onUnmounted, Teleport } from "vue";
37
- var reset = "";
38
- var alert = "";
39
- var backtop = "";
40
- var badge = "";
41
- var breadcrumb = "";
42
- var button = "";
43
- var card = "";
44
- var checkbox = "";
45
- var collapse = "";
46
- var dialog = "";
47
- var exception = "";
48
- var fixedNavbar = "";
49
- var input = "";
50
- var link = "";
51
- var dropdown = "";
52
- var loading = "";
53
- var modal = "";
54
- var popover = "";
55
- var progress = "";
56
- var radio = "";
57
- var rate = "";
58
- var star$1 = "";
59
- var swiper = "";
60
- var select = "";
61
- var sideslider = "";
62
- var switcher = "";
63
- var table = "";
64
- var tag = "";
65
- var form = "";
66
- var steps = "";
67
- var message = "";
68
- var notify = "";
69
- var tree = "";
70
- var slider = "";
71
- var menu = "";
72
- var navigation = "";
73
- var datePicker = "";
74
- var divider = "";
75
- var tab = "";
76
- var process = "";
77
- var virtualRender$1 = "";
78
- var transfer = "";
79
- var pagination = "";
80
- var timeline = "";
81
- var codeDiff = "";
82
- var resizeLayout = "";
83
- var tagInput = "";
84
37
  const BKLAYERD_INDEX_EFAULT_VALUE = {
85
38
  ["bottom"]: 0,
86
39
  ["content"]: 1,
@@ -1880,11 +1833,11 @@ class BkMaskManager {
1880
1833
  Object.entries(maskStyle).forEach((cfg) => this.mask.style.setProperty(cfg[0], cfg[1]));
1881
1834
  }
1882
1835
  }
1883
- getMaskAttrTag(tag2) {
1884
- if (/^(auto|\s+)$/i.test(tag2) || tag2 === null || tag2 === void 0 || tag2 === "") {
1836
+ getMaskAttrTag(tag) {
1837
+ if (/^(auto|\s+)$/i.test(tag) || tag === null || tag === void 0 || tag === "") {
1885
1838
  return `__bk_mask_${random(16)}`;
1886
1839
  }
1887
- return tag2;
1840
+ return tag;
1888
1841
  }
1889
1842
  appendContentToMask(content) {
1890
1843
  this.mask.append(content);
@@ -3962,20 +3915,20 @@ var lodash = { exports: {} };
3962
3915
  return copyArray(value, result2);
3963
3916
  }
3964
3917
  } else {
3965
- var tag2 = getTag(value), isFunc = tag2 == funcTag || tag2 == genTag;
3918
+ var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
3966
3919
  if (isBuffer(value)) {
3967
3920
  return cloneBuffer(value, isDeep);
3968
3921
  }
3969
- if (tag2 == objectTag || tag2 == argsTag || isFunc && !object) {
3922
+ if (tag == objectTag || tag == argsTag || isFunc && !object) {
3970
3923
  result2 = isFlat || isFunc ? {} : initCloneObject(value);
3971
3924
  if (!isDeep) {
3972
3925
  return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value));
3973
3926
  }
3974
3927
  } else {
3975
- if (!cloneableTags[tag2]) {
3928
+ if (!cloneableTags[tag]) {
3976
3929
  return object ? value : {};
3977
3930
  }
3978
- result2 = initCloneByTag(value, tag2, isDeep);
3931
+ result2 = initCloneByTag(value, tag, isDeep);
3979
3932
  }
3980
3933
  }
3981
3934
  stack || (stack = new Stack());
@@ -5270,11 +5223,11 @@ var lodash = { exports: {} };
5270
5223
  };
5271
5224
  function createToPairs(keysFunc) {
5272
5225
  return function(object) {
5273
- var tag2 = getTag(object);
5274
- if (tag2 == mapTag) {
5226
+ var tag = getTag(object);
5227
+ if (tag == mapTag) {
5275
5228
  return mapToArray(object);
5276
5229
  }
5277
- if (tag2 == setTag) {
5230
+ if (tag == setTag) {
5278
5231
  return setToPairs(object);
5279
5232
  }
5280
5233
  return baseToPairs(object, keysFunc(object));
@@ -5394,8 +5347,8 @@ var lodash = { exports: {} };
5394
5347
  stack["delete"](other);
5395
5348
  return result2;
5396
5349
  }
5397
- function equalByTag(object, other, tag2, bitmask, customizer, equalFunc, stack) {
5398
- switch (tag2) {
5350
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
5351
+ switch (tag) {
5399
5352
  case dataViewTag:
5400
5353
  if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
5401
5354
  return false;
@@ -5531,7 +5484,7 @@ var lodash = { exports: {} };
5531
5484
  return baseIsNative(value) ? value : undefined$1;
5532
5485
  }
5533
5486
  function getRawTag(value) {
5534
- var isOwn = hasOwnProperty.call(value, symToStringTag), tag2 = value[symToStringTag];
5487
+ var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
5535
5488
  try {
5536
5489
  value[symToStringTag] = undefined$1;
5537
5490
  var unmasked = true;
@@ -5540,7 +5493,7 @@ var lodash = { exports: {} };
5540
5493
  var result2 = nativeObjectToString.call(value);
5541
5494
  if (unmasked) {
5542
5495
  if (isOwn) {
5543
- value[symToStringTag] = tag2;
5496
+ value[symToStringTag] = tag;
5544
5497
  } else {
5545
5498
  delete value[symToStringTag];
5546
5499
  }
@@ -5637,9 +5590,9 @@ var lodash = { exports: {} };
5637
5590
  function initCloneObject(object) {
5638
5591
  return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
5639
5592
  }
5640
- function initCloneByTag(object, tag2, isDeep) {
5593
+ function initCloneByTag(object, tag, isDeep) {
5641
5594
  var Ctor = object.constructor;
5642
- switch (tag2) {
5595
+ switch (tag) {
5643
5596
  case arrayBufferTag:
5644
5597
  return cloneArrayBuffer(object);
5645
5598
  case boolTag:
@@ -6520,8 +6473,8 @@ var lodash = { exports: {} };
6520
6473
  if (isArrayLike(collection)) {
6521
6474
  return isString(collection) ? stringSize(collection) : collection.length;
6522
6475
  }
6523
- var tag2 = getTag(collection);
6524
- if (tag2 == mapTag || tag2 == setTag) {
6476
+ var tag = getTag(collection);
6477
+ if (tag == mapTag || tag == setTag) {
6525
6478
  return collection.size;
6526
6479
  }
6527
6480
  return baseKeys(collection).length;
@@ -6859,8 +6812,8 @@ var lodash = { exports: {} };
6859
6812
  if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
6860
6813
  return !value.length;
6861
6814
  }
6862
- var tag2 = getTag(value);
6863
- if (tag2 == mapTag || tag2 == setTag) {
6815
+ var tag = getTag(value);
6816
+ if (tag == mapTag || tag == setTag) {
6864
6817
  return !value.size;
6865
6818
  }
6866
6819
  if (isPrototype(value)) {
@@ -6885,8 +6838,8 @@ var lodash = { exports: {} };
6885
6838
  if (!isObjectLike(value)) {
6886
6839
  return false;
6887
6840
  }
6888
- var tag2 = baseGetTag(value);
6889
- return tag2 == errorTag || tag2 == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject2(value);
6841
+ var tag = baseGetTag(value);
6842
+ return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject2(value);
6890
6843
  }
6891
6844
  function isFinite2(value) {
6892
6845
  return typeof value == "number" && nativeIsFinite(value);
@@ -6895,8 +6848,8 @@ var lodash = { exports: {} };
6895
6848
  if (!isObject2(value)) {
6896
6849
  return false;
6897
6850
  }
6898
- var tag2 = baseGetTag(value);
6899
- return tag2 == funcTag || tag2 == genTag || tag2 == asyncTag || tag2 == proxyTag;
6851
+ var tag = baseGetTag(value);
6852
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
6900
6853
  }
6901
6854
  function isInteger(value) {
6902
6855
  return typeof value == "number" && value == toInteger2(value);
@@ -6983,7 +6936,7 @@ var lodash = { exports: {} };
6983
6936
  if (symIterator && value[symIterator]) {
6984
6937
  return iteratorToArray(value[symIterator]());
6985
6938
  }
6986
- var tag2 = getTag(value), func = tag2 == mapTag ? mapToArray : tag2 == setTag ? setToArray : values;
6939
+ var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
6987
6940
  return func(value);
6988
6941
  }
6989
6942
  function toFinite(value) {
@@ -8483,7 +8436,7 @@ const loadingTypes = {
8483
8436
  indicator: {
8484
8437
  type: Function
8485
8438
  },
8486
- loading: PropTypes.bool,
8439
+ loading: PropTypes.bool.def(true),
8487
8440
  inline: PropTypes.bool.def(true),
8488
8441
  theme: PropTypes.theme(["white", "primary", "warning", "success", "danger"]),
8489
8442
  title: PropTypes.string.def(""),
@@ -9340,7 +9293,7 @@ const inputType = {
9340
9293
  clearable: PropTypes.bool,
9341
9294
  disabled: PropTypes.bool,
9342
9295
  readonly: PropTypes.bool,
9343
- placeholder: PropTypes.string,
9296
+ placeholder: PropTypes.string.def("Enter"),
9344
9297
  prefixIcon: PropTypes.string,
9345
9298
  suffixIcon: PropTypes.string,
9346
9299
  suffix: PropTypes.string,
@@ -9774,15 +9727,15 @@ const Circle = (_2, {
9774
9727
  const radius = 50 - circleStrokeWidth / 2;
9775
9728
  const isDashboard = type === "dashboard";
9776
9729
  const len = Math.PI * 2 * radius;
9777
- const rate2 = isDashboard && 0.75 || 1;
9778
- const strokeDashoffset = `${-1 * len * (1 - rate2) / 2}px`;
9730
+ const rate = isDashboard && 0.75 || 1;
9731
+ const strokeDashoffset = `${-1 * len * (1 - rate) / 2}px`;
9779
9732
  const transition = "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease";
9780
9733
  const trailStyle = {
9781
- strokeDasharray: `${len * rate2}px, ${len}px`,
9734
+ strokeDasharray: `${len * rate}px, ${len}px`,
9782
9735
  strokeDashoffset
9783
9736
  };
9784
9737
  const pathStyle = {
9785
- strokeDasharray: `${len * rate2 * (percent / 100)}px, ${len}px`,
9738
+ strokeDasharray: `${len * rate * (percent / 100)}px, ${len}px`,
9786
9739
  strokeDashoffset,
9787
9740
  transition
9788
9741
  };
@@ -9933,11 +9886,11 @@ var Component$f = defineComponent({
9933
9886
  const $props = __spreadProps(__spreadValues({}, this.$props), {
9934
9887
  percent: this.validPercent(this.percent)
9935
9888
  });
9936
- let progress2 = createVNode(Line, $props, _isSlot$3(progressInfo) ? progressInfo : {
9889
+ let progress = createVNode(Line, $props, _isSlot$3(progressInfo) ? progressInfo : {
9937
9890
  default: () => [progressInfo]
9938
9891
  });
9939
9892
  if (this.type === "circle" || this.type === "dashboard") {
9940
- progress2 = createVNode(Circle, $props, _isSlot$3(progressInfo) ? progressInfo : {
9893
+ progress = createVNode(Circle, $props, _isSlot$3(progressInfo) ? progressInfo : {
9941
9894
  default: () => [progressInfo]
9942
9895
  });
9943
9896
  }
@@ -9946,7 +9899,7 @@ var Component$f = defineComponent({
9946
9899
  extCls: !!this.extCls
9947
9900
  }, `bk-progress bk-progress-${this.type}`)
9948
9901
  };
9949
- return createVNode("div", progressProps, [progress2]);
9902
+ return createVNode("div", progressProps, [progress]);
9950
9903
  }
9951
9904
  });
9952
9905
  const BkProgress = withInstall(Component$f);
@@ -10221,14 +10174,14 @@ var star = defineComponent({
10221
10174
  const chooseRate = (index) => {
10222
10175
  if (!props.editable)
10223
10176
  return;
10224
- const rate2 = index + 1;
10225
- emit("chooseRate", rate2);
10177
+ const rate = index + 1;
10178
+ emit("chooseRate", rate);
10226
10179
  };
10227
10180
  const changeHover = (index) => {
10228
10181
  if (!props.editable)
10229
10182
  return;
10230
- const rate2 = index + 1;
10231
- emit("changeHover", rate2);
10183
+ const rate = index + 1;
10184
+ emit("changeHover", rate);
10232
10185
  };
10233
10186
  const starClass = (index) => classes({
10234
10187
  "bk-is-select": index < Math.floor(displayRate.value),
@@ -10390,10 +10343,10 @@ var Component$c = defineComponent({
10390
10343
  swiperIndex.value = showIndex;
10391
10344
  emit("index-change", showIndex);
10392
10345
  };
10393
- const goToLink = (link2) => {
10394
- if (!link2)
10346
+ const goToLink = (link) => {
10347
+ if (!link)
10395
10348
  return;
10396
- window.open(link2, "_blank");
10349
+ window.open(link, "_blank");
10397
10350
  };
10398
10351
  const getRenderItemClass = (renderData) => ["bk-swiper-img", {
10399
10352
  "bk-swiper-link": renderData.link
@@ -10618,21 +10571,21 @@ var BkOption = defineComponent({
10618
10571
  const {
10619
10572
  disabled
10620
10573
  } = toRefs(props);
10621
- const select2 = inject(selectKey, null);
10574
+ const select = inject(selectKey, null);
10622
10575
  const group = inject(optionGroupKey, null);
10623
- const selected = computed(() => select2.selectedOptions.has(proxy));
10624
- const multiple = computed(() => select2 == null ? void 0 : select2.props.multiple);
10576
+ const selected = computed(() => select.selectedOptions.has(proxy));
10577
+ const multiple = computed(() => select == null ? void 0 : select.props.multiple);
10625
10578
  const handleOptionClick = () => {
10626
10579
  if (disabled.value)
10627
10580
  return;
10628
- select2 == null ? void 0 : select2.handleOptionSelected(proxy);
10581
+ select == null ? void 0 : select.handleOptionSelected(proxy);
10629
10582
  };
10630
10583
  onBeforeMount(() => {
10631
- select2 == null ? void 0 : select2.register(proxy);
10584
+ select == null ? void 0 : select.register(proxy);
10632
10585
  group == null ? void 0 : group.register(proxy);
10633
10586
  });
10634
10587
  onBeforeUnmount(() => {
10635
- select2 == null ? void 0 : select2.unregister(proxy);
10588
+ select == null ? void 0 : select.unregister(proxy);
10636
10589
  group == null ? void 0 : group.unregister(proxy);
10637
10590
  });
10638
10591
  return __spreadProps(__spreadValues({}, toRefs(states)), {
@@ -10670,7 +10623,7 @@ var OptionGroup = defineComponent({
10670
10623
  const {
10671
10624
  proxy
10672
10625
  } = getCurrentInstance();
10673
- const select2 = inject(selectKey, null);
10626
+ const select = inject(selectKey, null);
10674
10627
  const states = reactive({
10675
10628
  groupCollapse: props.collapse,
10676
10629
  visible: true
@@ -10693,10 +10646,10 @@ var OptionGroup = defineComponent({
10693
10646
  groupCollapse: toRef(states, "groupCollapse")
10694
10647
  })));
10695
10648
  onBeforeMount(() => {
10696
- select2 == null ? void 0 : select2.registerGroup(proxy);
10649
+ select == null ? void 0 : select.registerGroup(proxy);
10697
10650
  });
10698
10651
  onBeforeUnmount(() => {
10699
- select2 == null ? void 0 : select2.unregisterGroup(proxy);
10652
+ select == null ? void 0 : select.unregisterGroup(proxy);
10700
10653
  });
10701
10654
  return __spreadProps(__spreadValues({}, toRefs(states)), {
10702
10655
  groupLabel,
@@ -11221,9 +11174,10 @@ var Component$a = defineComponent({
11221
11174
  noMatchText: PropTypes.string.def("\u65E0\u5339\u914D\u6570\u636E"),
11222
11175
  loadingText: PropTypes.string.def("\u52A0\u8F7D\u4E2D..."),
11223
11176
  placeholder: PropTypes.string.def("\u8BF7\u9009\u62E9"),
11224
- selectAllText: PropTypes.string.def("\u5168\u90E8")
11177
+ selectAllText: PropTypes.string.def("\u5168\u90E8"),
11178
+ scrollLoading: PropTypes.bool.def(false)
11225
11179
  },
11226
- emits: ["update:modelValue", "change", "toggle", "clear"],
11180
+ emits: ["update:modelValue", "change", "toggle", "clear", "scroll-end"],
11227
11181
  setup(props, {
11228
11182
  emit
11229
11183
  }) {
@@ -11234,7 +11188,7 @@ var Component$a = defineComponent({
11234
11188
  placeholder,
11235
11189
  multiple,
11236
11190
  remoteMethod,
11237
- loading: loading2,
11191
+ loading,
11238
11192
  loadingText,
11239
11193
  noDataText,
11240
11194
  noMatchText,
@@ -11250,7 +11204,7 @@ var Component$a = defineComponent({
11250
11204
  const popoverRef = ref();
11251
11205
  const options = ref(/* @__PURE__ */ new Set());
11252
11206
  const groups = ref(/* @__PURE__ */ new Set());
11253
- const isDisabled = computed(() => disabled.value || loading2.value);
11207
+ const isDisabled = computed(() => disabled.value || loading.value);
11254
11208
  const selectedLabel = computed(() => [...states.selectedOptions.values()].map((option) => option.label));
11255
11209
  const isAllSelected = computed(() => [...options.value.values()].filter((option) => !option.disabled).every((option) => states.selectedOptions.has(option)));
11256
11210
  const isGroup = computed(() => !!groups.value.size);
@@ -11384,6 +11338,16 @@ var Component$a = defineComponent({
11384
11338
  selectedCallback();
11385
11339
  emitChange([...states.selectedOptions.values()].map((option) => option.value));
11386
11340
  };
11341
+ const handleScroll = (e) => {
11342
+ const {
11343
+ scrollTop,
11344
+ clientHeight,
11345
+ scrollHeight
11346
+ } = e.target;
11347
+ if (scrollTop + clientHeight === scrollHeight) {
11348
+ emit("scroll-end");
11349
+ }
11350
+ };
11387
11351
  const handleClickOutside = () => {
11388
11352
  hidePopover();
11389
11353
  handleBlur();
@@ -11437,7 +11401,8 @@ var Component$a = defineComponent({
11437
11401
  showPopover,
11438
11402
  handleToggleAll,
11439
11403
  handleOptionSelected,
11440
- handleClickOutside
11404
+ handleClickOutside,
11405
+ handleScroll
11441
11406
  });
11442
11407
  },
11443
11408
  render() {
@@ -11461,6 +11426,7 @@ var Component$a = defineComponent({
11461
11426
  const suffixIcon = () => {
11462
11427
  if (this.loading) {
11463
11428
  return createVNode(BkLoading, {
11429
+ "loading": true,
11464
11430
  "class": "spinner",
11465
11431
  "mode": "spin",
11466
11432
  "size": "mini"
@@ -11528,6 +11494,7 @@ var Component$a = defineComponent({
11528
11494
  "class": "bk-select-empty"
11529
11495
  }, [this.searchLoading && createVNode(BkLoading, {
11530
11496
  "class": "mr5",
11497
+ "loading": true,
11531
11498
  "mode": "spin",
11532
11499
  "size": "mini"
11533
11500
  }, null), this.curContentText]), createVNode("div", {
@@ -11536,13 +11503,22 @@ var Component$a = defineComponent({
11536
11503
  "class": "bk-select-dropdown",
11537
11504
  "style": {
11538
11505
  maxHeight: `${this.scrollHeight}px`
11539
- }
11506
+ },
11507
+ "onScroll": this.handleScroll
11540
11508
  }, [withDirectives(createVNode("ul", {
11541
11509
  "class": "bk-select-options"
11542
11510
  }, [this.multiple && this.showSelectAll && !this.searchKey && createVNode("li", {
11543
11511
  "class": "bk-select-option",
11544
11512
  "onClick": this.handleToggleAll
11545
- }, [this.selectAllText]), (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)]), [[vShow, this.isShowSelectContent]])]), this.$slots.extension && createVNode("div", {
11513
+ }, [this.selectAllText]), (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a), this.scrollLoading && createVNode("li", {
11514
+ "class": "bk-select-options-loading"
11515
+ }, [createVNode(BkLoading, {
11516
+ "class": "spinner mr5",
11517
+ "theme": "primary",
11518
+ "loading": true,
11519
+ "mode": "spin",
11520
+ "size": "mini"
11521
+ }, null), this.loadingText])]), [[vShow, this.isShowSelectContent]])]), this.$slots.extension && createVNode("div", {
11546
11522
  "class": "bk-select-extension"
11547
11523
  }, [this.$slots.extension()])])]);
11548
11524
  };
@@ -11653,9 +11629,9 @@ var Component$8 = defineComponent({
11653
11629
  emit
11654
11630
  }) {
11655
11631
  const defaultSteps = ref([]);
11656
- const updateSteps = (steps2) => {
11632
+ const updateSteps = (steps) => {
11657
11633
  const defaults = [];
11658
- steps2.forEach((step) => {
11634
+ steps.forEach((step) => {
11659
11635
  if (typeof step === "string") {
11660
11636
  defaults.push(step);
11661
11637
  } else {
@@ -11916,12 +11892,12 @@ function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
11916
11892
  }
11917
11893
  return { startIndex, height, diffHeight };
11918
11894
  }
11919
- function computedVirtualIndex(lineHeight, callback, pagination2, el, event) {
11895
+ function computedVirtualIndex(lineHeight, callback, pagination, el, event) {
11920
11896
  if (!el) {
11921
11897
  return;
11922
11898
  }
11923
11899
  const elScrollTop = el.scrollTop;
11924
- const { scrollTop, count, groupItemCount, startIndex, endIndex } = pagination2;
11900
+ const { scrollTop, count, groupItemCount, startIndex, endIndex } = pagination;
11925
11901
  const { offsetHeight } = el;
11926
11902
  let targetStartIndex = 0;
11927
11903
  let targetEndIndex = 0;
@@ -11943,8 +11919,8 @@ function computedVirtualIndex(lineHeight, callback, pagination2, el, event) {
11943
11919
  }
11944
11920
  }
11945
11921
  function visibleRender(e, wrapper, binding) {
11946
- const { lineHeight = 30, handleScrollCallback, pagination: pagination2 = {} } = binding.value;
11947
- const { startIndex, endIndex, groupItemCount, count, scrollTop } = pagination2;
11922
+ const { lineHeight = 30, handleScrollCallback, pagination = {} } = binding.value;
11923
+ const { startIndex, endIndex, groupItemCount, count, scrollTop } = pagination;
11948
11924
  computedVirtualIndex(lineHeight, handleScrollCallback, { scrollTop, startIndex, endIndex, groupItemCount, count }, wrapper, e);
11949
11925
  }
11950
11926
  const throttledRender = (delay = 60) => lodash.exports.throttle((e, wrapper, binding) => visibleRender(e, wrapper, binding), delay);
@@ -12015,7 +11991,7 @@ var Component$6 = defineComponent({
12015
11991
  };
12016
11992
  }
12017
11993
  const refRoot = ref(null);
12018
- const pagination2 = reactive({
11994
+ const pagination = reactive({
12019
11995
  startIndex: 0,
12020
11996
  endIndex: 0,
12021
11997
  scrollTop: 1,
@@ -12024,11 +12000,11 @@ var Component$6 = defineComponent({
12024
12000
  groupItemCount: props.groupItemCount
12025
12001
  });
12026
12002
  const handleScrollCallback = (event, startIndex, endIndex, scrollTop, translateY) => {
12027
- pagination2.startIndex = startIndex;
12028
- pagination2.endIndex = endIndex;
12029
- pagination2.scrollTop = scrollTop;
12030
- pagination2.translateY = translateY;
12031
- ctx.emit("content-scroll", [event, pagination2]);
12003
+ pagination.startIndex = startIndex;
12004
+ pagination.endIndex = endIndex;
12005
+ pagination.scrollTop = scrollTop;
12006
+ pagination.translateY = translateY;
12007
+ ctx.emit("content-scroll", [event, pagination]);
12032
12008
  };
12033
12009
  onMounted(() => {
12034
12010
  nextTick(() => {
@@ -12053,11 +12029,11 @@ var Component$6 = defineComponent({
12053
12029
  const innerHeight = ref(0);
12054
12030
  const handleListChanged = (list) => {
12055
12031
  listLength.value = Math.ceil((list || []).length / props.groupItemCount);
12056
- pagination2.count = listLength.value;
12057
- pagination2.startIndex = 0;
12058
- pagination2.endIndex = 0;
12059
- pagination2.translateY = 0;
12060
- pagination2.scrollTop = 0;
12032
+ pagination.count = listLength.value;
12033
+ pagination.startIndex = 0;
12034
+ pagination.endIndex = 0;
12035
+ pagination.translateY = 0;
12036
+ pagination.scrollTop = 0;
12061
12037
  const isAuto = typeof props.abosuteHeight === "string" && props.abosuteHeight === "auto";
12062
12038
  if (isAuto) {
12063
12039
  if (typeof props.lineHeight === "function") {
@@ -12078,15 +12054,15 @@ var Component$6 = defineComponent({
12078
12054
  const afterListDataReset = () => {
12079
12055
  var _a;
12080
12056
  const el = (_a = refRoot.value) == null ? void 0 : _a.parentNode;
12081
- computedVirtualIndex(props.lineHeight, handleScrollCallback, pagination2, el, null);
12057
+ computedVirtualIndex(props.lineHeight, handleScrollCallback, pagination, el, null);
12082
12058
  };
12083
12059
  const localList = computed(() => (props.list || []).map((item, index) => __spreadProps(__spreadValues({}, item), {
12084
12060
  $index: index
12085
12061
  })));
12086
- const calcList = computed(() => localList.value.slice(pagination2.startIndex * props.groupItemCount, (pagination2.endIndex + props.preloadItemCount) * props.groupItemCount));
12062
+ const calcList = computed(() => localList.value.slice(pagination.startIndex * props.groupItemCount, (pagination.endIndex + props.preloadItemCount) * props.groupItemCount));
12087
12063
  const innerContentStyle = computed(() => props.scrollPosition === "content" ? {
12088
- top: `${pagination2.scrollTop + props.scrollOffsetTop}px`,
12089
- transform: `translateY(-${pagination2.translateY}px)`
12064
+ top: `${pagination.scrollTop + props.scrollOffsetTop}px`,
12065
+ transform: `translateY(-${pagination.translateY}px)`
12090
12066
  } : {});
12091
12067
  const wrapperStyle = computed(() => __spreadValues({
12092
12068
  height: typeof props.height === "number" ? `${props.height}px` : props.height,
@@ -12106,7 +12082,7 @@ var Component$6 = defineComponent({
12106
12082
  const dirModifier = {
12107
12083
  lineHeight: props.lineHeight,
12108
12084
  handleScrollCallback,
12109
- pagination: pagination2,
12085
+ pagination,
12110
12086
  throttleDelay: props.throttleDelay
12111
12087
  };
12112
12088
  return () => {
@@ -12129,6 +12105,241 @@ var Component$6 = defineComponent({
12129
12105
  });
12130
12106
  const BkVirtualRender = withInstall(Component$6);
12131
12107
  const BORDER_OPRIONS = ["none", "row", "col", "outer"];
12108
+ const resolvePropVal = (prop, key, args) => {
12109
+ if (Object.prototype.hasOwnProperty.call(prop, key)) {
12110
+ if (typeof prop[key] === "function") {
12111
+ return prop[key].call(globalThis, ...args);
12112
+ }
12113
+ return prop[key];
12114
+ }
12115
+ return void 0;
12116
+ };
12117
+ const resolveNumberToNumArray = (prop) => {
12118
+ if (/^\d+$/.test(`${prop}`)) {
12119
+ return [parseInt(`${prop}`, 10)];
12120
+ }
12121
+ return [];
12122
+ };
12123
+ const resolveWidth = (propWidth) => resolveNumberOrStringToPix(propWidth, "auto");
12124
+ const resolveNumberOrStringToPix = (val, defaultValue = "100%", offset2 = null) => {
12125
+ let target = "";
12126
+ if (/^auto|null|undefined$/ig.test(`${val}`)) {
12127
+ target = defaultValue;
12128
+ } else {
12129
+ target = /^\d+\.?\d+$/.test(`${val}`) ? `${val}px` : val;
12130
+ }
12131
+ if (offset2) {
12132
+ target = `calc(${target} - ${offset2})`;
12133
+ }
12134
+ return target;
12135
+ };
12136
+ const resolvePropBorderToClassStr = (val) => {
12137
+ const defaultVal = ["row"];
12138
+ if (typeof val === "string") {
12139
+ defaultVal.push(val);
12140
+ }
12141
+ if (Array.isArray(val)) {
12142
+ defaultVal.push(...val.filter((str) => BORDER_OPRIONS.includes(str)));
12143
+ }
12144
+ return [...new Set(defaultVal)].map((item) => `bordered-${item}`).join(" ");
12145
+ };
12146
+ const resolveColumnWidth = (root, colgroups, autoWidth = 20) => {
12147
+ const {
12148
+ width
12149
+ } = root.getBoundingClientRect() || {};
12150
+ let avgWidth = width - 4;
12151
+ const avgColIndexList = [];
12152
+ const resolveColNumberWidth = (col, numWidth, resetAvgWidth = true) => {
12153
+ Object.assign(col, {
12154
+ calcWidth: numWidth
12155
+ });
12156
+ if (resetAvgWidth) {
12157
+ avgWidth = avgWidth - numWidth;
12158
+ if (avgWidth < 0) {
12159
+ avgWidth = 0;
12160
+ }
12161
+ }
12162
+ };
12163
+ colgroups.forEach((col, index) => {
12164
+ const colWidth = String(col.width);
12165
+ let isAutoWidthCol = true;
12166
+ if (/^\d+\.?\d*(px)?$/.test(colWidth)) {
12167
+ const numWidth = Number(colWidth.replace("px", ""));
12168
+ resolveColNumberWidth(col, numWidth);
12169
+ isAutoWidthCol = false;
12170
+ }
12171
+ if (/^\d+\.?\d*%$/.test(colWidth)) {
12172
+ let perWidth = autoWidth;
12173
+ if (avgWidth > 0) {
12174
+ const percent = Number(colWidth.replace("%", ""));
12175
+ perWidth = avgWidth * percent / 100;
12176
+ }
12177
+ resolveColNumberWidth(col, perWidth);
12178
+ isAutoWidthCol = false;
12179
+ }
12180
+ if (isAutoWidthCol) {
12181
+ avgColIndexList.push(index);
12182
+ }
12183
+ });
12184
+ if (avgColIndexList.length > 0) {
12185
+ let autoAvgWidth = autoWidth;
12186
+ if (avgWidth > 0) {
12187
+ autoAvgWidth = avgWidth / avgColIndexList.length;
12188
+ avgColIndexList.forEach((idx) => resolveColNumberWidth(colgroups[idx], autoAvgWidth, false));
12189
+ }
12190
+ }
12191
+ };
12192
+ const observerResize = (root, callbackFn, delay = 60, immediate = false) => {
12193
+ const callFn = lodash.exports.throttle(() => {
12194
+ if (typeof callbackFn === "function") {
12195
+ callbackFn();
12196
+ }
12197
+ }, delay);
12198
+ const resizeObserver = new ResizeObserver(() => {
12199
+ callFn();
12200
+ });
12201
+ if (immediate) {
12202
+ if (typeof callbackFn === "function") {
12203
+ callbackFn();
12204
+ }
12205
+ }
12206
+ return {
12207
+ start: () => {
12208
+ resizeObserver.observe(root);
12209
+ },
12210
+ stop: () => {
12211
+ resizeObserver.disconnect();
12212
+ resizeObserver.unobserve(root);
12213
+ }
12214
+ };
12215
+ };
12216
+ const isPercentPixOrNumber = (val) => /^\d+\.?\d*(px|%)?$/.test(`${val}`);
12217
+ const resolveHeadConfig = (props) => {
12218
+ const {
12219
+ showHead,
12220
+ headHeight,
12221
+ thead = {}
12222
+ } = props;
12223
+ return Object.assign({}, {
12224
+ isShow: showHead,
12225
+ height: headHeight
12226
+ }, __spreadValues({}, thead));
12227
+ };
12228
+ const getRowText = (row, key, column) => {
12229
+ if (column.type === "index") {
12230
+ return row.__$table_row_index;
12231
+ }
12232
+ return row[key];
12233
+ };
12234
+ const resolveActiveColumns = (props) => {
12235
+ if (props.columnPick !== "disabled") {
12236
+ if (props.columnPick === "multi") {
12237
+ return Array.isArray(props.activeColumn) ? props.activeColumn : resolveNumberToNumArray(props.activeColumn);
12238
+ }
12239
+ return Array.isArray(props.activeColumn) ? resolveNumberToNumArray(props.activeColumn[0]) : resolveNumberToNumArray(props.activeColumn);
12240
+ }
12241
+ return [];
12242
+ };
12243
+ var useActiveColumns = (props) => {
12244
+ let activeColumns = reactive([]);
12245
+ if (props.columnPick === "disabled") {
12246
+ return {
12247
+ activeColumns
12248
+ };
12249
+ }
12250
+ const activeCols = reactive(resolveActiveColumns(props));
12251
+ const getActiveColumns = () => (props.columns || []).map((_column, index) => ({
12252
+ index,
12253
+ active: activeCols.some((colIndex) => colIndex === index),
12254
+ _column
12255
+ }));
12256
+ watchEffect(() => {
12257
+ activeColumns = getActiveColumns();
12258
+ const cols = resolveActiveColumns(props);
12259
+ activeColumns.forEach((col, index) => {
12260
+ Object.assign(col, {
12261
+ active: cols.some((colIndex) => colIndex === index)
12262
+ });
12263
+ });
12264
+ });
12265
+ return {
12266
+ activeColumns
12267
+ };
12268
+ };
12269
+ const resolvePaginationOption = (propPagination, defVal) => {
12270
+ if (!!propPagination) {
12271
+ if (typeof propPagination === "object") {
12272
+ let current = Object.prototype.hasOwnProperty.call(propPagination, "current") ? propPagination.current : propPagination.value;
12273
+ if (!/\d+/.test(current)) {
12274
+ current = 1;
12275
+ }
12276
+ return __spreadProps(__spreadValues(__spreadValues({}, defVal), propPagination), {
12277
+ current
12278
+ });
12279
+ }
12280
+ return defVal;
12281
+ }
12282
+ return {};
12283
+ };
12284
+ var userPagination = (props) => {
12285
+ const startIndex = ref(0);
12286
+ const endIndex = ref(0);
12287
+ const indexData = computed(() => props.data.map((item, index) => __spreadProps(__spreadValues({}, item), {
12288
+ __$table_row_index: index + 1
12289
+ })));
12290
+ let pagination = reactive({
12291
+ count: 0,
12292
+ limit: 10,
12293
+ current: 1
12294
+ });
12295
+ pagination = resolvePaginationOption(props.pagination, pagination);
12296
+ const resetStartEndIndex = () => {
12297
+ if (!props.pagination || props.remotePagination) {
12298
+ startIndex.value = 0;
12299
+ endIndex.value = props.data.length;
12300
+ return;
12301
+ }
12302
+ startIndex.value = (pagination.current - 1) * pagination.limit;
12303
+ endIndex.value = pagination.current * pagination.limit;
12304
+ };
12305
+ resetStartEndIndex();
12306
+ const pageData = reactive([]);
12307
+ const sort = (sortFn) => {
12308
+ if (typeof sortFn === "function") {
12309
+ pageData.sort(sortFn);
12310
+ }
12311
+ };
12312
+ const filter = (filterFn) => {
12313
+ if (typeof filterFn === "function") {
12314
+ const filterVals = pageData.filter((row, index) => filterFn(row, index, props.data));
12315
+ pageData.splice(0, pageData.length, ...filterVals);
12316
+ }
12317
+ };
12318
+ const resolvePageData = (filterFn, sortFn) => {
12319
+ pageData.splice(0, pageData.length, ...indexData.value.slice(startIndex.value, endIndex.value));
12320
+ filter(filterFn);
12321
+ sort(sortFn);
12322
+ };
12323
+ const watchEffectFn = (filterFn, sortFn) => {
12324
+ pagination = resolvePaginationOption(props.pagination, pagination);
12325
+ resetStartEndIndex();
12326
+ resolvePageData(filterFn, sortFn);
12327
+ };
12328
+ const localPagination = computed(() => {
12329
+ if (!props.pagination) {
12330
+ return null;
12331
+ }
12332
+ return props.remotePagination ? pagination : __spreadProps(__spreadValues({}, pagination), {
12333
+ count: props.data.length
12334
+ });
12335
+ });
12336
+ return {
12337
+ pageData,
12338
+ localPagination,
12339
+ resolvePageData,
12340
+ watchEffectFn
12341
+ };
12342
+ };
12132
12343
  var SortScope = /* @__PURE__ */ ((SortScope2) => {
12133
12344
  SortScope2["CURRENT"] = "current";
12134
12345
  SortScope2["ALL"] = "all";
@@ -12613,156 +12824,6 @@ var Component$5 = defineComponent({
12613
12824
  }
12614
12825
  });
12615
12826
  const BkPagination = withInstall(Component$5);
12616
- const resolvePropVal = (prop, key, args) => {
12617
- if (Object.prototype.hasOwnProperty.call(prop, key)) {
12618
- if (typeof prop[key] === "function") {
12619
- return prop[key].call(globalThis, ...args);
12620
- }
12621
- return prop[key];
12622
- }
12623
- return void 0;
12624
- };
12625
- const resolveActiveColumns = (props) => {
12626
- if (props.columnPick !== "disabled") {
12627
- if (props.columnPick === "multi") {
12628
- return Array.isArray(props.activeColumn) ? props.activeColumn : resolveNumberToNumArray(props.activeColumn);
12629
- }
12630
- return Array.isArray(props.activeColumn) ? resolveNumberToNumArray(props.activeColumn[0]) : resolveNumberToNumArray(props.activeColumn);
12631
- }
12632
- return [];
12633
- };
12634
- const resolveNumberToNumArray = (prop) => {
12635
- if (/^\d+$/.test(`${prop}`)) {
12636
- return [parseInt(`${prop}`, 10)];
12637
- }
12638
- return [];
12639
- };
12640
- const resolveWidth = (propWidth) => resolveNumberOrStringToPix(propWidth, "auto");
12641
- const resolveNumberOrStringToPix = (val, defaultValue = "100%", offset2 = null) => {
12642
- let target = "";
12643
- if (/^auto|null|undefined$/ig.test(`${val}`)) {
12644
- target = defaultValue;
12645
- } else {
12646
- target = /^\d+\.?\d+$/.test(`${val}`) ? `${val}px` : val;
12647
- }
12648
- if (offset2) {
12649
- target = `calc(${target} - ${offset2})`;
12650
- }
12651
- return target;
12652
- };
12653
- const resolvePropBorderToClassStr = (val) => {
12654
- const defaultVal = ["row"];
12655
- if (typeof val === "string") {
12656
- defaultVal.push(val);
12657
- }
12658
- if (Array.isArray(val)) {
12659
- defaultVal.push(...val.filter((str) => BORDER_OPRIONS.includes(str)));
12660
- }
12661
- return [...new Set(defaultVal)].map((item) => `bordered-${item}`).join(" ");
12662
- };
12663
- const resolveColumnWidth = (root, colgroups, autoWidth = 20) => {
12664
- const {
12665
- width
12666
- } = root.getBoundingClientRect() || {};
12667
- let avgWidth = width - 4;
12668
- const avgColIndexList = [];
12669
- const resolveColNumberWidth = (col, numWidth, resetAvgWidth = true) => {
12670
- Object.assign(col, {
12671
- calcWidth: numWidth
12672
- });
12673
- if (resetAvgWidth) {
12674
- avgWidth = avgWidth - numWidth;
12675
- if (avgWidth < 0) {
12676
- avgWidth = 0;
12677
- }
12678
- }
12679
- };
12680
- colgroups.forEach((col, index) => {
12681
- const colWidth = String(col.width);
12682
- let isAutoWidthCol = true;
12683
- if (/^\d+\.?\d*(px)?$/.test(colWidth)) {
12684
- const numWidth = Number(colWidth.replace("px", ""));
12685
- resolveColNumberWidth(col, numWidth);
12686
- isAutoWidthCol = false;
12687
- }
12688
- if (/^\d+\.?\d*%$/.test(colWidth)) {
12689
- let perWidth = autoWidth;
12690
- if (avgWidth > 0) {
12691
- const percent = Number(colWidth.replace("%", ""));
12692
- perWidth = avgWidth * percent / 100;
12693
- }
12694
- resolveColNumberWidth(col, perWidth);
12695
- isAutoWidthCol = false;
12696
- }
12697
- if (isAutoWidthCol) {
12698
- avgColIndexList.push(index);
12699
- }
12700
- });
12701
- if (avgColIndexList.length > 0) {
12702
- let autoAvgWidth = autoWidth;
12703
- if (avgWidth > 0) {
12704
- autoAvgWidth = avgWidth / avgColIndexList.length;
12705
- avgColIndexList.forEach((idx) => resolveColNumberWidth(colgroups[idx], autoAvgWidth, false));
12706
- }
12707
- }
12708
- };
12709
- const observerResize = (root, callbackFn, delay = 60, immediate = false) => {
12710
- const callFn = lodash.exports.throttle(() => {
12711
- if (typeof callbackFn === "function") {
12712
- callbackFn();
12713
- }
12714
- }, delay);
12715
- const resizeObserver = new ResizeObserver(() => {
12716
- callFn();
12717
- });
12718
- if (immediate) {
12719
- if (typeof callbackFn === "function") {
12720
- callbackFn();
12721
- }
12722
- }
12723
- return {
12724
- start: () => {
12725
- resizeObserver.observe(root);
12726
- },
12727
- stop: () => {
12728
- resizeObserver.disconnect();
12729
- resizeObserver.unobserve(root);
12730
- }
12731
- };
12732
- };
12733
- const isPercentPixOrNumber = (val) => /^\d+\.?\d*(px|%)?$/.test(`${val}`);
12734
- const resolvePaginationOption = (propPagination, defVal) => {
12735
- if (!!propPagination) {
12736
- if (typeof propPagination === "object") {
12737
- let current = Object.prototype.hasOwnProperty.call(propPagination, "current") ? propPagination.current : propPagination.value;
12738
- if (!/\d+/.test(current)) {
12739
- current = 1;
12740
- }
12741
- return __spreadProps(__spreadValues(__spreadValues({}, defVal), propPagination), {
12742
- current
12743
- });
12744
- }
12745
- return defVal;
12746
- }
12747
- return {};
12748
- };
12749
- const resolveHeadConfig = (props) => {
12750
- const {
12751
- showHead,
12752
- headHeight,
12753
- thead = {}
12754
- } = props;
12755
- return Object.assign({}, {
12756
- isShow: showHead,
12757
- height: headHeight
12758
- }, __spreadValues({}, thead));
12759
- };
12760
- const getRowText = (row, key, column) => {
12761
- if (column.type === "index") {
12762
- return row.__$table_row_index;
12763
- }
12764
- return row[key];
12765
- };
12766
12827
  function _isSlot(s2) {
12767
12828
  return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
12768
12829
  }
@@ -12820,6 +12881,8 @@ var HeadFilter = defineComponent({
12820
12881
  const handleBtnResetClick = () => {
12821
12882
  if (state.checked.length) {
12822
12883
  state.checked.splice(0, state.checked.length);
12884
+ isShow.value = false;
12885
+ nextTick(() => emit("change", state.checked, filterFn));
12823
12886
  }
12824
12887
  };
12825
12888
  return () => createVNode(BkPopover, mergeProps({
@@ -13134,79 +13197,82 @@ class TableRender {
13134
13197
  })]);
13135
13198
  }
13136
13199
  }
13200
+ const useClass = (props, root) => {
13201
+ const autoHeight = ref("auto");
13202
+ const tableClass = computed(() => classes({
13203
+ [resolveClassName("table")]: true
13204
+ }, resolvePropBorderToClassStr(props.border)));
13205
+ const headClass = classes({
13206
+ [resolveClassName("table-head")]: true
13207
+ });
13208
+ const contentClass = classes({
13209
+ [resolveClassName("table-body")]: true
13210
+ });
13211
+ const footerClass = classes({
13212
+ [resolveClassName("table-footer")]: true,
13213
+ ["is-hidden"]: !props.pagination
13214
+ });
13215
+ const wrapperStyle = computed(() => ({
13216
+ minHeight: resolveNumberOrStringToPix(props.minHeight, "auto")
13217
+ }));
13218
+ const contentStyle = computed(() => {
13219
+ const isAutoHeight = !isPercentPixOrNumber(props.height);
13220
+ const resolveHeight = resolveNumberOrStringToPix(props.height);
13221
+ const resolveHeadHeight = props.showHead ? resolveNumberOrStringToPix(props.headHeight) : "0";
13222
+ const resolveFooterHeight = props.pagination ? 40 : 0;
13223
+ const contentHeight = `calc(${resolveHeight} - ${resolveHeadHeight} - ${resolveFooterHeight}px - 2px)`;
13224
+ return __spreadValues({
13225
+ display: "block"
13226
+ }, isAutoHeight ? { maxHeight: contentHeight } : { height: contentHeight });
13227
+ });
13228
+ onMounted(() => {
13229
+ resetTableHeight(root == null ? void 0 : root.value);
13230
+ });
13231
+ const resetTableHeight = (rootEl) => {
13232
+ if (rootEl) {
13233
+ const { height } = root.value.parentElement.getBoundingClientRect();
13234
+ autoHeight.value = `${height}px`;
13235
+ }
13236
+ };
13237
+ return { tableClass, headClass, contentClass, footerClass, wrapperStyle, contentStyle, resetTableHeight };
13238
+ };
13137
13239
  var Component$4 = defineComponent({
13138
13240
  name: "Table",
13139
13241
  props: tableProps,
13140
13242
  emits: ["columnPick", "rowClick", "rowDblClick", "pageLimitChange", "pageValueChange"],
13141
13243
  setup(props, ctx) {
13142
- const activeCols = reactive(resolveActiveColumns(props));
13143
13244
  const colgroups = reactive(props.columns.map((col) => __spreadProps(__spreadValues({}, col), {
13144
13245
  calcWidth: null
13145
13246
  })));
13146
- const startIndex = ref(0);
13147
- const endIndex = ref(0);
13148
13247
  let columnSortFn = null;
13149
13248
  let columnFilterFn = null;
13150
- let pagination2 = reactive({
13151
- count: 0,
13152
- limit: 10,
13153
- current: 1
13154
- });
13155
- pagination2 = resolvePaginationOption(props.pagination, pagination2);
13156
- const resetStartEndIndex = () => {
13157
- if (!props.pagination || props.remotePagination) {
13158
- startIndex.value = 0;
13159
- endIndex.value = props.data.length;
13160
- return;
13161
- }
13162
- startIndex.value = (pagination2.current - 1) * pagination2.limit;
13163
- endIndex.value = pagination2.current * pagination2.limit;
13164
- };
13165
- resetStartEndIndex();
13166
13249
  let observerIns = null;
13167
13250
  const root = ref();
13168
- const getActiveColumns = () => (props.columns || []).map((_column, index) => ({
13169
- index,
13170
- active: activeCols.some((colIndex) => colIndex === index),
13171
- _column
13172
- }));
13251
+ const {
13252
+ activeColumns
13253
+ } = useActiveColumns(props);
13254
+ const {
13255
+ pageData,
13256
+ localPagination,
13257
+ resolvePageData,
13258
+ watchEffectFn
13259
+ } = userPagination(props);
13260
+ const {
13261
+ tableClass,
13262
+ headClass,
13263
+ contentClass,
13264
+ footerClass,
13265
+ wrapperStyle,
13266
+ contentStyle
13267
+ } = useClass(props);
13173
13268
  const reactiveProp = reactive({
13174
- activeColumns: getActiveColumns(),
13175
- scrollTranslateY: 0
13176
- });
13177
- watch(() => [props.activeColumn, props.columns], () => {
13178
- nextTick(() => {
13179
- reactiveProp.activeColumns = getActiveColumns();
13180
- const cols = resolveActiveColumns(props);
13181
- reactiveProp.activeColumns.forEach((col, index) => {
13182
- Object.assign(col, {
13183
- active: cols.some((colIndex) => colIndex === index)
13184
- });
13185
- });
13186
- });
13187
- }, {
13188
- deep: true
13269
+ scrollTranslateY: 0,
13270
+ activeColumns
13189
13271
  });
13190
- const indexData = computed(() => props.data.map((item, index) => __spreadProps(__spreadValues({}, item), {
13191
- __$table_row_index: index + 1
13192
- })));
13193
- const pageData = reactive([]);
13194
- const resolvePageData = () => {
13195
- pageData.splice(0, pageData.length, ...indexData.value.slice(startIndex.value, endIndex.value));
13196
- if (typeof columnFilterFn === "function") {
13197
- const filterVals = pageData.filter((row, index) => columnFilterFn(row, index, props.data));
13198
- pageData.splice(0, pageData.length, ...filterVals);
13199
- }
13200
- if (typeof columnSortFn === "function") {
13201
- pageData.sort(columnSortFn);
13202
- }
13203
- };
13272
+ const tableRender = new TableRender(props, ctx, reactiveProp, colgroups);
13204
13273
  watchEffect(() => {
13205
- pagination2 = resolvePaginationOption(props.pagination, pagination2);
13206
- resetStartEndIndex();
13207
- resolvePageData();
13274
+ watchEffectFn(columnFilterFn, columnSortFn);
13208
13275
  });
13209
- const tableRender = new TableRender(props, ctx, reactiveProp, colgroups);
13210
13276
  tableRender.on(EVENTS.ON_SORT_BY_CLICK, (args) => {
13211
13277
  const {
13212
13278
  sortFn
@@ -13218,48 +13284,11 @@ var Component$4 = defineComponent({
13218
13284
  filterFn
13219
13285
  } = args;
13220
13286
  columnFilterFn = filterFn;
13221
- resolvePageData();
13222
- });
13223
- const wrapperStyle = computed(() => ({
13224
- minHeight: resolveNumberOrStringToPix(props.minHeight, "auto")
13225
- }));
13226
- const localPagination = computed(() => {
13227
- if (!props.pagination) {
13228
- return null;
13229
- }
13230
- return props.remotePagination ? pagination2 : __spreadProps(__spreadValues({}, pagination2), {
13231
- count: props.data.length
13232
- });
13233
- });
13234
- const contentStyle = computed(() => {
13235
- const resolveHeight = resolveNumberOrStringToPix(props.height);
13236
- const resolveHeadHeight = props.showHead ? resolveNumberOrStringToPix(props.headHeight) : "0";
13237
- const isAutoHeight = !isPercentPixOrNumber(props.height);
13238
- const resolveFooterHeight = props.pagination ? 40 : 0;
13239
- const contentHeight = `calc(${resolveHeight} - ${resolveHeadHeight} - ${resolveFooterHeight}px - 2px)`;
13240
- return __spreadValues({
13241
- display: "block"
13242
- }, isAutoHeight ? {
13243
- maxHeight: contentHeight
13244
- } : {
13245
- height: contentHeight
13246
- });
13247
- });
13248
- const tableClass = computed(() => classes({
13249
- [resolveClassName("table")]: true
13250
- }, resolvePropBorderToClassStr(props.border)));
13251
- const headClass = classes({
13252
- [resolveClassName("table-head")]: true
13253
- });
13254
- const contentClass = classes({
13255
- [resolveClassName("table-body")]: true
13256
- });
13257
- const footerClass = classes({
13258
- [resolveClassName("table-footer")]: true
13287
+ resolvePageData(columnFilterFn, columnSortFn);
13259
13288
  });
13260
13289
  const handleScrollChanged = (args) => {
13261
- const pagination3 = args[1];
13262
- reactiveProp.scrollTranslateY = pagination3.translateY;
13290
+ const pagination = args[1];
13291
+ reactiveProp.scrollTranslateY = pagination.translateY;
13263
13292
  };
13264
13293
  onMounted(() => {
13265
13294
  observerIns = observerResize(root.value, () => {
@@ -13635,7 +13664,7 @@ var TagInput = defineComponent({
13635
13664
  selectedTagList: [],
13636
13665
  selectedTagListCache: []
13637
13666
  });
13638
- const tagList = computed(() => listState.selectedTagList.map((tag2) => tag2[props.saveKey]));
13667
+ const tagList = computed(() => listState.selectedTagList.map((tag) => tag[props.saveKey]));
13639
13668
  const formatList = useFlatList(props);
13640
13669
  const renderList = computed(() => {
13641
13670
  if (props.useGroup) {
@@ -13666,14 +13695,14 @@ var TagInput = defineComponent({
13666
13695
  listState.selectedTagList = [];
13667
13696
  listState.localList = [...formatList];
13668
13697
  if (modelValue.length) {
13669
- modelValue.forEach((tag2) => {
13670
- const value = listState.localList.find((val) => tag2 === val[saveKey]);
13698
+ modelValue.forEach((tag) => {
13699
+ const value = listState.localList.find((val) => tag === val[saveKey]);
13671
13700
  if (value !== void 0) {
13672
13701
  listState.selectedTagList.push(value);
13673
- } else if (allowCreate && !tagList.value.includes(tag2)) {
13702
+ } else if (allowCreate && !tagList.value.includes(tag)) {
13674
13703
  listState.selectedTagList.push({
13675
- [saveKey]: tag2,
13676
- [displayKey]: tag2
13704
+ [saveKey]: tag,
13705
+ [displayKey]: tag
13677
13706
  });
13678
13707
  }
13679
13708
  });
@@ -13979,7 +14008,7 @@ var TagInput = defineComponent({
13979
14008
  const nodes = getSelectedTagNodes();
13980
14009
  const index = getTagInputItemSite();
13981
14010
  const localInitData = listState.localList.map((data2) => data2[saveKey]);
13982
- tags = tags.filter((tag2) => (tag2 == null ? void 0 : tag2.trim()) && !tagList.value.includes(tag2) && localInitData.includes(tag2));
14011
+ tags = tags.filter((tag) => (tag == null ? void 0 : tag.trim()) && !tagList.value.includes(tag) && localInitData.includes(tag));
13983
14012
  if (maxData !== -1) {
13984
14013
  const selectedLength = listState.selectedTagList.length;
13985
14014
  if (selectedLength < maxData) {
@@ -13991,7 +14020,7 @@ var TagInput = defineComponent({
13991
14020
  tags = [];
13992
14021
  }
13993
14022
  }
13994
- const localTags = listState.localList.filter((tag2) => tags.includes(tag2[saveKey]));
14023
+ const localTags = listState.localList.filter((tag) => tags.includes(tag[saveKey]));
13995
14024
  if (tags.length) {
13996
14025
  listState.selectedTagList.splice(index, 0, ...localTags);
13997
14026
  swapElementPositions(tagInputItemRef.value, nodes[index]);
@@ -14029,14 +14058,14 @@ var TagInput = defineComponent({
14029
14058
  }
14030
14059
  return true;
14031
14060
  };
14032
- const existTag = (value) => listState.localList.find((tag2) => tag2[saveKey] === value);
14061
+ const existTag = (value) => listState.localList.find((tag) => tag[saveKey] === value);
14033
14062
  if (type === "custom") {
14034
14063
  if (separator) {
14035
14064
  let tags = item.split(separator);
14036
- tags = tags.filter((tag2) => (tag2 == null ? void 0 : tag2.trim()) && !tagList.value.includes(tag2) && validateTag(tag2));
14037
- const localTags = tags.map((tag2) => existTag(tag2) || {
14038
- [saveKey]: tag2,
14039
- [displayKey]: tag2
14065
+ tags = tags.filter((tag) => (tag == null ? void 0 : tag.trim()) && !tagList.value.includes(tag) && validateTag(tag));
14066
+ const localTags = tags.map((tag) => existTag(tag) || {
14067
+ [saveKey]: tag,
14068
+ [displayKey]: tag
14040
14069
  });
14041
14070
  if (tags.length) {
14042
14071
  listState.selectedTagList.splice(targetIndex, 0, ...localTags);
@@ -15096,7 +15125,7 @@ var Component$3 = defineComponent({
15096
15125
  const openedKeys = ref([]);
15097
15126
  const menuStore = ref({});
15098
15127
  const mode = computed(() => props.mode);
15099
- const collapse2 = ref(props.collapse);
15128
+ const collapse = ref(props.collapse);
15100
15129
  const oldOpenKeys = ref([]);
15101
15130
  watch(() => props.OpenedKeys, (keys = openedKeys.value) => {
15102
15131
  openedKeys.value = keys;
@@ -15109,11 +15138,11 @@ var Component$3 = defineComponent({
15109
15138
  }
15110
15139
  });
15111
15140
  watch(() => props.collapse, () => {
15112
- collapse2.value = props.collapse;
15141
+ collapse.value = props.collapse;
15113
15142
  const oldKeys = [...oldOpenKeys.value];
15114
15143
  const openKeys = [...openedKeys.value];
15115
- openedKeys.value = collapse2.value ? [] : oldKeys;
15116
- oldOpenKeys.value = collapse2.value ? openKeys : [];
15144
+ openedKeys.value = collapse.value ? [] : oldKeys;
15145
+ oldOpenKeys.value = collapse.value ? openKeys : [];
15117
15146
  }, {
15118
15147
  immediate: true
15119
15148
  });
@@ -15150,7 +15179,7 @@ var Component$3 = defineComponent({
15150
15179
  unregisterMenuInfo,
15151
15180
  mode: mode.value,
15152
15181
  openedKeys,
15153
- collapse: collapse2,
15182
+ collapse,
15154
15183
  handleOpenChange,
15155
15184
  handleActiveChange
15156
15185
  });
@@ -15159,7 +15188,7 @@ var Component$3 = defineComponent({
15159
15188
  return createVNode("div", {
15160
15189
  "class": {
15161
15190
  "bk-menu": true,
15162
- "is-collapse": collapse2.value
15191
+ "is-collapse": collapse.value
15163
15192
  }
15164
15193
  }, [(_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)]);
15165
15194
  };
@@ -15264,7 +15293,7 @@ var Submenu = defineComponent({
15264
15293
  unregisterMenuInfo,
15265
15294
  openedKeys,
15266
15295
  handleOpenChange,
15267
- collapse: collapse2,
15296
+ collapse,
15268
15297
  activeKey,
15269
15298
  menuStore
15270
15299
  } = useMenuInject();
@@ -15278,7 +15307,7 @@ var Submenu = defineComponent({
15278
15307
  const specialCollapse = computed(() => {
15279
15308
  var _a2, _b2;
15280
15309
  const activeParentKey = (_b2 = (_a2 = menuStore.value) == null ? void 0 : _a2[activeKey.value]) == null ? void 0 : _b2.parentKey;
15281
- return collapse2.value && activeParentKey === key && isShow;
15310
+ return collapse.value && activeParentKey === key && isShow;
15282
15311
  });
15283
15312
  useMenuPathProvider(key);
15284
15313
  registerMenuInfo(key, {
@@ -17275,15 +17304,15 @@ function isProtectedDayOfYearToken(token2) {
17275
17304
  function isProtectedWeekYearToken(token2) {
17276
17305
  return protectedWeekYearTokens.indexOf(token2) !== -1;
17277
17306
  }
17278
- function throwProtectedError(token2, format2, input2) {
17307
+ function throwProtectedError(token2, format2, input) {
17279
17308
  if (token2 === "YYYY") {
17280
- throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input2, "`; see: https://git.io/fxCyr"));
17309
+ throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
17281
17310
  } else if (token2 === "YY") {
17282
- throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input2, "`; see: https://git.io/fxCyr"));
17311
+ throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
17283
17312
  } else if (token2 === "D") {
17284
- throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input2, "`; see: https://git.io/fxCyr"));
17313
+ throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
17285
17314
  } else if (token2 === "DD") {
17286
- throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input2, "`; see: https://git.io/fxCyr"));
17315
+ throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
17287
17316
  }
17288
17317
  }
17289
17318
  var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
@@ -17358,8 +17387,8 @@ function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
17358
17387
  }).join("");
17359
17388
  return result;
17360
17389
  }
17361
- function cleanEscapedString(input2) {
17362
- return input2.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
17390
+ function cleanEscapedString(input) {
17391
+ return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
17363
17392
  }
17364
17393
  const fecha = {};
17365
17394
  const token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
@@ -18104,7 +18133,7 @@ var DatePanel = defineComponent({
18104
18133
  handlePickSuccess();
18105
18134
  }
18106
18135
  };
18107
- const reset2 = () => {
18136
+ const reset = () => {
18108
18137
  state.currentView = props.selectionMode;
18109
18138
  state.pickerTable = getTableType(state.currentView);
18110
18139
  };
@@ -18160,7 +18189,7 @@ var DatePanel = defineComponent({
18160
18189
  handleShortcutClick,
18161
18190
  changeYear,
18162
18191
  changeMonth,
18163
- reset: reset2,
18192
+ reset,
18164
18193
  isTime,
18165
18194
  onToggleVisibility
18166
18195
  });
@@ -18326,7 +18355,7 @@ var DateRangePanel = defineComponent({
18326
18355
  }
18327
18356
  return a2.getTime() - b2.getTime();
18328
18357
  };
18329
- const reset2 = () => {
18358
+ const reset = () => {
18330
18359
  state.currentView = props.selectionMode;
18331
18360
  state.leftPickerTable = `${state.currentView}-table`;
18332
18361
  state.rightPickerTable = `${state.currentView}-table`;
@@ -18493,7 +18522,7 @@ var DateRangePanel = defineComponent({
18493
18522
  rightShowLabelSecond,
18494
18523
  preSelecting,
18495
18524
  panelPickerHandlers,
18496
- reset: reset2,
18525
+ reset,
18497
18526
  onToggleVisibility,
18498
18527
  handleRangePick,
18499
18528
  handleChangeRange
@@ -19023,7 +19052,7 @@ var Component$2 = defineComponent({
19023
19052
  state.visible = true;
19024
19053
  }
19025
19054
  };
19026
- const reset2 = () => {
19055
+ const reset = () => {
19027
19056
  var _a;
19028
19057
  (_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.reset();
19029
19058
  };
@@ -19040,7 +19069,7 @@ var Component$2 = defineComponent({
19040
19069
  state.isFocused = false;
19041
19070
  onSelectionModeChange(props.type);
19042
19071
  state.internalValue = state.internalValue.slice();
19043
- reset2();
19072
+ reset();
19044
19073
  (_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.onToggleVisibility(false);
19045
19074
  };
19046
19075
  const handleKeydown = (e) => {
@@ -19085,7 +19114,7 @@ var Component$2 = defineComponent({
19085
19114
  state.internalValue = state.internalValue.map(() => null);
19086
19115
  emit("clear");
19087
19116
  emitChange(props.type);
19088
- reset2();
19117
+ reset();
19089
19118
  state.showClose = false;
19090
19119
  state.shortcut = null;
19091
19120
  setTimeout(() => onSelectionModeChange(props.type), 500);
@@ -19102,7 +19131,7 @@ var Component$2 = defineComponent({
19102
19131
  emit("pick-success");
19103
19132
  });
19104
19133
  (_a = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _a.blur();
19105
- reset2();
19134
+ reset();
19106
19135
  };
19107
19136
  const onPick = (_dates, visible = false, type, shortcut2) => {
19108
19137
  let dates = _dates;
@@ -20536,38 +20565,38 @@ var FormItem = defineComponent({
20536
20565
  isError: false,
20537
20566
  errorMessage: ""
20538
20567
  });
20539
- const form2 = inject(formKey);
20540
- const isForm = Boolean(form2);
20568
+ const form = inject(formKey);
20569
+ const isForm = Boolean(form);
20541
20570
  const labelStyles = computed(() => {
20542
20571
  const styles = {
20543
20572
  width: "",
20544
20573
  paddingRight: "",
20545
20574
  textAlign: ""
20546
20575
  };
20547
- const labelWidth = isValid(props.labelWidth) ? props.labelWidth : isForm && form2.props.labelWidth;
20576
+ const labelWidth = isValid(props.labelWidth) ? props.labelWidth : isForm && form.props.labelWidth;
20548
20577
  if (isValid(labelWidth)) {
20549
20578
  styles.width = `${labelWidth}px`;
20550
20579
  styles.paddingRight = labelWidth ? "" : "0px";
20551
20580
  }
20552
- const labelPosition = props.labelPosition || isForm && form2.props.labelPosition;
20581
+ const labelPosition = props.labelPosition || isForm && form.props.labelPosition;
20553
20582
  if (labelPosition) {
20554
20583
  styles["text-align"] = labelPosition;
20555
20584
  }
20556
20585
  return styles;
20557
20586
  });
20558
20587
  const validate = () => {
20559
- if (!props.property || isForm && !form2.props.model) {
20588
+ if (!props.property || isForm && !form.props.model) {
20560
20589
  return Promise.resolve();
20561
20590
  }
20562
20591
  let rules = [];
20563
- if (isForm && form2.props.rules && hasOwn(form2.props.rules, props.property)) {
20564
- rules = form2.props.rules[props.property];
20592
+ if (isForm && form.props.rules && hasOwn(form.props.rules, props.property)) {
20593
+ rules = form.props.rules[props.property];
20565
20594
  }
20566
20595
  if (props.rules) {
20567
20596
  rules = props.rules;
20568
20597
  }
20569
20598
  rules = mergeRules(rules, getRulesFromProps(props));
20570
- const value = form2.props.model[props.property];
20599
+ const value = form.props.model[props.property];
20571
20600
  const doValidate = (() => {
20572
20601
  let stepIndex = -1;
20573
20602
  return () => {
@@ -20602,12 +20631,12 @@ var FormItem = defineComponent({
20602
20631
  };
20603
20632
  onMounted(() => {
20604
20633
  if (isForm) {
20605
- form2.register(currentInstance.proxy);
20634
+ form.register(currentInstance.proxy);
20606
20635
  }
20607
20636
  });
20608
20637
  onBeforeUnmount(() => {
20609
20638
  if (isForm) {
20610
- form2.unregister(currentInstance.proxy);
20639
+ form.unregister(currentInstance.proxy);
20611
20640
  }
20612
20641
  });
20613
20642
  return __spreadProps(__spreadValues({}, toRefs(state)), {