vue-devui 1.5.13 → 1.5.14

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 (77) 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 +3 -0
  8. package/code-review/index.umd.js +1 -1
  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 +3 -0
  14. package/editable-select/index.umd.js +7 -7
  15. package/editor-md/index.es.js +1423 -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/modal/index.es.js +3 -0
  29. package/modal/index.umd.js +1 -1
  30. package/nuxt/components/checkbox.js +3 -0
  31. package/overlay/index.es.js +3 -0
  32. package/overlay/index.umd.js +1 -1
  33. package/package.json +1 -1
  34. package/pagination/index.es.js +155 -292
  35. package/pagination/index.umd.js +18 -18
  36. package/pagination/style.css +1 -1
  37. package/popover/index.es.js +3 -0
  38. package/popover/index.umd.js +6 -6
  39. package/radio/index.es.js +3 -0
  40. package/radio/index.umd.js +1 -1
  41. package/search/index.es.js +3 -0
  42. package/search/index.umd.js +1 -1
  43. package/select/index.es.js +119 -265
  44. package/select/index.umd.js +17 -17
  45. package/select/style.css +1 -1
  46. package/splitter/index.es.js +3 -0
  47. package/splitter/index.umd.js +1 -1
  48. package/style.css +1 -1
  49. package/switch/index.es.js +3 -0
  50. package/switch/index.umd.js +1 -1
  51. package/table/index.es.js +3 -0
  52. package/table/index.umd.js +1 -1
  53. package/textarea/index.es.js +3 -0
  54. package/textarea/index.umd.js +1 -1
  55. package/time-picker/index.es.js +3 -0
  56. package/time-picker/index.umd.js +1 -1
  57. package/time-select/index.es.js +119 -265
  58. package/time-select/index.umd.js +18 -18
  59. package/time-select/style.css +1 -1
  60. package/tooltip/index.es.js +3 -0
  61. package/tooltip/index.umd.js +4 -4
  62. package/tree/index.es.js +3 -0
  63. package/tree/index.umd.js +1 -1
  64. package/types/editor-md/index.d.ts +1 -0
  65. package/types/editor-md/src/components/md-render.d.ts +1 -1
  66. package/types/editor-md/src/composables/use-editor-md.d.ts +3 -0
  67. package/types/editor-md/src/editor-md-types.d.ts +9 -1
  68. package/types/editor-md/src/editor-md.d.ts +6 -3
  69. package/types/editor-md/src/plugins/checkbox.d.ts +1 -0
  70. package/types/pagination/src/pagination-types.d.ts +4 -13
  71. package/types/pagination/src/pagination.d.ts +218 -0
  72. package/types/select/src/select-types.d.ts +4 -23
  73. package/types/select/src/select.d.ts +1 -19
  74. package/types/select/src/use-select.d.ts +1 -1
  75. package/types/tag/src/tag.d.ts +2 -2
  76. package/vue-devui.es.js +229 -242
  77. package/vue-devui.umd.js +46 -46
@@ -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,17 +8059,15 @@ 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
  };
@@ -8110,7 +8100,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8110
8100
  const emptyText = computed(() => {
8111
8101
  const visibleOptionsCount = injectOptionsArray.value.filter((item) => {
8112
8102
  const label = item.name || item.value;
8113
- return label.toString().toLocaleLowerCase().includes(filterQuery.value.trim().toLocaleLowerCase());
8103
+ return label.toString().toLocaleLowerCase().includes(filterQuery.value.toLocaleLowerCase().trim());
8114
8104
  }).length;
8115
8105
  if (isLoading.value) {
8116
8106
  return props.loadingText || t("loadingText");
@@ -8137,8 +8127,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8137
8127
  }
8138
8128
  };
8139
8129
  watch(() => props.modelValue, () => {
8140
- formItemContext == null ? void 0 : formItemContext.validate("change").catch(() => {
8141
- });
8130
+ formItemContext == null ? void 0 : formItemContext.validate("change").catch((err) => console.warn(err));
8142
8131
  updateInjectOptionsStatus();
8143
8132
  }, { deep: true });
8144
8133
  watch(injectOptions, () => {
@@ -8153,17 +8142,10 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8153
8142
  (_a = dropdownRef.value) == null ? void 0 : _a.updatePosition();
8154
8143
  }
8155
8144
  }, { 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
8145
  return {
8165
8146
  selectDisabled,
8166
8147
  selectSize,
8148
+ originRef,
8167
8149
  dropdownRef,
8168
8150
  isOpen,
8169
8151
  selectCls,
@@ -8188,7 +8170,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8188
8170
  }
8189
8171
  const selectProps = {
8190
8172
  modelValue: {
8191
- type: [String, Number, Array, Boolean],
8173
+ type: [String, Number, Array],
8192
8174
  default: ""
8193
8175
  },
8194
8176
  "onUpdate:modelValue": {
@@ -8203,10 +8185,6 @@ const selectProps = {
8203
8185
  type: String,
8204
8186
  default: ""
8205
8187
  },
8206
- position: {
8207
- type: Array,
8208
- default: () => ["bottom", "top"]
8209
- },
8210
8188
  overview: {
8211
8189
  type: String,
8212
8190
  default: "border"
@@ -8278,10 +8256,6 @@ const selectProps = {
8278
8256
  multipleLimit: {
8279
8257
  type: Number,
8280
8258
  default: 0
8281
- },
8282
- showEmptyWhenUnmatched: {
8283
- type: Boolean,
8284
- default: true
8285
8259
  }
8286
8260
  };
8287
8261
  const optionProps = {
@@ -8578,7 +8552,7 @@ var Checkbox = defineComponent({
8578
8552
  props: checkboxProps,
8579
8553
  emits: ["change", "update:checked", "update:modelValue"],
8580
8554
  setup(props, ctx2) {
8581
- const ns2 = useNamespace$1("checkbox");
8555
+ const ns2 = useNamespace("checkbox");
8582
8556
  const {
8583
8557
  mergedChecked,
8584
8558
  mergedDisabled,
@@ -8679,7 +8653,7 @@ defineComponent({
8679
8653
  props: checkboxGroupProps,
8680
8654
  emits: ["change", "update:modelValue"],
8681
8655
  setup(props, ctx2) {
8682
- const ns2 = useNamespace$1("checkbox");
8656
+ const ns2 = useNamespace("checkbox");
8683
8657
  const {
8684
8658
  defaultOpt
8685
8659
  } = useCheckboxGroup(props, ctx2);
@@ -8725,7 +8699,7 @@ defineComponent({
8725
8699
  props: checkboxProps,
8726
8700
  emits: ["change", "update:checked", "update:modelValue"],
8727
8701
  setup(props, ctx2) {
8728
- const ns2 = useNamespace$1("checkbox-button");
8702
+ const ns2 = useNamespace("checkbox-button");
8729
8703
  const {
8730
8704
  mergedChecked,
8731
8705
  mergedDisabled,
@@ -8788,23 +8762,20 @@ function useOption(props) {
8788
8762
  return select2.modelValue === props.value;
8789
8763
  }
8790
8764
  });
8791
- const isDisabled = computed(() => props.disabled || ((optionGroup == null ? void 0 : optionGroup.disabled) ? true : false));
8792
8765
  const optionItem = computed(() => {
8793
8766
  return {
8794
8767
  name: props.name || props.value + "" || "",
8795
8768
  value: props.value,
8796
8769
  create: props.create,
8797
- _checked: false,
8798
- disabled: isDisabled.value
8770
+ _checked: false
8799
8771
  };
8800
8772
  });
8773
+ const isDisabled = computed(() => props.disabled || ((optionGroup == null ? void 0 : optionGroup.disabled) ? true : false));
8801
8774
  const isObjectOption = ref(!!props.name);
8802
8775
  const selectOptionCls = computed(() => {
8803
8776
  return className(ns2.e("item"), {
8804
8777
  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"
8778
+ disabled: isDisabled.value
8808
8779
  });
8809
8780
  });
8810
8781
  const optionSelect = () => {
@@ -8920,7 +8891,7 @@ const tagProps = {
8920
8891
  }
8921
8892
  };
8922
8893
  function useClass(props) {
8923
- const ns2 = useNamespace("tag");
8894
+ const ns2 = useNamespace$1("tag");
8924
8895
  return computed(() => {
8925
8896
  const { type: type4, color, deletable } = props;
8926
8897
  return `${ns2.e("item")} ${ns2.m(type4 || (color ? "colorful" : "") || "default")} ${deletable ? ns2.m("deletable") : ""} ${ns2.m(props.size)}`;
@@ -8962,7 +8933,7 @@ var Tag = defineComponent({
8962
8933
  slots,
8963
8934
  emit
8964
8935
  }) {
8965
- const ns2 = useNamespace("tag");
8936
+ const ns2 = useNamespace$1("tag");
8966
8937
  const {
8967
8938
  type: type4,
8968
8939
  color,
@@ -9189,13 +9160,9 @@ function useSelectContent() {
9189
9160
  const ns2 = useNamespace$1("select");
9190
9161
  const select2 = inject(SELECT_TOKEN);
9191
9162
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
9192
- const styleType = inject(STYLE_TOKEN, void 0);
9193
9163
  const app = getCurrentInstance();
9194
9164
  const t = createI18nTranslate("DSelect", app);
9195
9165
  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
9166
  const selectedData = computed(() => {
9200
9167
  return (select2 == null ? void 0 : select2.selectedOptions) || [];
9201
9168
  });
@@ -9213,37 +9180,21 @@ function useSelectContent() {
9213
9180
  const displayInputValue = computed(() => {
9214
9181
  var _a;
9215
9182
  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);
9183
+ 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
9184
  } else {
9218
9185
  return "";
9219
9186
  }
9220
9187
  });
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
9188
  const mergeClearable = computed(() => {
9236
9189
  return !isSelectDisable.value && !!(select2 == null ? void 0 : select2.allowClear) && (displayInputValue.value ? true : false);
9237
9190
  });
9238
9191
  const isDisabledTooltip = computed(() => {
9239
9192
  return !isSupportTagsTooltip.value || !!(select2 == null ? void 0 : select2.isOpen);
9240
9193
  });
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
9194
  const selectionCls = computed(() => {
9243
9195
  return className(ns2.e("selection"), {
9244
9196
  [ns2.e("clearable")]: mergeClearable.value,
9245
- [ns2.em("selection", "error")]: isValidateError.value,
9246
- [ns2.em("selection", "gray-style")]: styleType === "gray"
9197
+ [ns2.em("selection", "error")]: isValidateError.value
9247
9198
  });
9248
9199
  });
9249
9200
  const inputCls = computed(() => {
@@ -9254,20 +9205,12 @@ function useSelectContent() {
9254
9205
  });
9255
9206
  const tagSize = computed(() => (select2 == null ? void 0 : select2.selectSize) || "sm");
9256
9207
  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
9208
  const isMultiple = computed(() => !!(select2 == null ? void 0 : select2.multiple));
9259
9209
  const handleClear = (e) => {
9260
9210
  e.preventDefault();
9261
9211
  e.stopPropagation();
9262
- searchQuery.value = "";
9263
- singleSearchKey.value = "";
9264
9212
  select2 == null ? void 0 : select2.handleClear();
9265
9213
  };
9266
- const onSingleInputWrapClick = () => {
9267
- if (!(select2 == null ? void 0 : select2.selectDisabled)) {
9268
- singleInputRef.value.focus();
9269
- }
9270
- };
9271
9214
  const tagDelete = (data) => {
9272
9215
  if (data && (data.value || data.value === 0)) {
9273
9216
  select2 == null ? void 0 : select2.tagDelete(data);
@@ -9277,67 +9220,39 @@ function useSelectContent() {
9277
9220
  select2 == null ? void 0 : select2.onFocus(e);
9278
9221
  };
9279
9222
  const onBlur = (e) => {
9280
- singleSearchKey.value = "";
9281
9223
  select2 == null ? void 0 : select2.onBlur(e);
9282
9224
  };
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
9225
  const queryFilter = (e) => {
9300
9226
  e.preventDefault();
9301
9227
  e.stopPropagation();
9302
9228
  const query = e.target.value;
9303
- singleSearchKey.value = query;
9304
- searchQuery.value = query;
9305
9229
  if (!isReadOnly.value && (select2 == null ? void 0 : select2.debounceQueryFilter)) {
9306
9230
  select2 == null ? void 0 : select2.debounceQueryFilter(query);
9307
9231
  }
9308
9232
  };
9309
9233
  return {
9310
- singleInputRef,
9311
9234
  searchQuery,
9312
- singleSearchKey,
9313
9235
  selectedData,
9314
9236
  isSelectDisable,
9315
9237
  isSupportCollapseTags,
9316
9238
  isDisabledTooltip,
9317
- isSupportFilter,
9318
9239
  isReadOnly,
9319
9240
  selectionCls,
9320
9241
  inputCls,
9321
9242
  tagSize,
9322
9243
  placeholder,
9323
- singlePlaceholder,
9324
- singlePlaceholderWidth,
9325
9244
  isMultiple,
9326
9245
  displayInputValue,
9327
- isPlaceholderDark,
9328
- onSingleInputWrapClick,
9329
9246
  handleClear,
9330
9247
  tagDelete,
9331
9248
  onFocus,
9332
9249
  onBlur,
9333
- onMultipleClick,
9334
- onArrowClick,
9335
9250
  queryFilter
9336
9251
  };
9337
9252
  }
9338
9253
  var SelectContent = defineComponent({
9339
9254
  name: "SelectContent",
9340
- setup(_, ctx2) {
9255
+ setup() {
9341
9256
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
9342
9257
  const ns2 = useNamespace$1("select");
9343
9258
  const clearCls = computed(() => ({
@@ -9351,71 +9266,44 @@ var SelectContent = defineComponent({
9351
9266
  const multipleCls = ns2.e("multiple");
9352
9267
  const multipleInputCls = ns2.em("multiple", "input");
9353
9268
  const {
9354
- singleInputRef,
9355
9269
  searchQuery,
9356
- singleSearchKey,
9357
9270
  selectedData,
9358
9271
  isSelectDisable,
9359
9272
  isSupportCollapseTags,
9360
9273
  isDisabledTooltip,
9361
9274
  isReadOnly,
9362
- isSupportFilter,
9363
9275
  selectionCls,
9364
9276
  inputCls,
9365
9277
  tagSize,
9366
9278
  placeholder,
9367
- singlePlaceholder,
9368
- singlePlaceholderWidth,
9369
9279
  isMultiple,
9370
- isPlaceholderDark,
9371
9280
  displayInputValue,
9372
- onSingleInputWrapClick,
9373
- onMultipleClick,
9374
- onArrowClick,
9375
9281
  handleClear,
9376
9282
  tagDelete,
9377
9283
  onFocus,
9378
9284
  onBlur,
9379
9285
  queryFilter
9380
9286
  } = useSelectContent();
9381
- const clearSingleSearchKey = () => {
9382
- singleSearchKey.value = "";
9383
- };
9384
- const clearMultipleSearchKey = () => {
9385
- searchQuery.value = "";
9386
- };
9387
- ctx2.expose({
9388
- clearSingleSearchKey,
9389
- clearMultipleSearchKey
9390
- });
9391
9287
  return () => {
9392
9288
  return createVNode("div", {
9393
9289
  "class": selectionCls.value
9394
9290
  }, [isMultiple.value ? createVNode("div", {
9395
- "class": multipleCls,
9396
- "onClick": onMultipleClick
9291
+ "class": multipleCls
9397
9292
  }, [!isSupportCollapseTags.value && selectedData.value.length >= 1 && selectedData.value.map((item) => createVNode(Tag, {
9398
- "deletable": !(isSelectDisable.value || item.disabled),
9293
+ "deletable": true,
9399
9294
  "onTagDelete": withModifiers(() => tagDelete(item), ["prevent", "stop"]),
9400
9295
  "key": item.value,
9401
- "maxWidth": "78%",
9402
- "class": ["multiple-tag", {
9403
- disabled: isSelectDisable.value || item.disabled
9404
- }],
9405
9296
  "size": tagSize.value
9406
9297
  }, {
9407
9298
  default: () => [item.name]
9408
9299
  })), isSupportCollapseTags.value && selectedData.value.length >= 1 && createVNode(Tag, {
9409
9300
  "deletable": true,
9410
- "maxWidth": "75%",
9411
- "class": "multiple-tag",
9412
9301
  "onTagDelete": withModifiers(() => tagDelete(selectedData.value[0]), ["prevent", "stop"]),
9413
9302
  "size": tagSize.value
9414
9303
  }, {
9415
9304
  default: () => [selectedData.value[0].name]
9416
9305
  }), isSupportCollapseTags.value && selectedData.value.length > 1 && createVNode(Popover, {
9417
9306
  "trigger": "hover",
9418
- "auto-update-position": true,
9419
9307
  "disabled": isDisabledTooltip.value
9420
9308
  }, {
9421
9309
  default: () => createVNode(Tag, {
@@ -9427,49 +9315,39 @@ var SelectContent = defineComponent({
9427
9315
  "deletable": true,
9428
9316
  "onTagDelete": withModifiers(() => tagDelete(item), ["prevent", "stop"]),
9429
9317
  "key": item.value,
9430
- "class": "popover-tag",
9431
9318
  "size": tagSize.value
9432
9319
  }, {
9433
9320
  default: () => [item.name]
9434
9321
  }))])
9435
9322
  }), createVNode("div", {
9436
9323
  "class": multipleInputCls
9437
- }, [withDirectives(createVNode("input", {
9324
+ }, [createVNode("input", {
9438
9325
  "ref": "input",
9439
9326
  "value": searchQuery.value,
9440
9327
  "type": "text",
9441
9328
  "class": inputCls.value,
9442
9329
  "placeholder": placeholder.value,
9443
- "readonly": isReadOnly.value || !isSupportFilter.value,
9330
+ "readonly": isReadOnly.value,
9444
9331
  "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,
9332
+ "onInput": queryFilter,
9333
+ "onFocus": onFocus,
9334
+ "onBlur": onBlur
9335
+ }, null)])]) : createVNode("input", {
9336
+ "ref": "input",
9337
+ "value": displayInputValue.value,
9459
9338
  "type": "text",
9460
- "onUpdate:modelValue": ($event) => singleSearchKey.value = $event,
9461
9339
  "class": inputCls.value,
9340
+ "placeholder": placeholder.value,
9462
9341
  "readonly": isReadOnly.value,
9463
9342
  "disabled": isSelectDisable.value,
9464
9343
  "onFocus": onFocus,
9465
9344
  "onBlur": onBlur,
9466
9345
  "onInput": queryFilter
9467
- }, null), [[vModelText, singleSearchKey.value]])]), createVNode("span", {
9346
+ }, null), createVNode("span", {
9468
9347
  "onClick": handleClear,
9469
9348
  "class": clearCls.value
9470
9349
  }, [createVNode(AlertCloseIcon, null, null)]), createVNode("span", {
9471
- "class": arrowCls.value,
9472
- "onClick": onArrowClick
9350
+ "class": arrowCls.value
9473
9351
  }, [createVNode(SelectArrowIcon, null, null)])]);
9474
9352
  };
9475
9353
  }
@@ -9497,38 +9375,11 @@ function useSelectFunction(props, selectRef) {
9497
9375
  };
9498
9376
  return { isSelectFocus, focus, blur };
9499
9377
  }
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
9378
  var select = "";
9528
9379
  var Select = defineComponent({
9529
9380
  name: "DSelect",
9530
9381
  props: selectProps,
9531
- emits: ["toggle-change", "value-change", "update:modelValue", "focus", "blur", "remove-tag", "clear", "load-more"],
9382
+ emits: ["toggle-change", "value-change", "update:modelValue", "focus", "blur", "remove-tag", "clear"],
9532
9383
  setup(props, ctx2) {
9533
9384
  const app = getCurrentInstance();
9534
9385
  const t = createI18nTranslate("DSelect", app);
@@ -9541,6 +9392,7 @@ var Select = defineComponent({
9541
9392
  const {
9542
9393
  selectDisabled,
9543
9394
  selectSize,
9395
+ originRef,
9544
9396
  dropdownRef,
9545
9397
  isOpen,
9546
9398
  selectCls,
@@ -9562,16 +9414,9 @@ var Select = defineComponent({
9562
9414
  isShowCreateOption
9563
9415
  } = useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t);
9564
9416
  const dropdownContainer = ref();
9565
- const {
9566
- originRef,
9567
- dropdownWidth
9568
- } = useSelectMenuSize(selectRef, dropdownRef, isOpen);
9569
9417
  const scrollbarNs = useNamespace$1("scrollbar");
9570
9418
  const ns2 = useNamespace$1("select");
9571
- const dropdownCls = {
9572
- [ns2.e("dropdown")]: true,
9573
- [ns2.em("dropdown", "multiple")]: props.multiple
9574
- };
9419
+ const dropdownCls = ns2.e("dropdown");
9575
9420
  const listCls = {
9576
9421
  [ns2.e("dropdown-list")]: true,
9577
9422
  [scrollbarNs.b()]: true
@@ -9583,8 +9428,17 @@ var Select = defineComponent({
9583
9428
  toggleChange
9584
9429
  });
9585
9430
  const isRender = ref(false);
9586
- onBeforeMount(() => {
9587
- isRender.value = true;
9431
+ const position = ref(["bottom-start", "top-start"]);
9432
+ const dropdownWidth = ref("0");
9433
+ const updateDropdownWidth = () => {
9434
+ var _a;
9435
+ dropdownWidth.value = ((_a = originRef == null ? void 0 : originRef.value) == null ? void 0 : _a.clientWidth) ? originRef.value.clientWidth + "px" : "100%";
9436
+ };
9437
+ watch(selectRef, (val) => {
9438
+ if (val) {
9439
+ originRef.value = val.$el;
9440
+ updateDropdownWidth();
9441
+ }
9588
9442
  });
9589
9443
  const scrollToBottom = () => {
9590
9444
  const compareHeight = dropdownContainer.value.scrollHeight - dropdownContainer.value.clientHeight;
@@ -9594,18 +9448,22 @@ var Select = defineComponent({
9594
9448
  }
9595
9449
  };
9596
9450
  onMounted(() => {
9451
+ isRender.value = true;
9452
+ updateDropdownWidth();
9453
+ window.addEventListener("resize", updateDropdownWidth);
9597
9454
  nextTick(() => {
9598
9455
  dropdownContainer.value.addEventListener("scroll", scrollToBottom);
9599
9456
  });
9600
9457
  });
9458
+ onUnmounted(() => {
9459
+ window.removeEventListener("resize", updateDropdownWidth);
9460
+ });
9601
9461
  provide(SELECT_TOKEN, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
9602
9462
  selectDisabled,
9603
9463
  selectSize,
9604
9464
  isOpen,
9605
- isSelectFocus,
9606
9465
  selectedOptions,
9607
9466
  filterQuery,
9608
- dropdownWidth,
9609
9467
  valueChange,
9610
9468
  handleClear,
9611
9469
  updateInjectOptions,
@@ -9619,7 +9477,7 @@ var Select = defineComponent({
9619
9477
  "class": selectCls.value,
9620
9478
  "onClick": withModifiers(() => {
9621
9479
  toggleChange(!isOpen.value);
9622
- }, [])
9480
+ }, ["stop"])
9623
9481
  }, [createVNode(SelectContent, {
9624
9482
  "ref": selectRef
9625
9483
  }, null), createVNode(Teleport, {
@@ -9633,9 +9491,9 @@ var Select = defineComponent({
9633
9491
  "onUpdate:modelValue": ($event) => isRender.value = $event,
9634
9492
  "ref": dropdownRef,
9635
9493
  "origin": originRef.value,
9494
+ "align": "start",
9636
9495
  "offset": 4,
9637
- "place-strategy": "no-space",
9638
- "position": props.position,
9496
+ "position": position.value,
9639
9497
  "style": {
9640
9498
  visibility: isOpen.value ? "visible" : "hidden",
9641
9499
  "z-index": isOpen.value ? "var(--devui-z-index-dropdown, 1052)" : -1
@@ -9646,14 +9504,11 @@ var Select = defineComponent({
9646
9504
  return [createVNode("div", {
9647
9505
  "class": dropdownCls,
9648
9506
  "style": {
9649
- width: `${dropdownWidth.value}px`,
9507
+ width: `${dropdownWidth.value}`,
9650
9508
  visibility: isOpen.value ? "visible" : "hidden"
9651
9509
  }
9652
9510
  }, [withDirectives(createVNode("ul", {
9653
9511
  "class": listCls,
9654
- "style": {
9655
- padding: isShowEmptyText.value ? "0" : "12px"
9656
- },
9657
9512
  "ref": dropdownContainer
9658
9513
  }, [isShowCreateOption.value && createVNode(Option, {
9659
9514
  "value": filterQuery.value,
@@ -9673,8 +9528,7 @@ var Select = defineComponent({
9673
9528
  default: () => [props.multiple ? createVNode(Checkbox, {
9674
9529
  "modelValue": item._checked,
9675
9530
  "label": item.name,
9676
- "disabled": isDisabled(item),
9677
- "class": "select-checkbox"
9531
+ "disabled": isDisabled(item)
9678
9532
  }, null) : item.name || item.value]
9679
9533
  }))]), [[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
9534
  "class": dropdownEmptyCls
@@ -9719,7 +9573,7 @@ const paginationProps = {
9719
9573
  },
9720
9574
  pageSizeDirection: {
9721
9575
  type: Array,
9722
- default: () => ["centerDown", "centerUp"]
9576
+ default: () => ["bottom", "top"]
9723
9577
  },
9724
9578
  pageIndex: {
9725
9579
  type: Number,
@@ -9998,8 +9852,14 @@ var JumpPage = defineComponent({
9998
9852
  }
9999
9853
  };
10000
9854
  const jump = (e) => {
9855
+ if (isNaN(curPage)) {
9856
+ curPage = 1;
9857
+ }
10001
9858
  if (curPage > (totalPages == null ? void 0 : totalPages.value)) {
10002
- return;
9859
+ curPage = totalPages == null ? void 0 : totalPages.value;
9860
+ }
9861
+ if (curPage < 1) {
9862
+ curPage = 1;
10003
9863
  }
10004
9864
  if ((e === "btn" || e.key === "Enter") && (cursor == null ? void 0 : cursor.value) !== curPage) {
10005
9865
  emit("changeCursorEmit", curPage);
@@ -10286,7 +10146,7 @@ var svgIcon = defineComponent({
10286
10146
  color,
10287
10147
  size
10288
10148
  } = toRefs(props);
10289
- const ns2 = useNamespace("svg-icon");
10149
+ const ns2 = useNamespace$1("svg-icon");
10290
10150
  const iconName = computed(() => `#icon-${name.value}`);
10291
10151
  const iconSize = computed(() => {
10292
10152
  return typeof size.value === "number" ? `${size.value}px` : size.value;
@@ -10315,7 +10175,7 @@ function useIconDom(props, ctx2) {
10315
10175
  classPrefix,
10316
10176
  rotate
10317
10177
  } = toRefs(props);
10318
- const ns2 = useNamespace("icon");
10178
+ const ns2 = useNamespace$1("icon");
10319
10179
  const iconSize = computed(() => {
10320
10180
  return typeof size.value === "number" ? `${size.value}px` : size.value;
10321
10181
  });
@@ -10373,7 +10233,7 @@ var Icon = defineComponent({
10373
10233
  const {
10374
10234
  iconDom
10375
10235
  } = useIconDom(props, ctx2);
10376
- const ns2 = useNamespace("icon");
10236
+ const ns2 = useNamespace$1("icon");
10377
10237
  const wrapClassed = computed(() => ({
10378
10238
  [ns2.e("container")]: true,
10379
10239
  [ns2.m("disabled")]: disabled.value,
@@ -10399,7 +10259,7 @@ var iconGroup = "";
10399
10259
  defineComponent({
10400
10260
  name: "DIconGroup",
10401
10261
  setup(_, ctx2) {
10402
- const ns2 = useNamespace("icon-group");
10262
+ const ns2 = useNamespace$1("icon-group");
10403
10263
  return () => {
10404
10264
  var _a, _b;
10405
10265
  return createVNode("div", {
@@ -10634,7 +10494,7 @@ var Dropdown = defineComponent({
10634
10494
  const id = `dropdown_${dropdownId++}`;
10635
10495
  const isOpen = ref(false);
10636
10496
  const currentPosition = ref("bottom");
10637
- const ns2 = useNamespace("dropdown");
10497
+ const ns2 = useNamespace$1("dropdown");
10638
10498
  provide(POPPER_TRIGGER_TOKEN, origin);
10639
10499
  useDropdownEvent({
10640
10500
  id,
@@ -10754,7 +10614,7 @@ defineComponent({
10754
10614
  overlayClass
10755
10615
  } = toRefs(props);
10756
10616
  const dropdownMenuRef = ref(null);
10757
- const ns2 = useNamespace("dropdown");
10617
+ const ns2 = useNamespace$1("dropdown");
10758
10618
  onClickOutside(dropdownMenuRef, (value) => {
10759
10619
  var _a, _b;
10760
10620
  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 +10666,7 @@ var PageSize = defineComponent({
10806
10666
  size,
10807
10667
  currentPageSize,
10808
10668
  pageSizeOptions,
10669
+ pageSizeDirection,
10809
10670
  pageSizeChange,
10810
10671
  t
10811
10672
  } = paginationContext;
@@ -10813,7 +10674,7 @@ var PageSize = defineComponent({
10813
10674
  iconRotate.value = e ? 180 : 0;
10814
10675
  };
10815
10676
  return () => createVNode(Fragment, null, [createVNode(Dropdown, {
10816
- "position": ["bottom", "top"],
10677
+ "position": pageSizeDirection.value,
10817
10678
  "class": ns2.e("size-list"),
10818
10679
  "onToggle": onDropdownToggle
10819
10680
  }, {
@@ -10831,9 +10692,9 @@ var PageSize = defineComponent({
10831
10692
  "class": {
10832
10693
  active: item === currentPageSize.value
10833
10694
  },
10834
- "onClick": withModifiers(pageSizeChange.bind(null, {
10835
- value: item
10836
- }), ["stop"]),
10695
+ "onClick": () => {
10696
+ pageSizeChange(item);
10697
+ },
10837
10698
  "key": index2
10838
10699
  }, [item]))])
10839
10700
  }), createVNode("span", {
@@ -10860,6 +10721,7 @@ var Pagination = defineComponent({
10860
10721
  const {
10861
10722
  autoHide,
10862
10723
  pageSizeOptions,
10724
+ pageSizeDirection,
10863
10725
  total,
10864
10726
  canChangePageSize,
10865
10727
  lite,
@@ -10905,7 +10767,7 @@ var Pagination = defineComponent({
10905
10767
  emit("pageIndexChange", val);
10906
10768
  };
10907
10769
  const pageSizeChange = (val) => {
10908
- currentPageSize.value = val.value;
10770
+ currentPageSize.value = val;
10909
10771
  if (props.autoFixPageIndex) {
10910
10772
  nextTick(() => {
10911
10773
  if (cursor.value > totalPages.value) {
@@ -10913,7 +10775,7 @@ var Pagination = defineComponent({
10913
10775
  }
10914
10776
  });
10915
10777
  }
10916
- emit("pageSizeChange", val.value);
10778
+ emit("pageSizeChange", val);
10917
10779
  };
10918
10780
  const litePageIndexChange = (page) => {
10919
10781
  changeCursorEmit(page.value);
@@ -10922,6 +10784,7 @@ var Pagination = defineComponent({
10922
10784
  size,
10923
10785
  currentPageSize,
10924
10786
  pageSizeOptions,
10787
+ pageSizeDirection,
10925
10788
  pageSizeChange,
10926
10789
  t
10927
10790
  });