vue-devui 1.5.13 → 1.5.15-feat.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/auto-complete/index.es.js +3 -0
  2. package/auto-complete/index.umd.js +1 -1
  3. package/breadcrumb/index.es.js +3 -0
  4. package/breadcrumb/index.umd.js +1 -1
  5. package/checkbox/index.es.js +3 -0
  6. package/checkbox/index.umd.js +1 -1
  7. package/code-review/index.es.js +39 -14
  8. package/code-review/index.umd.js +14 -14
  9. package/date-picker-pro/index.es.js +3 -0
  10. package/date-picker-pro/index.umd.js +8 -8
  11. package/dropdown/index.es.js +3 -0
  12. package/dropdown/index.umd.js +1 -1
  13. package/editable-select/index.es.js +5 -1
  14. package/editable-select/index.umd.js +7 -7
  15. package/editor-md/index.es.js +1428 -1213
  16. package/editor-md/index.umd.js +45 -45
  17. package/editor-md/style.css +1 -1
  18. package/form/index.es.js +3 -0
  19. package/form/index.umd.js +1 -1
  20. package/git-graph/index.es.js +3 -0
  21. package/git-graph/index.umd.js +12 -12
  22. package/input/index.es.js +3 -0
  23. package/input/index.umd.js +6 -6
  24. package/input-number/index.es.js +3 -0
  25. package/input-number/index.umd.js +1 -1
  26. package/mention/index.es.js +3 -0
  27. package/mention/index.umd.js +1 -1
  28. package/menu/index.es.js +6 -2
  29. package/menu/index.umd.js +1 -1
  30. package/modal/index.es.js +3 -0
  31. package/modal/index.umd.js +1 -1
  32. package/nuxt/components/checkbox.js +3 -0
  33. package/overlay/index.es.js +3 -0
  34. package/overlay/index.umd.js +1 -1
  35. package/package.json +1 -1
  36. package/pagination/index.es.js +156 -292
  37. package/pagination/index.umd.js +18 -18
  38. package/pagination/style.css +1 -1
  39. package/popover/index.es.js +3 -0
  40. package/popover/index.umd.js +6 -6
  41. package/radio/index.es.js +3 -0
  42. package/radio/index.umd.js +1 -1
  43. package/search/index.es.js +3 -0
  44. package/search/index.umd.js +1 -1
  45. package/select/index.es.js +120 -265
  46. package/select/index.umd.js +17 -17
  47. package/select/style.css +1 -1
  48. package/splitter/index.es.js +14 -6
  49. package/splitter/index.umd.js +4 -4
  50. package/splitter/style.css +1 -1
  51. package/style.css +1 -1
  52. package/switch/index.es.js +3 -0
  53. package/switch/index.umd.js +1 -1
  54. package/table/index.es.js +14 -6
  55. package/table/index.umd.js +2 -2
  56. package/table/style.css +1 -1
  57. package/textarea/index.es.js +3 -0
  58. package/textarea/index.umd.js +1 -1
  59. package/time-picker/index.es.js +3 -0
  60. package/time-picker/index.umd.js +1 -1
  61. package/time-select/index.es.js +120 -265
  62. package/time-select/index.umd.js +18 -18
  63. package/time-select/style.css +1 -1
  64. package/tooltip/index.es.js +14 -6
  65. package/tooltip/index.umd.js +9 -9
  66. package/tooltip/style.css +1 -1
  67. package/tree/index.es.js +3 -0
  68. package/tree/index.umd.js +1 -1
  69. package/types/code-review/src/utils.d.ts +3 -3
  70. package/types/editable-select/src/editable-select.d.ts +1 -1
  71. package/types/editor-md/index.d.ts +1 -0
  72. package/types/editor-md/src/components/md-render.d.ts +1 -1
  73. package/types/editor-md/src/composables/use-editor-md.d.ts +3 -0
  74. package/types/editor-md/src/editor-md-types.d.ts +9 -1
  75. package/types/editor-md/src/editor-md.d.ts +6 -3
  76. package/types/editor-md/src/plugins/checkbox.d.ts +1 -0
  77. package/types/menu/src/menu-types.d.ts +4 -0
  78. package/types/menu/src/menu.d.ts +9 -0
  79. package/types/pagination/src/pagination-types.d.ts +4 -13
  80. package/types/pagination/src/pagination.d.ts +218 -0
  81. package/types/select/src/select-types.d.ts +4 -23
  82. package/types/select/src/select.d.ts +1 -19
  83. package/types/select/src/use-select.d.ts +1 -1
  84. package/types/tag/src/tag.d.ts +2 -2
  85. package/vue-devui.es.js +283 -263
  86. package/vue-devui.umd.js +50 -50
@@ -29,9 +29,9 @@ var __objRest = (source, exclude) => {
29
29
  }
30
30
  return target;
31
31
  };
32
- import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, unref, nextTick, withModifiers, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, onBeforeMount, vShow, resolveComponent, getCurrentInstance, vModelText, resolveDirective, resolveDynamicComponent } from "vue";
33
- import "clipboard";
32
+ import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, unref, nextTick, withModifiers, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, onBeforeMount, vShow, resolveComponent, getCurrentInstance, resolveDirective, resolveDynamicComponent } from "vue";
34
33
  import { onClickOutside } from "@vueuse/core";
34
+ import "clipboard";
35
35
  import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
36
36
  function className(classStr, classOpt) {
37
37
  let classname = classStr;
@@ -42,35 +42,6 @@ function className(classStr, classOpt) {
42
42
  }
43
43
  return classname;
44
44
  }
45
- const inBrowser = typeof window !== "undefined";
46
- function getElement(element) {
47
- if (element instanceof Element) {
48
- return element;
49
- }
50
- if (element && typeof element === "object" && element.$el instanceof Element) {
51
- return element.$el;
52
- }
53
- return null;
54
- }
55
- function lockScroll() {
56
- if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
57
- const scrollTop = document.documentElement.scrollTop;
58
- const style = document.documentElement.getAttribute("style");
59
- document.documentElement.style.position = "fixed";
60
- document.documentElement.style.top = `-${scrollTop}px`;
61
- document.documentElement.style.width = document.documentElement.style.width || "100%";
62
- document.documentElement.style.overflowY = "scroll";
63
- return () => {
64
- if (style) {
65
- document.documentElement.setAttribute("style", style);
66
- } else {
67
- document.documentElement.removeAttribute("style");
68
- }
69
- document.documentElement.scrollTop = scrollTop;
70
- };
71
- }
72
- return;
73
- }
74
45
  function createBem$1(namespace, element, modifier) {
75
46
  let cls = namespace;
76
47
  if (element) {
@@ -94,9 +65,6 @@ function useNamespace$1(block, needDot = false) {
94
65
  em
95
66
  };
96
67
  }
97
- function isUrl(value) {
98
- return /^((http|https):)?\/\//.test(value);
99
- }
100
68
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
101
69
  var lodash = { exports: {} };
102
70
  /**
@@ -5567,6 +5535,61 @@ const formProps = {
5567
5535
  };
5568
5536
  const FORM_TOKEN = Symbol("dForm");
5569
5537
  const STYLE_TOKEN = Symbol("dForm");
5538
+ const inBrowser = typeof window !== "undefined";
5539
+ function getElement(element) {
5540
+ if (element instanceof Element) {
5541
+ return element;
5542
+ }
5543
+ if (element && typeof element === "object" && element.$el instanceof Element) {
5544
+ return element.$el;
5545
+ }
5546
+ return null;
5547
+ }
5548
+ function lockScroll() {
5549
+ if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
5550
+ const scrollTop = document.documentElement.scrollTop;
5551
+ const style = document.documentElement.getAttribute("style");
5552
+ document.documentElement.style.position = "fixed";
5553
+ document.documentElement.style.top = `-${scrollTop}px`;
5554
+ document.documentElement.style.width = document.documentElement.style.width || "100%";
5555
+ document.documentElement.style.overflowY = "scroll";
5556
+ return () => {
5557
+ if (style) {
5558
+ document.documentElement.setAttribute("style", style);
5559
+ } else {
5560
+ document.documentElement.removeAttribute("style");
5561
+ }
5562
+ document.documentElement.scrollTop = scrollTop;
5563
+ };
5564
+ }
5565
+ return;
5566
+ }
5567
+ function createBem(namespace, element, modifier) {
5568
+ let cls = namespace;
5569
+ if (element) {
5570
+ cls += `__${element}`;
5571
+ }
5572
+ if (modifier) {
5573
+ cls += `--${modifier}`;
5574
+ }
5575
+ return cls;
5576
+ }
5577
+ function useNamespace(block, needDot = false) {
5578
+ const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
5579
+ const b = () => createBem(namespace);
5580
+ const e = (element) => element ? createBem(namespace, element) : "";
5581
+ const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
5582
+ const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
5583
+ return {
5584
+ b,
5585
+ e,
5586
+ m,
5587
+ em
5588
+ };
5589
+ }
5590
+ function isUrl(value) {
5591
+ return /^((http|https):)?\/\//.test(value);
5592
+ }
5570
5593
  function useFieldCollection() {
5571
5594
  const itemContexts = [];
5572
5595
  const addItemContext = (field) => {
@@ -5634,7 +5657,7 @@ defineComponent({
5634
5657
  props: formProps,
5635
5658
  emits: ["validate"],
5636
5659
  setup(props, ctx2) {
5637
- const ns2 = useNamespace$1("form");
5660
+ const ns2 = useNamespace("form");
5638
5661
  const {
5639
5662
  itemContexts,
5640
5663
  addItemContext,
@@ -5752,29 +5775,6 @@ function useFixedOverlay(props, ctx2) {
5752
5775
  onUnmounted(removeBodyAdditions);
5753
5776
  return { onClick };
5754
5777
  }
5755
- function createBem(namespace, element, modifier) {
5756
- let cls = namespace;
5757
- if (element) {
5758
- cls += `__${element}`;
5759
- }
5760
- if (modifier) {
5761
- cls += `--${modifier}`;
5762
- }
5763
- return cls;
5764
- }
5765
- function useNamespace(block, needDot = false) {
5766
- const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
5767
- const b = () => createBem(namespace);
5768
- const e = (element) => element ? createBem(namespace, element) : "";
5769
- const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
5770
- const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
5771
- return {
5772
- b,
5773
- e,
5774
- m,
5775
- em
5776
- };
5777
- }
5778
5778
  var fixedOverlay = "";
5779
5779
  defineComponent({
5780
5780
  name: "DFixedOverlay",
@@ -5785,7 +5785,7 @@ defineComponent({
5785
5785
  const {
5786
5786
  modelValue
5787
5787
  } = toRefs(props);
5788
- const ns2 = useNamespace("fixed-overlay");
5788
+ const ns2 = useNamespace$1("fixed-overlay");
5789
5789
  const {
5790
5790
  onClick
5791
5791
  } = useFixedOverlay(props, ctx2);
@@ -5902,6 +5902,9 @@ function useOverlay(props, emit) {
5902
5902
  ];
5903
5903
  props.showArrow && middleware.push(arrow({ element: arrowEl }));
5904
5904
  props.shiftOffset !== void 0 && middleware.push(shift());
5905
+ if (!overlayEl) {
5906
+ return;
5907
+ }
5905
5908
  const { x, y, placement, middlewareData } = await computePosition(hostEl, overlayEl, {
5906
5909
  strategy: "fixed",
5907
5910
  middleware
@@ -5951,7 +5954,7 @@ const FlexibleOverlay = defineComponent({
5951
5954
  emit,
5952
5955
  expose
5953
5956
  }) {
5954
- const ns2 = useNamespace("flexible-overlay");
5957
+ const ns2 = useNamespace$1("flexible-overlay");
5955
5958
  const {
5956
5959
  clickEventBubble
5957
5960
  } = toRefs(props);
@@ -5980,7 +5983,7 @@ const FlexibleOverlay = defineComponent({
5980
5983
  });
5981
5984
  const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
5982
5985
  const isObject = (val) => val !== null && typeof val === "object";
5983
- const ns$1 = useNamespace("popper-trigger");
5986
+ const ns$1 = useNamespace$1("popper-trigger");
5984
5987
  function wrapContent(content) {
5985
5988
  return h("span", { class: ns$1.b() }, content);
5986
5989
  }
@@ -6167,7 +6170,7 @@ function usePopoverEvent(props, visible, origin) {
6167
6170
  });
6168
6171
  return { placement, handlePositionChange, onMouseenter, onMouseleave };
6169
6172
  }
6170
- const ns = useNamespace("popover");
6173
+ const ns = useNamespace$1("popover");
6171
6174
  function SuccessIcon$1() {
6172
6175
  return createVNode("svg", {
6173
6176
  "class": [ns.e("icon"), ns.em("icon", "success")],
@@ -6269,7 +6272,7 @@ var PopoverIcon = defineComponent({
6269
6272
  }
6270
6273
  },
6271
6274
  setup(props) {
6272
- const ns2 = useNamespace("popover");
6275
+ const ns2 = useNamespace$1("popover");
6273
6276
  return () => props.type && props.type !== "default" && createVNode("span", {
6274
6277
  "class": ns2.e("icon-wrap")
6275
6278
  }, [props.type === "success" && createVNode(SuccessIcon$1, null, null), props.type === "warning" && createVNode(WarningIcon, null, null), props.type === "info" && createVNode(InfoIcon, null, null), props.type === "error" && createVNode(ErrorIcon$1, null, null)]);
@@ -6306,7 +6309,7 @@ var Popover = defineComponent({
6306
6309
  const {
6307
6310
  overlayStyles
6308
6311
  } = usePopover(props, visible, placement, origin, popoverRef);
6309
- const ns2 = useNamespace("popover");
6312
+ const ns2 = useNamespace$1("popover");
6310
6313
  provide(POPPER_TRIGGER_TOKEN, origin);
6311
6314
  watch(visible, (newVal) => {
6312
6315
  if (newVal) {
@@ -6439,7 +6442,7 @@ function useFormLabel() {
6439
6442
  const formContext = inject(FORM_TOKEN);
6440
6443
  const formItemContext = inject(FORM_ITEM_TOKEN);
6441
6444
  const labelData = inject(LABEL_DATA);
6442
- const ns2 = useNamespace$1("form");
6445
+ const ns2 = useNamespace("form");
6443
6446
  const defaultTipsPopover = {
6444
6447
  content: "",
6445
6448
  position: ["top"],
@@ -6470,7 +6473,7 @@ var formLabel = "";
6470
6473
  var FormLabel = defineComponent({
6471
6474
  name: "DFormLabel",
6472
6475
  setup(_, ctx2) {
6473
- const ns2 = useNamespace$1("form");
6476
+ const ns2 = useNamespace("form");
6474
6477
  const {
6475
6478
  labelClasses,
6476
6479
  labelInnerClasses,
@@ -6503,7 +6506,7 @@ const formControlProps = {
6503
6506
  };
6504
6507
  function useFormControl(props) {
6505
6508
  const labelData = inject(LABEL_DATA);
6506
- const ns2 = useNamespace$1("form");
6509
+ const ns2 = useNamespace("form");
6507
6510
  const { feedbackStatus } = toRefs(props);
6508
6511
  const controlClasses = computed(() => ({
6509
6512
  [ns2.e("control")]: true,
@@ -6535,7 +6538,7 @@ var FormControl = defineComponent({
6535
6538
  const formContext = inject(FORM_TOKEN);
6536
6539
  const formControl2 = ref();
6537
6540
  const popoverRef = ref();
6538
- const ns2 = useNamespace$1("form");
6541
+ const ns2 = useNamespace("form");
6539
6542
  const showPopoverClick = ref(true);
6540
6543
  const {
6541
6544
  controlClasses,
@@ -7626,7 +7629,7 @@ function getFieldValue(obj, path) {
7626
7629
  }
7627
7630
  function useFormItem(messageType, _rules, validateState) {
7628
7631
  const formContext = inject(FORM_TOKEN);
7629
- const ns2 = useNamespace$1("form");
7632
+ const ns2 = useNamespace("form");
7630
7633
  const itemClasses = computed(() => ({
7631
7634
  [`${ns2.em("item", "horizontal")}`]: formContext.layout === "horizontal",
7632
7635
  [`${ns2.em("item", "vertical")}`]: formContext.layout === "vertical",
@@ -7865,6 +7868,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
7865
7868
  const selectDisabled = computed(() => (formContext == null ? void 0 : formContext.disabled) || props.disabled);
7866
7869
  const selectSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "md");
7867
7870
  const isObjectOption = ref(false);
7871
+ const originRef = ref();
7868
7872
  const isOpen = ref(false);
7869
7873
  const toggleChange = (bool) => {
7870
7874
  if (selectDisabled.value) {
@@ -7874,14 +7878,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
7874
7878
  ctx2.emit("toggle-change", bool);
7875
7879
  };
7876
7880
  onClickOutside(dropdownRef, () => {
7877
- var _a;
7878
- if (props.multiple && isOpen.value) {
7879
- (_a = selectRef.value) == null ? void 0 : _a.clearMultipleSearchKey();
7880
- onBlur();
7881
- }
7882
- if (isOpen.value) {
7883
- toggleChange(false);
7884
- }
7881
+ toggleChange(false);
7885
7882
  }, { ignore: [selectRef] });
7886
7883
  const dropdownMenuMultipleNs = useNamespace$1("dropdown-menu-multiple");
7887
7884
  const selectCls = computed(() => {
@@ -7994,11 +7991,8 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
7994
7991
  }
7995
7992
  };
7996
7993
  const valueChange = (item) => {
7997
- var _a;
7998
7994
  const { multiple } = props;
7999
7995
  let { modelValue } = props;
8000
- filterQuery.value = "";
8001
- handlerQueryFunc("");
8002
7996
  if (multiple) {
8003
7997
  const checkedItems = Array.isArray(modelValue) ? modelValue.slice() : [];
8004
7998
  const index2 = checkedItems.indexOf(item.value);
@@ -8025,7 +8019,6 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8025
8019
  }
8026
8020
  getMultipleSelected(checkedItems);
8027
8021
  } else {
8028
- (_a = selectRef.value) == null ? void 0 : _a.clearSingleSearchKey();
8029
8022
  ctx2.emit("update:modelValue", item.value);
8030
8023
  getSingleSelected(item);
8031
8024
  toggleChange(false);
@@ -8036,8 +8029,6 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8036
8029
  ctx2.emit("toggle-change", false);
8037
8030
  };
8038
8031
  const handleClear = () => {
8039
- filterQuery.value = "";
8040
- handlerQueryFunc("");
8041
8032
  if (props.multiple) {
8042
8033
  ctx2.emit("update:modelValue", []);
8043
8034
  ctx2.emit("value-change", []);
@@ -8050,6 +8041,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8050
8041
  handleClose();
8051
8042
  blur();
8052
8043
  }
8044
+ filterQuery.value = "";
8053
8045
  };
8054
8046
  const tagDelete = (data) => {
8055
8047
  let { modelValue } = props;
@@ -8067,22 +8059,21 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8067
8059
  ctx2.emit("remove-tag", data.value);
8068
8060
  getMultipleSelected(checkedItems);
8069
8061
  };
8070
- const onFocus = () => {
8062
+ const onFocus = (e) => {
8063
+ ctx2.emit("focus", e);
8071
8064
  if (!selectDisabled.value) {
8072
8065
  isSelectFocus.value = true;
8073
8066
  }
8074
8067
  };
8075
- const onBlur = () => {
8068
+ const onBlur = (e) => {
8069
+ ctx2.emit("blur", e);
8076
8070
  if (!selectDisabled.value) {
8077
- setTimeout(() => {
8078
- filterQuery.value = "";
8079
- handlerQueryFunc("");
8080
- }, 150);
8081
8071
  isSelectFocus.value = false;
8082
8072
  }
8083
8073
  };
8084
8074
  const queryChange = (query) => {
8085
8075
  filterQuery.value = query;
8076
+ ctx2.emit("input-change", query);
8086
8077
  };
8087
8078
  const isLoading = computed(() => typeof props.loading === "boolean" && props.loading);
8088
8079
  const debounceTime = computed(() => props.remote ? 300 : 0);
@@ -8110,7 +8101,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8110
8101
  const emptyText = computed(() => {
8111
8102
  const visibleOptionsCount = injectOptionsArray.value.filter((item) => {
8112
8103
  const label = item.name || item.value;
8113
- return label.toString().toLocaleLowerCase().includes(filterQuery.value.trim().toLocaleLowerCase());
8104
+ return label.toString().toLocaleLowerCase().includes(filterQuery.value.toLocaleLowerCase().trim());
8114
8105
  }).length;
8115
8106
  if (isLoading.value) {
8116
8107
  return props.loadingText || t("loadingText");
@@ -8137,8 +8128,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8137
8128
  }
8138
8129
  };
8139
8130
  watch(() => props.modelValue, () => {
8140
- formItemContext == null ? void 0 : formItemContext.validate("change").catch(() => {
8141
- });
8131
+ formItemContext == null ? void 0 : formItemContext.validate("change").catch((err) => console.warn(err));
8142
8132
  updateInjectOptionsStatus();
8143
8133
  }, { deep: true });
8144
8134
  watch(injectOptions, () => {
@@ -8153,17 +8143,10 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8153
8143
  (_a = dropdownRef.value) == null ? void 0 : _a.updatePosition();
8154
8144
  }
8155
8145
  }, { flush: "post" });
8156
- watch(isSelectFocus, (val) => {
8157
- if (val) {
8158
- ctx2.emit("focus");
8159
- } else {
8160
- ctx2.emit("blur");
8161
- }
8162
- });
8163
- onMounted(updateInjectOptionsStatus);
8164
8146
  return {
8165
8147
  selectDisabled,
8166
8148
  selectSize,
8149
+ originRef,
8167
8150
  dropdownRef,
8168
8151
  isOpen,
8169
8152
  selectCls,
@@ -8188,7 +8171,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8188
8171
  }
8189
8172
  const selectProps = {
8190
8173
  modelValue: {
8191
- type: [String, Number, Array, Boolean],
8174
+ type: [String, Number, Array],
8192
8175
  default: ""
8193
8176
  },
8194
8177
  "onUpdate:modelValue": {
@@ -8203,10 +8186,6 @@ const selectProps = {
8203
8186
  type: String,
8204
8187
  default: ""
8205
8188
  },
8206
- position: {
8207
- type: Array,
8208
- default: () => ["bottom", "top"]
8209
- },
8210
8189
  overview: {
8211
8190
  type: String,
8212
8191
  default: "border"
@@ -8278,10 +8257,6 @@ const selectProps = {
8278
8257
  multipleLimit: {
8279
8258
  type: Number,
8280
8259
  default: 0
8281
- },
8282
- showEmptyWhenUnmatched: {
8283
- type: Boolean,
8284
- default: true
8285
8260
  }
8286
8261
  };
8287
8262
  const optionProps = {
@@ -8578,7 +8553,7 @@ var Checkbox = defineComponent({
8578
8553
  props: checkboxProps,
8579
8554
  emits: ["change", "update:checked", "update:modelValue"],
8580
8555
  setup(props, ctx2) {
8581
- const ns2 = useNamespace$1("checkbox");
8556
+ const ns2 = useNamespace("checkbox");
8582
8557
  const {
8583
8558
  mergedChecked,
8584
8559
  mergedDisabled,
@@ -8679,7 +8654,7 @@ defineComponent({
8679
8654
  props: checkboxGroupProps,
8680
8655
  emits: ["change", "update:modelValue"],
8681
8656
  setup(props, ctx2) {
8682
- const ns2 = useNamespace$1("checkbox");
8657
+ const ns2 = useNamespace("checkbox");
8683
8658
  const {
8684
8659
  defaultOpt
8685
8660
  } = useCheckboxGroup(props, ctx2);
@@ -8725,7 +8700,7 @@ defineComponent({
8725
8700
  props: checkboxProps,
8726
8701
  emits: ["change", "update:checked", "update:modelValue"],
8727
8702
  setup(props, ctx2) {
8728
- const ns2 = useNamespace$1("checkbox-button");
8703
+ const ns2 = useNamespace("checkbox-button");
8729
8704
  const {
8730
8705
  mergedChecked,
8731
8706
  mergedDisabled,
@@ -8788,23 +8763,20 @@ function useOption(props) {
8788
8763
  return select2.modelValue === props.value;
8789
8764
  }
8790
8765
  });
8791
- const isDisabled = computed(() => props.disabled || ((optionGroup == null ? void 0 : optionGroup.disabled) ? true : false));
8792
8766
  const optionItem = computed(() => {
8793
8767
  return {
8794
8768
  name: props.name || props.value + "" || "",
8795
8769
  value: props.value,
8796
8770
  create: props.create,
8797
- _checked: false,
8798
- disabled: isDisabled.value
8771
+ _checked: false
8799
8772
  };
8800
8773
  });
8774
+ const isDisabled = computed(() => props.disabled || ((optionGroup == null ? void 0 : optionGroup.disabled) ? true : false));
8801
8775
  const isObjectOption = ref(!!props.name);
8802
8776
  const selectOptionCls = computed(() => {
8803
8777
  return className(ns2.e("item"), {
8804
8778
  active: isOptionSelected.value,
8805
- disabled: isDisabled.value,
8806
- [ns2.em("item", "sm")]: (select2 == null ? void 0 : select2.selectSize) === "sm",
8807
- [ns2.em("item", "lg")]: (select2 == null ? void 0 : select2.selectSize) === "lg"
8779
+ disabled: isDisabled.value
8808
8780
  });
8809
8781
  });
8810
8782
  const optionSelect = () => {
@@ -8920,7 +8892,7 @@ const tagProps = {
8920
8892
  }
8921
8893
  };
8922
8894
  function useClass(props) {
8923
- const ns2 = useNamespace("tag");
8895
+ const ns2 = useNamespace$1("tag");
8924
8896
  return computed(() => {
8925
8897
  const { type: type4, color, deletable } = props;
8926
8898
  return `${ns2.e("item")} ${ns2.m(type4 || (color ? "colorful" : "") || "default")} ${deletable ? ns2.m("deletable") : ""} ${ns2.m(props.size)}`;
@@ -8962,7 +8934,7 @@ var Tag = defineComponent({
8962
8934
  slots,
8963
8935
  emit
8964
8936
  }) {
8965
- const ns2 = useNamespace("tag");
8937
+ const ns2 = useNamespace$1("tag");
8966
8938
  const {
8967
8939
  type: type4,
8968
8940
  color,
@@ -9189,13 +9161,9 @@ function useSelectContent() {
9189
9161
  const ns2 = useNamespace$1("select");
9190
9162
  const select2 = inject(SELECT_TOKEN);
9191
9163
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
9192
- const styleType = inject(STYLE_TOKEN, void 0);
9193
9164
  const app = getCurrentInstance();
9194
9165
  const t = createI18nTranslate("DSelect", app);
9195
9166
  const searchQuery = ref("");
9196
- const singleSearchKey = ref("");
9197
- const singleInputRef = ref();
9198
- const singlePlaceholderWidth = computed(() => (select2 == null ? void 0 : select2.dropdownWidth) ? `${(select2 == null ? void 0 : select2.dropdownWidth) - 40}px` : "auto");
9199
9167
  const selectedData = computed(() => {
9200
9168
  return (select2 == null ? void 0 : select2.selectedOptions) || [];
9201
9169
  });
@@ -9213,37 +9181,21 @@ function useSelectContent() {
9213
9181
  const displayInputValue = computed(() => {
9214
9182
  var _a;
9215
9183
  if (select2 == null ? void 0 : select2.selectedOptions) {
9216
- return select2.selectedOptions.length > 1 ? select2.selectedOptions.map((item) => (item == null ? void 0 : item.name) || (item == null ? void 0 : item.value) || "").join(",") : ((_a = select2.selectedOptions[0]) == null ? void 0 : _a.name) || (select2.showEmptyWhenUnmatched ? "" : select2.modelValue);
9184
+ return select2.selectedOptions.length > 1 ? select2.selectedOptions.map((item) => (item == null ? void 0 : item.name) || (item == null ? void 0 : item.value) || "").join(",") : ((_a = select2.selectedOptions[0]) == null ? void 0 : _a.name) || "";
9217
9185
  } else {
9218
9186
  return "";
9219
9187
  }
9220
9188
  });
9221
- const isPlaceholderDark = computed(() => {
9222
- if (!singleSearchKey.value) {
9223
- if (isSelectDisable.value) {
9224
- return false;
9225
- }
9226
- if (!displayInputValue.value) {
9227
- return true;
9228
- } else {
9229
- return select2 == null ? void 0 : select2.isSelectFocus;
9230
- }
9231
- } else {
9232
- return false;
9233
- }
9234
- });
9235
9189
  const mergeClearable = computed(() => {
9236
9190
  return !isSelectDisable.value && !!(select2 == null ? void 0 : select2.allowClear) && (displayInputValue.value ? true : false);
9237
9191
  });
9238
9192
  const isDisabledTooltip = computed(() => {
9239
9193
  return !isSupportTagsTooltip.value || !!(select2 == null ? void 0 : select2.isOpen);
9240
9194
  });
9241
- const isSupportFilter = computed(() => lodash.exports.isFunction(select2 == null ? void 0 : select2.filter) || typeof (select2 == null ? void 0 : select2.filter) === "boolean" && (select2 == null ? void 0 : select2.filter));
9242
9195
  const selectionCls = computed(() => {
9243
9196
  return className(ns2.e("selection"), {
9244
9197
  [ns2.e("clearable")]: mergeClearable.value,
9245
- [ns2.em("selection", "error")]: isValidateError.value,
9246
- [ns2.em("selection", "gray-style")]: styleType === "gray"
9198
+ [ns2.em("selection", "error")]: isValidateError.value
9247
9199
  });
9248
9200
  });
9249
9201
  const inputCls = computed(() => {
@@ -9254,20 +9206,12 @@ function useSelectContent() {
9254
9206
  });
9255
9207
  const tagSize = computed(() => (select2 == null ? void 0 : select2.selectSize) || "sm");
9256
9208
  const placeholder = computed(() => displayInputValue.value ? "" : (select2 == null ? void 0 : select2.placeholder) || t("placeholder"));
9257
- const singlePlaceholder = computed(() => (select2 == null ? void 0 : select2.placeholder) || t("placeholder"));
9258
9209
  const isMultiple = computed(() => !!(select2 == null ? void 0 : select2.multiple));
9259
9210
  const handleClear = (e) => {
9260
9211
  e.preventDefault();
9261
9212
  e.stopPropagation();
9262
- searchQuery.value = "";
9263
- singleSearchKey.value = "";
9264
9213
  select2 == null ? void 0 : select2.handleClear();
9265
9214
  };
9266
- const onSingleInputWrapClick = () => {
9267
- if (!(select2 == null ? void 0 : select2.selectDisabled)) {
9268
- singleInputRef.value.focus();
9269
- }
9270
- };
9271
9215
  const tagDelete = (data) => {
9272
9216
  if (data && (data.value || data.value === 0)) {
9273
9217
  select2 == null ? void 0 : select2.tagDelete(data);
@@ -9277,67 +9221,39 @@ function useSelectContent() {
9277
9221
  select2 == null ? void 0 : select2.onFocus(e);
9278
9222
  };
9279
9223
  const onBlur = (e) => {
9280
- singleSearchKey.value = "";
9281
9224
  select2 == null ? void 0 : select2.onBlur(e);
9282
9225
  };
9283
- const onMultipleClick = () => {
9284
- if (select2 == null ? void 0 : select2.selectDisabled) {
9285
- return;
9286
- }
9287
- if (select2 == null ? void 0 : select2.isOpen) {
9288
- searchQuery.value = "";
9289
- select2 == null ? void 0 : select2.onBlur();
9290
- } else {
9291
- select2 == null ? void 0 : select2.onFocus();
9292
- }
9293
- };
9294
- const onArrowClick = () => {
9295
- if (isMultiple.value) {
9296
- onMultipleClick();
9297
- }
9298
- };
9299
9226
  const queryFilter = (e) => {
9300
9227
  e.preventDefault();
9301
9228
  e.stopPropagation();
9302
9229
  const query = e.target.value;
9303
- singleSearchKey.value = query;
9304
- searchQuery.value = query;
9305
9230
  if (!isReadOnly.value && (select2 == null ? void 0 : select2.debounceQueryFilter)) {
9306
9231
  select2 == null ? void 0 : select2.debounceQueryFilter(query);
9307
9232
  }
9308
9233
  };
9309
9234
  return {
9310
- singleInputRef,
9311
9235
  searchQuery,
9312
- singleSearchKey,
9313
9236
  selectedData,
9314
9237
  isSelectDisable,
9315
9238
  isSupportCollapseTags,
9316
9239
  isDisabledTooltip,
9317
- isSupportFilter,
9318
9240
  isReadOnly,
9319
9241
  selectionCls,
9320
9242
  inputCls,
9321
9243
  tagSize,
9322
9244
  placeholder,
9323
- singlePlaceholder,
9324
- singlePlaceholderWidth,
9325
9245
  isMultiple,
9326
9246
  displayInputValue,
9327
- isPlaceholderDark,
9328
- onSingleInputWrapClick,
9329
9247
  handleClear,
9330
9248
  tagDelete,
9331
9249
  onFocus,
9332
9250
  onBlur,
9333
- onMultipleClick,
9334
- onArrowClick,
9335
9251
  queryFilter
9336
9252
  };
9337
9253
  }
9338
9254
  var SelectContent = defineComponent({
9339
9255
  name: "SelectContent",
9340
- setup(_, ctx2) {
9256
+ setup() {
9341
9257
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
9342
9258
  const ns2 = useNamespace$1("select");
9343
9259
  const clearCls = computed(() => ({
@@ -9351,71 +9267,44 @@ var SelectContent = defineComponent({
9351
9267
  const multipleCls = ns2.e("multiple");
9352
9268
  const multipleInputCls = ns2.em("multiple", "input");
9353
9269
  const {
9354
- singleInputRef,
9355
9270
  searchQuery,
9356
- singleSearchKey,
9357
9271
  selectedData,
9358
9272
  isSelectDisable,
9359
9273
  isSupportCollapseTags,
9360
9274
  isDisabledTooltip,
9361
9275
  isReadOnly,
9362
- isSupportFilter,
9363
9276
  selectionCls,
9364
9277
  inputCls,
9365
9278
  tagSize,
9366
9279
  placeholder,
9367
- singlePlaceholder,
9368
- singlePlaceholderWidth,
9369
9280
  isMultiple,
9370
- isPlaceholderDark,
9371
9281
  displayInputValue,
9372
- onSingleInputWrapClick,
9373
- onMultipleClick,
9374
- onArrowClick,
9375
9282
  handleClear,
9376
9283
  tagDelete,
9377
9284
  onFocus,
9378
9285
  onBlur,
9379
9286
  queryFilter
9380
9287
  } = useSelectContent();
9381
- const clearSingleSearchKey = () => {
9382
- singleSearchKey.value = "";
9383
- };
9384
- const clearMultipleSearchKey = () => {
9385
- searchQuery.value = "";
9386
- };
9387
- ctx2.expose({
9388
- clearSingleSearchKey,
9389
- clearMultipleSearchKey
9390
- });
9391
9288
  return () => {
9392
9289
  return createVNode("div", {
9393
9290
  "class": selectionCls.value
9394
9291
  }, [isMultiple.value ? createVNode("div", {
9395
- "class": multipleCls,
9396
- "onClick": onMultipleClick
9292
+ "class": multipleCls
9397
9293
  }, [!isSupportCollapseTags.value && selectedData.value.length >= 1 && selectedData.value.map((item) => createVNode(Tag, {
9398
- "deletable": !(isSelectDisable.value || item.disabled),
9294
+ "deletable": true,
9399
9295
  "onTagDelete": withModifiers(() => tagDelete(item), ["prevent", "stop"]),
9400
9296
  "key": item.value,
9401
- "maxWidth": "78%",
9402
- "class": ["multiple-tag", {
9403
- disabled: isSelectDisable.value || item.disabled
9404
- }],
9405
9297
  "size": tagSize.value
9406
9298
  }, {
9407
9299
  default: () => [item.name]
9408
9300
  })), isSupportCollapseTags.value && selectedData.value.length >= 1 && createVNode(Tag, {
9409
9301
  "deletable": true,
9410
- "maxWidth": "75%",
9411
- "class": "multiple-tag",
9412
9302
  "onTagDelete": withModifiers(() => tagDelete(selectedData.value[0]), ["prevent", "stop"]),
9413
9303
  "size": tagSize.value
9414
9304
  }, {
9415
9305
  default: () => [selectedData.value[0].name]
9416
9306
  }), isSupportCollapseTags.value && selectedData.value.length > 1 && createVNode(Popover, {
9417
9307
  "trigger": "hover",
9418
- "auto-update-position": true,
9419
9308
  "disabled": isDisabledTooltip.value
9420
9309
  }, {
9421
9310
  default: () => createVNode(Tag, {
@@ -9427,49 +9316,39 @@ var SelectContent = defineComponent({
9427
9316
  "deletable": true,
9428
9317
  "onTagDelete": withModifiers(() => tagDelete(item), ["prevent", "stop"]),
9429
9318
  "key": item.value,
9430
- "class": "popover-tag",
9431
9319
  "size": tagSize.value
9432
9320
  }, {
9433
9321
  default: () => [item.name]
9434
9322
  }))])
9435
9323
  }), createVNode("div", {
9436
9324
  "class": multipleInputCls
9437
- }, [withDirectives(createVNode("input", {
9325
+ }, [createVNode("input", {
9438
9326
  "ref": "input",
9439
9327
  "value": searchQuery.value,
9440
9328
  "type": "text",
9441
9329
  "class": inputCls.value,
9442
9330
  "placeholder": placeholder.value,
9443
- "readonly": isReadOnly.value || !isSupportFilter.value,
9331
+ "readonly": isReadOnly.value,
9444
9332
  "disabled": isSelectDisable.value,
9445
- "onInput": queryFilter
9446
- }, null), [[vShow, !selectedData.value.length || isSupportFilter.value]])])]) : createVNode("div", {
9447
- "class": "single-inner-input",
9448
- "onClick": onSingleInputWrapClick
9449
- }, [!singleSearchKey.value && createVNode("span", {
9450
- "class": ["input-placeholder", {
9451
- "placeholder-dark": isPlaceholderDark.value
9452
- }],
9453
- "style": {
9454
- width: singlePlaceholderWidth.value
9455
- },
9456
- "title": displayInputValue.value || singlePlaceholder.value
9457
- }, [displayInputValue.value || singlePlaceholder.value]), withDirectives(createVNode("input", {
9458
- "ref": singleInputRef,
9333
+ "onInput": queryFilter,
9334
+ "onFocus": onFocus,
9335
+ "onBlur": onBlur
9336
+ }, null)])]) : createVNode("input", {
9337
+ "ref": "input",
9338
+ "value": displayInputValue.value,
9459
9339
  "type": "text",
9460
- "onUpdate:modelValue": ($event) => singleSearchKey.value = $event,
9461
9340
  "class": inputCls.value,
9341
+ "placeholder": placeholder.value,
9462
9342
  "readonly": isReadOnly.value,
9463
9343
  "disabled": isSelectDisable.value,
9464
9344
  "onFocus": onFocus,
9465
9345
  "onBlur": onBlur,
9466
9346
  "onInput": queryFilter
9467
- }, null), [[vModelText, singleSearchKey.value]])]), createVNode("span", {
9347
+ }, null), createVNode("span", {
9468
9348
  "onClick": handleClear,
9469
9349
  "class": clearCls.value
9470
9350
  }, [createVNode(AlertCloseIcon, null, null)]), createVNode("span", {
9471
- "class": arrowCls.value,
9472
- "onClick": onArrowClick
9351
+ "class": arrowCls.value
9473
9352
  }, [createVNode(SelectArrowIcon, null, null)])]);
9474
9353
  };
9475
9354
  }
@@ -9497,38 +9376,11 @@ function useSelectFunction(props, selectRef) {
9497
9376
  };
9498
9377
  return { isSelectFocus, focus, blur };
9499
9378
  }
9500
- function useSelectMenuSize(selectRef, dropdownRef, isOpen) {
9501
- const originRef = ref();
9502
- const dropdownWidth = ref(0);
9503
- let observer;
9504
- const updateDropdownWidth = () => {
9505
- var _a;
9506
- dropdownWidth.value = ((_a = originRef.value) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
9507
- if (isOpen.value) {
9508
- dropdownRef.value.updatePosition();
9509
- }
9510
- };
9511
- const watchInputSize = () => {
9512
- if (window) {
9513
- observer = new window.ResizeObserver(updateDropdownWidth);
9514
- observer.observe(originRef.value);
9515
- }
9516
- };
9517
- onMounted(() => {
9518
- originRef.value = selectRef.value.$el;
9519
- watchInputSize();
9520
- updateDropdownWidth();
9521
- });
9522
- onBeforeUnmount(() => {
9523
- observer == null ? void 0 : observer.unobserve(originRef.value);
9524
- });
9525
- return { originRef, dropdownWidth };
9526
- }
9527
9379
  var select = "";
9528
9380
  var Select = defineComponent({
9529
9381
  name: "DSelect",
9530
9382
  props: selectProps,
9531
- emits: ["toggle-change", "value-change", "update:modelValue", "focus", "blur", "remove-tag", "clear", "load-more"],
9383
+ emits: ["toggle-change", "value-change", "update:modelValue", "focus", "blur", "remove-tag", "clear", "input-change"],
9532
9384
  setup(props, ctx2) {
9533
9385
  const app = getCurrentInstance();
9534
9386
  const t = createI18nTranslate("DSelect", app);
@@ -9541,6 +9393,7 @@ var Select = defineComponent({
9541
9393
  const {
9542
9394
  selectDisabled,
9543
9395
  selectSize,
9396
+ originRef,
9544
9397
  dropdownRef,
9545
9398
  isOpen,
9546
9399
  selectCls,
@@ -9562,16 +9415,9 @@ var Select = defineComponent({
9562
9415
  isShowCreateOption
9563
9416
  } = useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t);
9564
9417
  const dropdownContainer = ref();
9565
- const {
9566
- originRef,
9567
- dropdownWidth
9568
- } = useSelectMenuSize(selectRef, dropdownRef, isOpen);
9569
9418
  const scrollbarNs = useNamespace$1("scrollbar");
9570
9419
  const ns2 = useNamespace$1("select");
9571
- const dropdownCls = {
9572
- [ns2.e("dropdown")]: true,
9573
- [ns2.em("dropdown", "multiple")]: props.multiple
9574
- };
9420
+ const dropdownCls = ns2.e("dropdown");
9575
9421
  const listCls = {
9576
9422
  [ns2.e("dropdown-list")]: true,
9577
9423
  [scrollbarNs.b()]: true
@@ -9583,8 +9429,17 @@ var Select = defineComponent({
9583
9429
  toggleChange
9584
9430
  });
9585
9431
  const isRender = ref(false);
9586
- onBeforeMount(() => {
9587
- isRender.value = true;
9432
+ const position = ref(["bottom-start", "top-start"]);
9433
+ const dropdownWidth = ref("0");
9434
+ const updateDropdownWidth = () => {
9435
+ var _a;
9436
+ dropdownWidth.value = ((_a = originRef == null ? void 0 : originRef.value) == null ? void 0 : _a.clientWidth) ? originRef.value.clientWidth + "px" : "100%";
9437
+ };
9438
+ watch(selectRef, (val) => {
9439
+ if (val) {
9440
+ originRef.value = val.$el;
9441
+ updateDropdownWidth();
9442
+ }
9588
9443
  });
9589
9444
  const scrollToBottom = () => {
9590
9445
  const compareHeight = dropdownContainer.value.scrollHeight - dropdownContainer.value.clientHeight;
@@ -9594,18 +9449,22 @@ var Select = defineComponent({
9594
9449
  }
9595
9450
  };
9596
9451
  onMounted(() => {
9452
+ isRender.value = true;
9453
+ updateDropdownWidth();
9454
+ window.addEventListener("resize", updateDropdownWidth);
9597
9455
  nextTick(() => {
9598
9456
  dropdownContainer.value.addEventListener("scroll", scrollToBottom);
9599
9457
  });
9600
9458
  });
9459
+ onUnmounted(() => {
9460
+ window.removeEventListener("resize", updateDropdownWidth);
9461
+ });
9601
9462
  provide(SELECT_TOKEN, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
9602
9463
  selectDisabled,
9603
9464
  selectSize,
9604
9465
  isOpen,
9605
- isSelectFocus,
9606
9466
  selectedOptions,
9607
9467
  filterQuery,
9608
- dropdownWidth,
9609
9468
  valueChange,
9610
9469
  handleClear,
9611
9470
  updateInjectOptions,
@@ -9619,7 +9478,7 @@ var Select = defineComponent({
9619
9478
  "class": selectCls.value,
9620
9479
  "onClick": withModifiers(() => {
9621
9480
  toggleChange(!isOpen.value);
9622
- }, [])
9481
+ }, ["stop"])
9623
9482
  }, [createVNode(SelectContent, {
9624
9483
  "ref": selectRef
9625
9484
  }, null), createVNode(Teleport, {
@@ -9633,9 +9492,9 @@ var Select = defineComponent({
9633
9492
  "onUpdate:modelValue": ($event) => isRender.value = $event,
9634
9493
  "ref": dropdownRef,
9635
9494
  "origin": originRef.value,
9495
+ "align": "start",
9636
9496
  "offset": 4,
9637
- "place-strategy": "no-space",
9638
- "position": props.position,
9497
+ "position": position.value,
9639
9498
  "style": {
9640
9499
  visibility: isOpen.value ? "visible" : "hidden",
9641
9500
  "z-index": isOpen.value ? "var(--devui-z-index-dropdown, 1052)" : -1
@@ -9646,14 +9505,11 @@ var Select = defineComponent({
9646
9505
  return [createVNode("div", {
9647
9506
  "class": dropdownCls,
9648
9507
  "style": {
9649
- width: `${dropdownWidth.value}px`,
9508
+ width: `${dropdownWidth.value}`,
9650
9509
  visibility: isOpen.value ? "visible" : "hidden"
9651
9510
  }
9652
9511
  }, [withDirectives(createVNode("ul", {
9653
9512
  "class": listCls,
9654
- "style": {
9655
- padding: isShowEmptyText.value ? "0" : "12px"
9656
- },
9657
9513
  "ref": dropdownContainer
9658
9514
  }, [isShowCreateOption.value && createVNode(Option, {
9659
9515
  "value": filterQuery.value,
@@ -9673,8 +9529,7 @@ var Select = defineComponent({
9673
9529
  default: () => [props.multiple ? createVNode(Checkbox, {
9674
9530
  "modelValue": item._checked,
9675
9531
  "label": item.name,
9676
- "disabled": isDisabled(item),
9677
- "class": "select-checkbox"
9532
+ "disabled": isDisabled(item)
9678
9533
  }, null) : item.name || item.value]
9679
9534
  }))]), [[vShow, !isLoading.value]]), isShowEmptyText.value && createVNode("div", null, [((_c = ctx2.slots) == null ? void 0 : _c.empty) && ctx2.slots.empty(), !((_d = ctx2.slots) == null ? void 0 : _d.empty) && createVNode("p", {
9680
9535
  "class": dropdownEmptyCls
@@ -9719,7 +9574,7 @@ const paginationProps = {
9719
9574
  },
9720
9575
  pageSizeDirection: {
9721
9576
  type: Array,
9722
- default: () => ["centerDown", "centerUp"]
9577
+ default: () => ["bottom", "top"]
9723
9578
  },
9724
9579
  pageIndex: {
9725
9580
  type: Number,
@@ -9998,8 +9853,14 @@ var JumpPage = defineComponent({
9998
9853
  }
9999
9854
  };
10000
9855
  const jump = (e) => {
9856
+ if (isNaN(curPage)) {
9857
+ curPage = 1;
9858
+ }
10001
9859
  if (curPage > (totalPages == null ? void 0 : totalPages.value)) {
10002
- return;
9860
+ curPage = totalPages == null ? void 0 : totalPages.value;
9861
+ }
9862
+ if (curPage < 1) {
9863
+ curPage = 1;
10003
9864
  }
10004
9865
  if ((e === "btn" || e.key === "Enter") && (cursor == null ? void 0 : cursor.value) !== curPage) {
10005
9866
  emit("changeCursorEmit", curPage);
@@ -10286,7 +10147,7 @@ var svgIcon = defineComponent({
10286
10147
  color,
10287
10148
  size
10288
10149
  } = toRefs(props);
10289
- const ns2 = useNamespace("svg-icon");
10150
+ const ns2 = useNamespace$1("svg-icon");
10290
10151
  const iconName = computed(() => `#icon-${name.value}`);
10291
10152
  const iconSize = computed(() => {
10292
10153
  return typeof size.value === "number" ? `${size.value}px` : size.value;
@@ -10315,7 +10176,7 @@ function useIconDom(props, ctx2) {
10315
10176
  classPrefix,
10316
10177
  rotate
10317
10178
  } = toRefs(props);
10318
- const ns2 = useNamespace("icon");
10179
+ const ns2 = useNamespace$1("icon");
10319
10180
  const iconSize = computed(() => {
10320
10181
  return typeof size.value === "number" ? `${size.value}px` : size.value;
10321
10182
  });
@@ -10373,7 +10234,7 @@ var Icon = defineComponent({
10373
10234
  const {
10374
10235
  iconDom
10375
10236
  } = useIconDom(props, ctx2);
10376
- const ns2 = useNamespace("icon");
10237
+ const ns2 = useNamespace$1("icon");
10377
10238
  const wrapClassed = computed(() => ({
10378
10239
  [ns2.e("container")]: true,
10379
10240
  [ns2.m("disabled")]: disabled.value,
@@ -10399,7 +10260,7 @@ var iconGroup = "";
10399
10260
  defineComponent({
10400
10261
  name: "DIconGroup",
10401
10262
  setup(_, ctx2) {
10402
- const ns2 = useNamespace("icon-group");
10263
+ const ns2 = useNamespace$1("icon-group");
10403
10264
  return () => {
10404
10265
  var _a, _b;
10405
10266
  return createVNode("div", {
@@ -10634,7 +10495,7 @@ var Dropdown = defineComponent({
10634
10495
  const id = `dropdown_${dropdownId++}`;
10635
10496
  const isOpen = ref(false);
10636
10497
  const currentPosition = ref("bottom");
10637
- const ns2 = useNamespace("dropdown");
10498
+ const ns2 = useNamespace$1("dropdown");
10638
10499
  provide(POPPER_TRIGGER_TOKEN, origin);
10639
10500
  useDropdownEvent({
10640
10501
  id,
@@ -10754,7 +10615,7 @@ defineComponent({
10754
10615
  overlayClass
10755
10616
  } = toRefs(props);
10756
10617
  const dropdownMenuRef = ref(null);
10757
- const ns2 = useNamespace("dropdown");
10618
+ const ns2 = useNamespace$1("dropdown");
10758
10619
  onClickOutside(dropdownMenuRef, (value) => {
10759
10620
  var _a, _b;
10760
10621
  if (((_a = clickOutside.value) == null ? void 0 : _a.call(clickOutside)) && !((_b = origin == null ? void 0 : origin.value) == null ? void 0 : _b.contains(value.target))) {
@@ -10806,6 +10667,7 @@ var PageSize = defineComponent({
10806
10667
  size,
10807
10668
  currentPageSize,
10808
10669
  pageSizeOptions,
10670
+ pageSizeDirection,
10809
10671
  pageSizeChange,
10810
10672
  t
10811
10673
  } = paginationContext;
@@ -10813,7 +10675,7 @@ var PageSize = defineComponent({
10813
10675
  iconRotate.value = e ? 180 : 0;
10814
10676
  };
10815
10677
  return () => createVNode(Fragment, null, [createVNode(Dropdown, {
10816
- "position": ["bottom", "top"],
10678
+ "position": pageSizeDirection.value,
10817
10679
  "class": ns2.e("size-list"),
10818
10680
  "onToggle": onDropdownToggle
10819
10681
  }, {
@@ -10831,9 +10693,9 @@ var PageSize = defineComponent({
10831
10693
  "class": {
10832
10694
  active: item === currentPageSize.value
10833
10695
  },
10834
- "onClick": withModifiers(pageSizeChange.bind(null, {
10835
- value: item
10836
- }), ["stop"]),
10696
+ "onClick": () => {
10697
+ pageSizeChange(item);
10698
+ },
10837
10699
  "key": index2
10838
10700
  }, [item]))])
10839
10701
  }), createVNode("span", {
@@ -10860,6 +10722,7 @@ var Pagination = defineComponent({
10860
10722
  const {
10861
10723
  autoHide,
10862
10724
  pageSizeOptions,
10725
+ pageSizeDirection,
10863
10726
  total,
10864
10727
  canChangePageSize,
10865
10728
  lite,
@@ -10905,7 +10768,7 @@ var Pagination = defineComponent({
10905
10768
  emit("pageIndexChange", val);
10906
10769
  };
10907
10770
  const pageSizeChange = (val) => {
10908
- currentPageSize.value = val.value;
10771
+ currentPageSize.value = val;
10909
10772
  if (props.autoFixPageIndex) {
10910
10773
  nextTick(() => {
10911
10774
  if (cursor.value > totalPages.value) {
@@ -10913,7 +10776,7 @@ var Pagination = defineComponent({
10913
10776
  }
10914
10777
  });
10915
10778
  }
10916
- emit("pageSizeChange", val.value);
10779
+ emit("pageSizeChange", val);
10917
10780
  };
10918
10781
  const litePageIndexChange = (page) => {
10919
10782
  changeCursorEmit(page.value);
@@ -10922,6 +10785,7 @@ var Pagination = defineComponent({
10922
10785
  size,
10923
10786
  currentPageSize,
10924
10787
  pageSizeOptions,
10788
+ pageSizeDirection,
10925
10789
  pageSizeChange,
10926
10790
  t
10927
10791
  });