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
package/vue-devui.es.js CHANGED
@@ -33,7 +33,7 @@ var __publicField = (obj, key, value) => {
33
33
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
34
34
  return value;
35
35
  };
36
- import { createVNode, getCurrentInstance, defineComponent, toRefs, inject, computed, Fragment, mergeProps, resolveComponent, isVNode, ref, reactive, createTextVNode, provide, onMounted, watch, Transition, withDirectives, vShow, nextTick, onUnmounted, unref, withModifiers, Comment as Comment$1, Text, h, cloneVNode, Teleport, onBeforeUnmount, render as render$1, resolveDirective, resolveDynamicComponent, toRef, shallowRef, onBeforeMount, onUpdated, readonly, toRaw, watchEffect, renderSlot, useSlots, createApp, shallowReactive, vModelText, effect, TransitionGroup } from "vue";
36
+ import { createVNode, getCurrentInstance, defineComponent, toRefs, inject, computed, Fragment, mergeProps, resolveComponent, isVNode, ref, reactive, createTextVNode, provide, onMounted, watch, Transition, withDirectives, vShow, nextTick, onUnmounted, unref, withModifiers, Comment as Comment$1, Text, h, cloneVNode, Teleport, onBeforeUnmount, render as render$1, resolveDirective, resolveDynamicComponent, toRef, shallowRef, onBeforeMount, onUpdated, readonly, toRaw, watchEffect, renderSlot, useSlots, createApp, shallowReactive, effect, TransitionGroup } from "vue";
37
37
  import { useRoute } from "vue-router";
38
38
  import Clipboard from "clipboard";
39
39
  import { offset, autoPlacement, arrow, shift, computePosition, flip } from "@floating-ui/dom";
@@ -7904,6 +7904,9 @@ function useOverlay(props, emit) {
7904
7904
  ];
7905
7905
  props.showArrow && middleware.push(arrow({ element: arrowEl }));
7906
7906
  props.shiftOffset !== void 0 && middleware.push(shift());
7907
+ if (!overlayEl) {
7908
+ return;
7909
+ }
7907
7910
  const { x, y, placement, middlewareData } = await computePosition(hostEl, overlayEl, {
7908
7911
  strategy: "fixed",
7909
7912
  middleware
@@ -23764,7 +23767,7 @@ var Fullscreen = defineComponent({
23764
23767
  });
23765
23768
  var FullscreenInstall = {
23766
23769
  title: "Fullscreen \u5168\u5C4F",
23767
- category: "\u57FA\u7840\u7EC4\u4EF6",
23770
+ category: "\u901A\u7528",
23768
23771
  install(app) {
23769
23772
  app.component(Fullscreen.name, Fullscreen);
23770
23773
  }
@@ -25396,11 +25399,19 @@ function useEditorMd(props, ctx2) {
25396
25399
  const toolbars = reactive(cloneDeep_1(DEFAULT_TOOLBARS));
25397
25400
  const editorRef = ref();
25398
25401
  const renderRef = ref();
25402
+ const overlayRef = ref();
25403
+ const cursorRef = ref();
25404
+ const isHintShow = ref();
25399
25405
  const previewHtmlList = ref([]);
25400
25406
  let editorIns;
25401
25407
  let canPreviewScrollView = false;
25408
+ let cursorHint = "";
25409
+ let cursorHintEnd = -1;
25410
+ let cursorHintStart = -1;
25411
+ let prefix;
25412
+ let hintShow = false;
25402
25413
  let CodeMirror;
25403
- computed(() => {
25414
+ const prefixes = computed(() => {
25404
25415
  const result2 = [];
25405
25416
  for (const key in hintConfig == null ? void 0 : hintConfig.value) {
25406
25417
  if (typeof (hintConfig == null ? void 0 : hintConfig.value[key]) === "function" || (hintConfig == null ? void 0 : hintConfig.value[key]) && typeof (hintConfig == null ? void 0 : hintConfig.value[key].handler) === "function") {
@@ -25455,7 +25466,91 @@ function useEditorMd(props, ctx2) {
25455
25466
  canPreviewScrollView = false;
25456
25467
  };
25457
25468
  const onChecked = (e) => {
25458
- ctx2.emit("mdCheckedEvent", e);
25469
+ ctx2.emit("checkedChange", e);
25470
+ };
25471
+ let timer;
25472
+ const attachOverlay = () => {
25473
+ timer = setTimeout(() => {
25474
+ var _a;
25475
+ cursorRef.value = ((_a = editorRef.value) == null ? void 0 : _a.parentNode.querySelector(".CodeMirror-cursor")) || void 0;
25476
+ overlayRef.value.updatePosition();
25477
+ isHintShow.value = true;
25478
+ hintShow = true;
25479
+ });
25480
+ };
25481
+ const hideHint = () => {
25482
+ clearTimeout(timer);
25483
+ isHintShow.value = false;
25484
+ };
25485
+ const showHint = () => {
25486
+ if (hintShow) {
25487
+ hideHint();
25488
+ }
25489
+ attachOverlay();
25490
+ };
25491
+ const getHintList = () => {
25492
+ let handler;
25493
+ if (typeof hintConfig.value[prefix] === "function") {
25494
+ handler = hintConfig.value[prefix];
25495
+ } else if (hintConfig.value[prefix] && typeof hintConfig.value[prefix].handler === "function") {
25496
+ handler = hintConfig.value[prefix].handler;
25497
+ }
25498
+ const callback = (replaceText) => {
25499
+ const cursor = editorIns.getCursor();
25500
+ const endCh = cursorHintEnd;
25501
+ const startCh = cursorHintStart;
25502
+ if (editorIns.getLine(cursor.line).length === cursor.ch) {
25503
+ editorIns.replaceRange(replaceText + " ", { line: cursor.line, ch: startCh }, { line: cursor.line, ch: endCh });
25504
+ } else {
25505
+ editorIns.replaceRange(replaceText, { line: cursor.line, ch: startCh }, { line: cursor.line, ch: endCh });
25506
+ editorIns.setCursor(cursor.line, editorIns.getCursor().ch + 1);
25507
+ }
25508
+ editorIns.focus();
25509
+ hideHint();
25510
+ };
25511
+ handler && handler({ prefix, cursorHint, callback });
25512
+ };
25513
+ const cursorActivityHandler = () => {
25514
+ const cursor = editorIns.getCursor();
25515
+ let i = prefixes.value.length;
25516
+ const value = editorIns.getLine(cursor.line).replace(/\t/g, " ");
25517
+ const selection = editorIns.getSelection();
25518
+ const isImgRegx = /^\!\[\S+/;
25519
+ if (selection) {
25520
+ return;
25521
+ }
25522
+ let nowPrefix = "";
25523
+ let hint = "";
25524
+ while (i >= 1) {
25525
+ i--;
25526
+ nowPrefix = prefixes.value[i];
25527
+ const startPos = value.lastIndexOf(nowPrefix, cursor.ch);
25528
+ const endPos = value.indexOf(" ", cursor.ch) > -1 ? value.indexOf(" ", cursor.ch) : value.length;
25529
+ hint = value.slice(startPos, cursor.ch);
25530
+ if (startPos > 0 && value[startPos - 1] !== " " || startPos < 0 || !hint.includes(nowPrefix) || hint.endsWith(" ") || isImgRegx.test(hint)) {
25531
+ cursorHint = "";
25532
+ cursorHintStart = -1;
25533
+ cursorHintEnd = -1;
25534
+ } else {
25535
+ prefix = prefixes.value[i];
25536
+ cursorHint = hint.slice(prefix.length);
25537
+ cursorHintStart = startPos;
25538
+ cursorHintEnd = endPos;
25539
+ break;
25540
+ }
25541
+ }
25542
+ if (cursorHintStart > -1 && hint[0]) {
25543
+ const spacePosition = value.lastIndexOf(" ", cursor.ch);
25544
+ if (spacePosition > cursorHintStart) {
25545
+ return;
25546
+ }
25547
+ setTimeout(() => {
25548
+ showHint();
25549
+ getHintList();
25550
+ });
25551
+ } else {
25552
+ hideHint();
25553
+ }
25459
25554
  };
25460
25555
  const onChange = debounce(() => {
25461
25556
  const content2 = editorIns.getValue();
@@ -25492,8 +25587,13 @@ function useEditorMd(props, ctx2) {
25492
25587
  shortKeys[toolbarItem.shortKey.replace(/\+/g, "-")] = (_a = toolbarItem.handler) == null ? void 0 : _a.bind(null, editorIns, toolbarItem.params);
25493
25588
  }
25494
25589
  }
25495
- editorIns.setOption("extraKeys", shortKeys);
25590
+ editorIns.setOption("extraKeys", Object.assign({
25591
+ Esc: () => {
25592
+ hideHint();
25593
+ }
25594
+ }), shortKeys);
25496
25595
  editorIns.on("beforeChange", _enforceMaxLength);
25596
+ editorIns.on("cursorActivity", lodash.exports.throttle(cursorActivityHandler, hintConfig.value && hintConfig.value.throttleTime || 300));
25497
25597
  editorIns.setSize("auto", "100%");
25498
25598
  refreshEditorCursor();
25499
25599
  editorIns.setCursor(editorIns.lineCount(), 0);
@@ -25571,9 +25671,12 @@ function useEditorMd(props, ctx2) {
25571
25671
  });
25572
25672
  return {
25573
25673
  editorRef,
25674
+ overlayRef,
25675
+ cursorRef,
25574
25676
  renderRef,
25575
25677
  toolbars,
25576
25678
  previewHtmlList,
25679
+ isHintShow,
25577
25680
  getEditorIns,
25578
25681
  onPaste,
25579
25682
  previewContentChange,
@@ -25693,7 +25796,8 @@ const editorMdProps = __spreadProps(__spreadValues({}, commonProps$1), {
25693
25796
  default: 10
25694
25797
  },
25695
25798
  hintConfig: {
25696
- type: Object
25799
+ type: Object,
25800
+ default: {}
25697
25801
  },
25698
25802
  customHintReplaceFn: {
25699
25803
  type: Function
@@ -25987,13 +26091,17 @@ var ToolbarItem = defineComponent({
25987
26091
  const editorIns = getEditorIns();
25988
26092
  if (config.id === "fullscreen") {
25989
26093
  showFullscreen.value = !showFullscreen.value;
25990
- } else {
25991
- (_a = config.handler) == null ? void 0 : _a.call(config, editorIns, config.params);
26094
+ if (window) {
26095
+ const event = new Event("resize");
26096
+ window.dispatchEvent(event);
26097
+ }
25992
26098
  }
26099
+ (_a = config.handler) == null ? void 0 : _a.call(config, editorIns, config.params);
25993
26100
  };
25994
26101
  return () => createVNode(Fragment, null, [config.type === "button" && createVNode(Tooltip, {
25995
26102
  "position": ["top", "bottom"],
25996
- "content": getTooltipContent(config.name, config.shortKey)
26103
+ "content": getTooltipContent(config.name, config.shortKey),
26104
+ "hide-after": 1e3
25997
26105
  }, {
25998
26106
  default: () => [createVNode("span", {
25999
26107
  "class": "md-toolbar-item",
@@ -26005,8 +26113,9 @@ var ToolbarItem = defineComponent({
26005
26113
  "align": "start"
26006
26114
  }, {
26007
26115
  default: () => createVNode("span", null, [createVNode(Tooltip, {
26008
- "position": ["top"],
26009
- "content": getTooltipContent(config.name)
26116
+ "position": showFullscreen.value ? ["right"] : ["top"],
26117
+ "content": getTooltipContent(config.name),
26118
+ "hide-after": 1e3
26010
26119
  }, {
26011
26120
  default: () => [createVNode("span", {
26012
26121
  "class": "md-toolbar-item",
@@ -26432,7 +26541,7 @@ function useEditorMdRender(props, ctx2) {
26432
26541
  const result2 = previewRef.value.querySelectorAll("input");
26433
26542
  const index2 = [...result2].filter((el) => el.type === "checkbox").findIndex((item) => item === e.target);
26434
26543
  const checkContent = setChecked(e.target.checked, index2);
26435
- ctx2.emit("mdCheckedEvent", checkContent);
26544
+ ctx2.emit("checkedChange", checkContent);
26436
26545
  }
26437
26546
  };
26438
26547
  return { previewRef, renderService, onPreviewClick, setContainerContent };
@@ -26486,7 +26595,7 @@ function useMdRenderWatcher(props, renderService, setContainerContent) {
26486
26595
  var MdRender = defineComponent({
26487
26596
  name: "DMdRender",
26488
26597
  props: mdRenderProps,
26489
- emits: ["mdRenderChange", "mdCheckedEvent"],
26598
+ emits: ["mdRenderChange", "checkedChange"],
26490
26599
  setup(props, ctx2) {
26491
26600
  const {
26492
26601
  previewRef,
@@ -26512,7 +26621,7 @@ function _isSlot$7(s) {
26512
26621
  var EditorMd = defineComponent({
26513
26622
  name: "DEditorMd",
26514
26623
  props: editorMdProps,
26515
- emits: ["update:modelValue", "mdCheckedEvent", "selectHint", "afterEditorInit", "contentChange", "previewContentChange", "imageUpload"],
26624
+ emits: ["update:modelValue", "checkedChange", "selectHint", "afterEditorInit", "contentChange", "previewContentChange", "imageUpload"],
26516
26625
  setup(props, ctx2) {
26517
26626
  const {
26518
26627
  mode,
@@ -26535,7 +26644,10 @@ var EditorMd = defineComponent({
26535
26644
  const showFullscreen = ref(false);
26536
26645
  const {
26537
26646
  editorRef,
26647
+ overlayRef,
26648
+ cursorRef,
26538
26649
  renderRef,
26650
+ isHintShow,
26539
26651
  toolbars,
26540
26652
  previewHtmlList,
26541
26653
  onPaste,
@@ -26585,7 +26697,19 @@ var EditorMd = defineComponent({
26585
26697
  }, [createVNode("textarea", {
26586
26698
  "ref": editorRef,
26587
26699
  "placeholder": placeholder.value
26588
- }, [modelValue.value]), Boolean(maxlength == null ? void 0 : maxlength.value) && createVNode("div", {
26700
+ }, [modelValue.value]), createVNode(FlexibleOverlay, {
26701
+ "ref": overlayRef,
26702
+ "modelValue": isHintShow.value,
26703
+ "onUpdate:modelValue": ($event) => isHintShow.value = $event,
26704
+ "origin": cursorRef.value || void 0,
26705
+ "align": "start",
26706
+ "position": ["bottom-start"]
26707
+ }, {
26708
+ default: () => {
26709
+ var _a, _b;
26710
+ return [(_b = (_a = ctx2.slots) == null ? void 0 : _a.hintTemplate) == null ? void 0 : _b.call(_a)];
26711
+ }
26712
+ }), Boolean(maxlength == null ? void 0 : maxlength.value) && createVNode("div", {
26589
26713
  "class": "dp-md-count"
26590
26714
  }, [modelValue.value.length || 0, createTextVNode("/"), maxlength.value])]), createVNode(MdRender, {
26591
26715
  "ref": renderRef,
@@ -26600,7 +26724,7 @@ var EditorMd = defineComponent({
26600
26724
  "disable-render": true,
26601
26725
  "md-plugins": mdPlugins.value,
26602
26726
  "onMdRenderChange": previewContentChange,
26603
- "onMdCheckedEvent": onChecked,
26727
+ "onCheckedChange": onChecked,
26604
26728
  "onScroll": onPreviewScroll,
26605
26729
  "onMouseover": onPreviewMouseover,
26606
26730
  "onMouseout": onPreviewMouseout
@@ -27381,6 +27505,9 @@ class GitGraph$1 {
27381
27505
  style: "clip-path: circle(50%)"
27382
27506
  };
27383
27507
  this.setNodeAttr(img, imgAttrs);
27508
+ const authorText = document.createElementNS("http://www.w3.org/2000/svg", "title");
27509
+ authorText.appendChild(document.createTextNode(commit.author.name));
27510
+ img.appendChild(authorText);
27384
27511
  this.svg.appendChild(img);
27385
27512
  if (!this.messageBoxWidth) {
27386
27513
  this.messageBoxWidth = this.svg.getBoundingClientRect.width - (avatar_box_x + 40);
@@ -31562,11 +31689,12 @@ function className$1(classStr, classOpt) {
31562
31689
  function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31563
31690
  const formContext = inject(FORM_TOKEN, void 0);
31564
31691
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
31565
- const ns2 = useNamespace("select");
31692
+ const ns2 = useNamespace$1("select");
31566
31693
  const dropdownRef = ref();
31567
31694
  const selectDisabled = computed(() => (formContext == null ? void 0 : formContext.disabled) || props.disabled);
31568
31695
  const selectSize = computed(() => props.size || (formContext == null ? void 0 : formContext.size) || "md");
31569
31696
  const isObjectOption = ref(false);
31697
+ const originRef = ref();
31570
31698
  const isOpen = ref(false);
31571
31699
  const toggleChange = (bool) => {
31572
31700
  if (selectDisabled.value) {
@@ -31576,16 +31704,9 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31576
31704
  ctx2.emit("toggle-change", bool);
31577
31705
  };
31578
31706
  onClickOutside(dropdownRef, () => {
31579
- var _a;
31580
- if (props.multiple && isOpen.value) {
31581
- (_a = selectRef.value) == null ? void 0 : _a.clearMultipleSearchKey();
31582
- onBlur();
31583
- }
31584
- if (isOpen.value) {
31585
- toggleChange(false);
31586
- }
31707
+ toggleChange(false);
31587
31708
  }, { ignore: [selectRef] });
31588
- const dropdownMenuMultipleNs = useNamespace("dropdown-menu-multiple");
31709
+ const dropdownMenuMultipleNs = useNamespace$1("dropdown-menu-multiple");
31589
31710
  const selectCls = computed(() => {
31590
31711
  return className$1(ns2.b(), {
31591
31712
  [ns2.m("open")]: isOpen.value,
@@ -31696,11 +31817,8 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31696
31817
  }
31697
31818
  };
31698
31819
  const valueChange = (item) => {
31699
- var _a;
31700
31820
  const { multiple } = props;
31701
31821
  let { modelValue } = props;
31702
- filterQuery.value = "";
31703
- handlerQueryFunc("");
31704
31822
  if (multiple) {
31705
31823
  const checkedItems = Array.isArray(modelValue) ? modelValue.slice() : [];
31706
31824
  const index2 = checkedItems.indexOf(item.value);
@@ -31727,7 +31845,6 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31727
31845
  }
31728
31846
  getMultipleSelected(checkedItems);
31729
31847
  } else {
31730
- (_a = selectRef.value) == null ? void 0 : _a.clearSingleSearchKey();
31731
31848
  ctx2.emit("update:modelValue", item.value);
31732
31849
  getSingleSelected(item);
31733
31850
  toggleChange(false);
@@ -31738,8 +31855,6 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31738
31855
  ctx2.emit("toggle-change", false);
31739
31856
  };
31740
31857
  const handleClear = () => {
31741
- filterQuery.value = "";
31742
- handlerQueryFunc("");
31743
31858
  if (props.multiple) {
31744
31859
  ctx2.emit("update:modelValue", []);
31745
31860
  ctx2.emit("value-change", []);
@@ -31752,6 +31867,7 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31752
31867
  handleClose();
31753
31868
  blur2();
31754
31869
  }
31870
+ filterQuery.value = "";
31755
31871
  };
31756
31872
  const tagDelete = (data) => {
31757
31873
  let { modelValue } = props;
@@ -31769,17 +31885,15 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31769
31885
  ctx2.emit("remove-tag", data.value);
31770
31886
  getMultipleSelected(checkedItems);
31771
31887
  };
31772
- const onFocus = () => {
31888
+ const onFocus = (e) => {
31889
+ ctx2.emit("focus", e);
31773
31890
  if (!selectDisabled.value) {
31774
31891
  isSelectFocus.value = true;
31775
31892
  }
31776
31893
  };
31777
- const onBlur = () => {
31894
+ const onBlur = (e) => {
31895
+ ctx2.emit("blur", e);
31778
31896
  if (!selectDisabled.value) {
31779
- setTimeout(() => {
31780
- filterQuery.value = "";
31781
- handlerQueryFunc("");
31782
- }, 150);
31783
31897
  isSelectFocus.value = false;
31784
31898
  }
31785
31899
  };
@@ -31812,7 +31926,7 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31812
31926
  const emptyText = computed(() => {
31813
31927
  const visibleOptionsCount = injectOptionsArray.value.filter((item) => {
31814
31928
  const label = item.name || item.value;
31815
- return label.toString().toLocaleLowerCase().includes(filterQuery.value.trim().toLocaleLowerCase());
31929
+ return label.toString().toLocaleLowerCase().includes(filterQuery.value.toLocaleLowerCase().trim());
31816
31930
  }).length;
31817
31931
  if (isLoading.value) {
31818
31932
  return props.loadingText || t("loadingText");
@@ -31839,8 +31953,7 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31839
31953
  }
31840
31954
  };
31841
31955
  watch(() => props.modelValue, () => {
31842
- formItemContext == null ? void 0 : formItemContext.validate("change").catch(() => {
31843
- });
31956
+ formItemContext == null ? void 0 : formItemContext.validate("change").catch((err) => console.warn(err));
31844
31957
  updateInjectOptionsStatus();
31845
31958
  }, { deep: true });
31846
31959
  watch(injectOptions, () => {
@@ -31855,17 +31968,10 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31855
31968
  (_a = dropdownRef.value) == null ? void 0 : _a.updatePosition();
31856
31969
  }
31857
31970
  }, { flush: "post" });
31858
- watch(isSelectFocus, (val) => {
31859
- if (val) {
31860
- ctx2.emit("focus");
31861
- } else {
31862
- ctx2.emit("blur");
31863
- }
31864
- });
31865
- onMounted(updateInjectOptionsStatus);
31866
31971
  return {
31867
31972
  selectDisabled,
31868
31973
  selectSize,
31974
+ originRef,
31869
31975
  dropdownRef,
31870
31976
  isOpen,
31871
31977
  selectCls,
@@ -31890,7 +31996,7 @@ function useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t) {
31890
31996
  }
31891
31997
  const selectProps = {
31892
31998
  modelValue: {
31893
- type: [String, Number, Array, Boolean],
31999
+ type: [String, Number, Array],
31894
32000
  default: ""
31895
32001
  },
31896
32002
  "onUpdate:modelValue": {
@@ -31905,10 +32011,6 @@ const selectProps = {
31905
32011
  type: String,
31906
32012
  default: ""
31907
32013
  },
31908
- position: {
31909
- type: Array,
31910
- default: () => ["bottom", "top"]
31911
- },
31912
32014
  overview: {
31913
32015
  type: String,
31914
32016
  default: "border"
@@ -31980,10 +32082,6 @@ const selectProps = {
31980
32082
  multipleLimit: {
31981
32083
  type: Number,
31982
32084
  default: 0
31983
- },
31984
- showEmptyWhenUnmatched: {
31985
- type: Boolean,
31986
- default: true
31987
32085
  }
31988
32086
  };
31989
32087
  const optionProps = {
@@ -32016,7 +32114,7 @@ const optionGroupProps = {
32016
32114
  const SELECT_TOKEN = Symbol("dSelect");
32017
32115
  const OPTION_GROUP_TOKEN = Symbol("dOptionGroup");
32018
32116
  function useOption(props) {
32019
- const ns2 = useNamespace("select");
32117
+ const ns2 = useNamespace$1("select");
32020
32118
  const select2 = inject(SELECT_TOKEN, null);
32021
32119
  const optionGroup = inject(OPTION_GROUP_TOKEN, null);
32022
32120
  const currentName = computed(() => {
@@ -32032,23 +32130,20 @@ function useOption(props) {
32032
32130
  return select2.modelValue === props.value;
32033
32131
  }
32034
32132
  });
32035
- const isDisabled = computed(() => props.disabled || ((optionGroup == null ? void 0 : optionGroup.disabled) ? true : false));
32036
32133
  const optionItem = computed(() => {
32037
32134
  return {
32038
32135
  name: props.name || props.value + "" || "",
32039
32136
  value: props.value,
32040
32137
  create: props.create,
32041
- _checked: false,
32042
- disabled: isDisabled.value
32138
+ _checked: false
32043
32139
  };
32044
32140
  });
32141
+ const isDisabled = computed(() => props.disabled || ((optionGroup == null ? void 0 : optionGroup.disabled) ? true : false));
32045
32142
  const isObjectOption = ref(!!props.name);
32046
32143
  const selectOptionCls = computed(() => {
32047
32144
  return className$1(ns2.e("item"), {
32048
32145
  active: isOptionSelected.value,
32049
- disabled: isDisabled.value,
32050
- [ns2.em("item", "sm")]: (select2 == null ? void 0 : select2.selectSize) === "sm",
32051
- [ns2.em("item", "lg")]: (select2 == null ? void 0 : select2.selectSize) === "lg"
32146
+ disabled: isDisabled.value
32052
32147
  });
32053
32148
  });
32054
32149
  const optionSelect = () => {
@@ -32246,16 +32341,12 @@ var TagInstall = {
32246
32341
  }
32247
32342
  };
32248
32343
  function useSelectContent() {
32249
- const ns2 = useNamespace("select");
32344
+ const ns2 = useNamespace$1("select");
32250
32345
  const select2 = inject(SELECT_TOKEN);
32251
32346
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
32252
- const styleType = inject(STYLE_TOKEN, void 0);
32253
32347
  const app = getCurrentInstance();
32254
32348
  const t = createI18nTranslate("DSelect", app);
32255
32349
  const searchQuery = ref("");
32256
- const singleSearchKey = ref("");
32257
- const singleInputRef = ref();
32258
- const singlePlaceholderWidth = computed(() => (select2 == null ? void 0 : select2.dropdownWidth) ? `${(select2 == null ? void 0 : select2.dropdownWidth) - 40}px` : "auto");
32259
32350
  const selectedData = computed(() => {
32260
32351
  return (select2 == null ? void 0 : select2.selectedOptions) || [];
32261
32352
  });
@@ -32273,37 +32364,21 @@ function useSelectContent() {
32273
32364
  const displayInputValue = computed(() => {
32274
32365
  var _a;
32275
32366
  if (select2 == null ? void 0 : select2.selectedOptions) {
32276
- 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);
32367
+ 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) || "";
32277
32368
  } else {
32278
32369
  return "";
32279
32370
  }
32280
32371
  });
32281
- const isPlaceholderDark = computed(() => {
32282
- if (!singleSearchKey.value) {
32283
- if (isSelectDisable.value) {
32284
- return false;
32285
- }
32286
- if (!displayInputValue.value) {
32287
- return true;
32288
- } else {
32289
- return select2 == null ? void 0 : select2.isSelectFocus;
32290
- }
32291
- } else {
32292
- return false;
32293
- }
32294
- });
32295
32372
  const mergeClearable = computed(() => {
32296
32373
  return !isSelectDisable.value && !!(select2 == null ? void 0 : select2.allowClear) && (displayInputValue.value ? true : false);
32297
32374
  });
32298
32375
  const isDisabledTooltip = computed(() => {
32299
32376
  return !isSupportTagsTooltip.value || !!(select2 == null ? void 0 : select2.isOpen);
32300
32377
  });
32301
- 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));
32302
32378
  const selectionCls = computed(() => {
32303
32379
  return className$1(ns2.e("selection"), {
32304
32380
  [ns2.e("clearable")]: mergeClearable.value,
32305
- [ns2.em("selection", "error")]: isValidateError.value,
32306
- [ns2.em("selection", "gray-style")]: styleType === "gray"
32381
+ [ns2.em("selection", "error")]: isValidateError.value
32307
32382
  });
32308
32383
  });
32309
32384
  const inputCls = computed(() => {
@@ -32314,20 +32389,12 @@ function useSelectContent() {
32314
32389
  });
32315
32390
  const tagSize = computed(() => (select2 == null ? void 0 : select2.selectSize) || "sm");
32316
32391
  const placeholder = computed(() => displayInputValue.value ? "" : (select2 == null ? void 0 : select2.placeholder) || t("placeholder"));
32317
- const singlePlaceholder = computed(() => (select2 == null ? void 0 : select2.placeholder) || t("placeholder"));
32318
32392
  const isMultiple = computed(() => !!(select2 == null ? void 0 : select2.multiple));
32319
32393
  const handleClear = (e) => {
32320
32394
  e.preventDefault();
32321
32395
  e.stopPropagation();
32322
- searchQuery.value = "";
32323
- singleSearchKey.value = "";
32324
32396
  select2 == null ? void 0 : select2.handleClear();
32325
32397
  };
32326
- const onSingleInputWrapClick = () => {
32327
- if (!(select2 == null ? void 0 : select2.selectDisabled)) {
32328
- singleInputRef.value.focus();
32329
- }
32330
- };
32331
32398
  const tagDelete = (data) => {
32332
32399
  if (data && (data.value || data.value === 0)) {
32333
32400
  select2 == null ? void 0 : select2.tagDelete(data);
@@ -32337,69 +32404,41 @@ function useSelectContent() {
32337
32404
  select2 == null ? void 0 : select2.onFocus(e);
32338
32405
  };
32339
32406
  const onBlur = (e) => {
32340
- singleSearchKey.value = "";
32341
32407
  select2 == null ? void 0 : select2.onBlur(e);
32342
32408
  };
32343
- const onMultipleClick = () => {
32344
- if (select2 == null ? void 0 : select2.selectDisabled) {
32345
- return;
32346
- }
32347
- if (select2 == null ? void 0 : select2.isOpen) {
32348
- searchQuery.value = "";
32349
- select2 == null ? void 0 : select2.onBlur();
32350
- } else {
32351
- select2 == null ? void 0 : select2.onFocus();
32352
- }
32353
- };
32354
- const onArrowClick = () => {
32355
- if (isMultiple.value) {
32356
- onMultipleClick();
32357
- }
32358
- };
32359
32409
  const queryFilter = (e) => {
32360
32410
  e.preventDefault();
32361
32411
  e.stopPropagation();
32362
32412
  const query = e.target.value;
32363
- singleSearchKey.value = query;
32364
- searchQuery.value = query;
32365
32413
  if (!isReadOnly.value && (select2 == null ? void 0 : select2.debounceQueryFilter)) {
32366
32414
  select2 == null ? void 0 : select2.debounceQueryFilter(query);
32367
32415
  }
32368
32416
  };
32369
32417
  return {
32370
- singleInputRef,
32371
32418
  searchQuery,
32372
- singleSearchKey,
32373
32419
  selectedData,
32374
32420
  isSelectDisable,
32375
32421
  isSupportCollapseTags,
32376
32422
  isDisabledTooltip,
32377
- isSupportFilter,
32378
32423
  isReadOnly,
32379
32424
  selectionCls,
32380
32425
  inputCls,
32381
32426
  tagSize,
32382
32427
  placeholder,
32383
- singlePlaceholder,
32384
- singlePlaceholderWidth,
32385
32428
  isMultiple,
32386
32429
  displayInputValue,
32387
- isPlaceholderDark,
32388
- onSingleInputWrapClick,
32389
32430
  handleClear,
32390
32431
  tagDelete,
32391
32432
  onFocus,
32392
32433
  onBlur,
32393
- onMultipleClick,
32394
- onArrowClick,
32395
32434
  queryFilter
32396
32435
  };
32397
32436
  }
32398
32437
  var SelectContent = defineComponent({
32399
32438
  name: "SelectContent",
32400
- setup(_, ctx2) {
32439
+ setup() {
32401
32440
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
32402
- const ns2 = useNamespace("select");
32441
+ const ns2 = useNamespace$1("select");
32403
32442
  const clearCls = computed(() => ({
32404
32443
  [ns2.e("clear")]: true,
32405
32444
  [ns2.em("clear", "feedback")]: Boolean(formItemContext == null ? void 0 : formItemContext.validateState) && (formItemContext == null ? void 0 : formItemContext.showFeedback)
@@ -32411,71 +32450,44 @@ var SelectContent = defineComponent({
32411
32450
  const multipleCls = ns2.e("multiple");
32412
32451
  const multipleInputCls = ns2.em("multiple", "input");
32413
32452
  const {
32414
- singleInputRef,
32415
32453
  searchQuery,
32416
- singleSearchKey,
32417
32454
  selectedData,
32418
32455
  isSelectDisable,
32419
32456
  isSupportCollapseTags,
32420
32457
  isDisabledTooltip,
32421
32458
  isReadOnly,
32422
- isSupportFilter,
32423
32459
  selectionCls,
32424
32460
  inputCls,
32425
32461
  tagSize,
32426
32462
  placeholder,
32427
- singlePlaceholder,
32428
- singlePlaceholderWidth,
32429
32463
  isMultiple,
32430
- isPlaceholderDark,
32431
32464
  displayInputValue,
32432
- onSingleInputWrapClick,
32433
- onMultipleClick,
32434
- onArrowClick,
32435
32465
  handleClear,
32436
32466
  tagDelete,
32437
32467
  onFocus,
32438
32468
  onBlur,
32439
32469
  queryFilter
32440
32470
  } = useSelectContent();
32441
- const clearSingleSearchKey = () => {
32442
- singleSearchKey.value = "";
32443
- };
32444
- const clearMultipleSearchKey = () => {
32445
- searchQuery.value = "";
32446
- };
32447
- ctx2.expose({
32448
- clearSingleSearchKey,
32449
- clearMultipleSearchKey
32450
- });
32451
32471
  return () => {
32452
32472
  return createVNode("div", {
32453
32473
  "class": selectionCls.value
32454
32474
  }, [isMultiple.value ? createVNode("div", {
32455
- "class": multipleCls,
32456
- "onClick": onMultipleClick
32475
+ "class": multipleCls
32457
32476
  }, [!isSupportCollapseTags.value && selectedData.value.length >= 1 && selectedData.value.map((item) => createVNode(Tag, {
32458
- "deletable": !(isSelectDisable.value || item.disabled),
32477
+ "deletable": true,
32459
32478
  "onTagDelete": withModifiers(() => tagDelete(item), ["prevent", "stop"]),
32460
32479
  "key": item.value,
32461
- "maxWidth": "78%",
32462
- "class": ["multiple-tag", {
32463
- disabled: isSelectDisable.value || item.disabled
32464
- }],
32465
32480
  "size": tagSize.value
32466
32481
  }, {
32467
32482
  default: () => [item.name]
32468
32483
  })), isSupportCollapseTags.value && selectedData.value.length >= 1 && createVNode(Tag, {
32469
32484
  "deletable": true,
32470
- "maxWidth": "75%",
32471
- "class": "multiple-tag",
32472
32485
  "onTagDelete": withModifiers(() => tagDelete(selectedData.value[0]), ["prevent", "stop"]),
32473
32486
  "size": tagSize.value
32474
32487
  }, {
32475
32488
  default: () => [selectedData.value[0].name]
32476
32489
  }), isSupportCollapseTags.value && selectedData.value.length > 1 && createVNode(Popover, {
32477
32490
  "trigger": "hover",
32478
- "auto-update-position": true,
32479
32491
  "disabled": isDisabledTooltip.value
32480
32492
  }, {
32481
32493
  default: () => createVNode(Tag, {
@@ -32487,49 +32499,39 @@ var SelectContent = defineComponent({
32487
32499
  "deletable": true,
32488
32500
  "onTagDelete": withModifiers(() => tagDelete(item), ["prevent", "stop"]),
32489
32501
  "key": item.value,
32490
- "class": "popover-tag",
32491
32502
  "size": tagSize.value
32492
32503
  }, {
32493
32504
  default: () => [item.name]
32494
32505
  }))])
32495
32506
  }), createVNode("div", {
32496
32507
  "class": multipleInputCls
32497
- }, [withDirectives(createVNode("input", {
32508
+ }, [createVNode("input", {
32498
32509
  "ref": "input",
32499
32510
  "value": searchQuery.value,
32500
32511
  "type": "text",
32501
32512
  "class": inputCls.value,
32502
32513
  "placeholder": placeholder.value,
32503
- "readonly": isReadOnly.value || !isSupportFilter.value,
32514
+ "readonly": isReadOnly.value,
32504
32515
  "disabled": isSelectDisable.value,
32505
- "onInput": queryFilter
32506
- }, null), [[vShow, !selectedData.value.length || isSupportFilter.value]])])]) : createVNode("div", {
32507
- "class": "single-inner-input",
32508
- "onClick": onSingleInputWrapClick
32509
- }, [!singleSearchKey.value && createVNode("span", {
32510
- "class": ["input-placeholder", {
32511
- "placeholder-dark": isPlaceholderDark.value
32512
- }],
32513
- "style": {
32514
- width: singlePlaceholderWidth.value
32515
- },
32516
- "title": displayInputValue.value || singlePlaceholder.value
32517
- }, [displayInputValue.value || singlePlaceholder.value]), withDirectives(createVNode("input", {
32518
- "ref": singleInputRef,
32516
+ "onInput": queryFilter,
32517
+ "onFocus": onFocus,
32518
+ "onBlur": onBlur
32519
+ }, null)])]) : createVNode("input", {
32520
+ "ref": "input",
32521
+ "value": displayInputValue.value,
32519
32522
  "type": "text",
32520
- "onUpdate:modelValue": ($event) => singleSearchKey.value = $event,
32521
32523
  "class": inputCls.value,
32524
+ "placeholder": placeholder.value,
32522
32525
  "readonly": isReadOnly.value,
32523
32526
  "disabled": isSelectDisable.value,
32524
32527
  "onFocus": onFocus,
32525
32528
  "onBlur": onBlur,
32526
32529
  "onInput": queryFilter
32527
- }, null), [[vModelText, singleSearchKey.value]])]), createVNode("span", {
32530
+ }, null), createVNode("span", {
32528
32531
  "onClick": handleClear,
32529
32532
  "class": clearCls.value
32530
32533
  }, [createVNode(AlertCloseIcon, null, null)]), createVNode("span", {
32531
- "class": arrowCls.value,
32532
- "onClick": onArrowClick
32534
+ "class": arrowCls.value
32533
32535
  }, [createVNode(SelectArrowIcon, null, null)])]);
32534
32536
  };
32535
32537
  }
@@ -32557,38 +32559,11 @@ function useSelectFunction(props, selectRef) {
32557
32559
  };
32558
32560
  return { isSelectFocus, focus, blur: blur2 };
32559
32561
  }
32560
- function useSelectMenuSize(selectRef, dropdownRef, isOpen) {
32561
- const originRef = ref();
32562
- const dropdownWidth = ref(0);
32563
- let observer;
32564
- const updateDropdownWidth = () => {
32565
- var _a;
32566
- dropdownWidth.value = ((_a = originRef.value) == null ? void 0 : _a.getBoundingClientRect().width) || 0;
32567
- if (isOpen.value) {
32568
- dropdownRef.value.updatePosition();
32569
- }
32570
- };
32571
- const watchInputSize = () => {
32572
- if (window) {
32573
- observer = new window.ResizeObserver(updateDropdownWidth);
32574
- observer.observe(originRef.value);
32575
- }
32576
- };
32577
- onMounted(() => {
32578
- originRef.value = selectRef.value.$el;
32579
- watchInputSize();
32580
- updateDropdownWidth();
32581
- });
32582
- onBeforeUnmount(() => {
32583
- observer == null ? void 0 : observer.unobserve(originRef.value);
32584
- });
32585
- return { originRef, dropdownWidth };
32586
- }
32587
32562
  var select = "";
32588
32563
  var Select = defineComponent({
32589
32564
  name: "DSelect",
32590
32565
  props: selectProps,
32591
- emits: ["toggle-change", "value-change", "update:modelValue", "focus", "blur", "remove-tag", "clear", "load-more"],
32566
+ emits: ["toggle-change", "value-change", "update:modelValue", "focus", "blur", "remove-tag", "clear"],
32592
32567
  setup(props, ctx2) {
32593
32568
  const app = getCurrentInstance();
32594
32569
  const t = createI18nTranslate("DSelect", app);
@@ -32601,6 +32576,7 @@ var Select = defineComponent({
32601
32576
  const {
32602
32577
  selectDisabled,
32603
32578
  selectSize,
32579
+ originRef,
32604
32580
  dropdownRef,
32605
32581
  isOpen,
32606
32582
  selectCls,
@@ -32622,16 +32598,9 @@ var Select = defineComponent({
32622
32598
  isShowCreateOption
32623
32599
  } = useSelect$2(props, selectRef, ctx2, focus, blur2, isSelectFocus, t);
32624
32600
  const dropdownContainer = ref();
32625
- const {
32626
- originRef,
32627
- dropdownWidth
32628
- } = useSelectMenuSize(selectRef, dropdownRef, isOpen);
32629
- const scrollbarNs = useNamespace("scrollbar");
32630
- const ns2 = useNamespace("select");
32631
- const dropdownCls = {
32632
- [ns2.e("dropdown")]: true,
32633
- [ns2.em("dropdown", "multiple")]: props.multiple
32634
- };
32601
+ const scrollbarNs = useNamespace$1("scrollbar");
32602
+ const ns2 = useNamespace$1("select");
32603
+ const dropdownCls = ns2.e("dropdown");
32635
32604
  const listCls = {
32636
32605
  [ns2.e("dropdown-list")]: true,
32637
32606
  [scrollbarNs.b()]: true
@@ -32643,8 +32612,17 @@ var Select = defineComponent({
32643
32612
  toggleChange
32644
32613
  });
32645
32614
  const isRender = ref(false);
32646
- onBeforeMount(() => {
32647
- isRender.value = true;
32615
+ const position = ref(["bottom-start", "top-start"]);
32616
+ const dropdownWidth = ref("0");
32617
+ const updateDropdownWidth = () => {
32618
+ var _a;
32619
+ dropdownWidth.value = ((_a = originRef == null ? void 0 : originRef.value) == null ? void 0 : _a.clientWidth) ? originRef.value.clientWidth + "px" : "100%";
32620
+ };
32621
+ watch(selectRef, (val) => {
32622
+ if (val) {
32623
+ originRef.value = val.$el;
32624
+ updateDropdownWidth();
32625
+ }
32648
32626
  });
32649
32627
  const scrollToBottom = () => {
32650
32628
  const compareHeight = dropdownContainer.value.scrollHeight - dropdownContainer.value.clientHeight;
@@ -32654,18 +32632,22 @@ var Select = defineComponent({
32654
32632
  }
32655
32633
  };
32656
32634
  onMounted(() => {
32635
+ isRender.value = true;
32636
+ updateDropdownWidth();
32637
+ window.addEventListener("resize", updateDropdownWidth);
32657
32638
  nextTick(() => {
32658
32639
  dropdownContainer.value.addEventListener("scroll", scrollToBottom);
32659
32640
  });
32660
32641
  });
32642
+ onUnmounted(() => {
32643
+ window.removeEventListener("resize", updateDropdownWidth);
32644
+ });
32661
32645
  provide(SELECT_TOKEN, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
32662
32646
  selectDisabled,
32663
32647
  selectSize,
32664
32648
  isOpen,
32665
- isSelectFocus,
32666
32649
  selectedOptions,
32667
32650
  filterQuery,
32668
- dropdownWidth,
32669
32651
  valueChange,
32670
32652
  handleClear,
32671
32653
  updateInjectOptions,
@@ -32679,7 +32661,7 @@ var Select = defineComponent({
32679
32661
  "class": selectCls.value,
32680
32662
  "onClick": withModifiers(() => {
32681
32663
  toggleChange(!isOpen.value);
32682
- }, [])
32664
+ }, ["stop"])
32683
32665
  }, [createVNode(SelectContent, {
32684
32666
  "ref": selectRef
32685
32667
  }, null), createVNode(Teleport, {
@@ -32693,9 +32675,9 @@ var Select = defineComponent({
32693
32675
  "onUpdate:modelValue": ($event) => isRender.value = $event,
32694
32676
  "ref": dropdownRef,
32695
32677
  "origin": originRef.value,
32678
+ "align": "start",
32696
32679
  "offset": 4,
32697
- "place-strategy": "no-space",
32698
- "position": props.position,
32680
+ "position": position.value,
32699
32681
  "style": {
32700
32682
  visibility: isOpen.value ? "visible" : "hidden",
32701
32683
  "z-index": isOpen.value ? "var(--devui-z-index-dropdown, 1052)" : -1
@@ -32706,14 +32688,11 @@ var Select = defineComponent({
32706
32688
  return [createVNode("div", {
32707
32689
  "class": dropdownCls,
32708
32690
  "style": {
32709
- width: `${dropdownWidth.value}px`,
32691
+ width: `${dropdownWidth.value}`,
32710
32692
  visibility: isOpen.value ? "visible" : "hidden"
32711
32693
  }
32712
32694
  }, [withDirectives(createVNode("ul", {
32713
32695
  "class": listCls,
32714
- "style": {
32715
- padding: isShowEmptyText.value ? "0" : "12px"
32716
- },
32717
32696
  "ref": dropdownContainer
32718
32697
  }, [isShowCreateOption.value && createVNode(Option, {
32719
32698
  "value": filterQuery.value,
@@ -32733,8 +32712,7 @@ var Select = defineComponent({
32733
32712
  default: () => [props.multiple ? createVNode(Checkbox, {
32734
32713
  "modelValue": item._checked,
32735
32714
  "label": item.name,
32736
- "disabled": isDisabled(item),
32737
- "class": "select-checkbox"
32715
+ "disabled": isDisabled(item)
32738
32716
  }, null) : item.name || item.value]
32739
32717
  }))]), [[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", {
32740
32718
  "class": dropdownEmptyCls
@@ -32750,7 +32728,7 @@ var OptionGroup = defineComponent({
32750
32728
  name: "DOptionGroup",
32751
32729
  props: optionGroupProps,
32752
32730
  setup(props, ctx2) {
32753
- const ns2 = useNamespace("select");
32731
+ const ns2 = useNamespace$1("select");
32754
32732
  provide(OPTION_GROUP_TOKEN, reactive(__spreadValues({}, toRefs(props))));
32755
32733
  return () => {
32756
32734
  var _a;
@@ -32789,7 +32767,7 @@ const paginationProps = {
32789
32767
  },
32790
32768
  pageSizeDirection: {
32791
32769
  type: Array,
32792
- default: () => ["centerDown", "centerUp"]
32770
+ default: () => ["bottom", "top"]
32793
32771
  },
32794
32772
  pageIndex: {
32795
32773
  type: Number,
@@ -32935,7 +32913,7 @@ var ConfigMenu = defineComponent({
32935
32913
  isShowConfig,
32936
32914
  $slots
32937
32915
  } = this;
32938
- const ns2 = useNamespace$1("pagination");
32916
+ const ns2 = useNamespace("pagination");
32939
32917
  return withDirectives(createVNode("div", {
32940
32918
  "class": ns2.e("config"),
32941
32919
  "ref": "paginationConfig"
@@ -33003,8 +32981,14 @@ var JumpPage = defineComponent({
33003
32981
  }
33004
32982
  };
33005
32983
  const jump = (e) => {
32984
+ if (isNaN(curPage)) {
32985
+ curPage = 1;
32986
+ }
33006
32987
  if (curPage > (totalPages == null ? void 0 : totalPages.value)) {
33007
- return;
32988
+ curPage = totalPages == null ? void 0 : totalPages.value;
32989
+ }
32990
+ if (curPage < 1) {
32991
+ curPage = 1;
33008
32992
  }
33009
32993
  if ((e === "btn" || e.key === "Enter") && (cursor == null ? void 0 : cursor.value) !== curPage) {
33010
32994
  emit("changeCursorEmit", curPage);
@@ -33025,7 +33009,7 @@ var JumpPage = defineComponent({
33025
33009
  jump,
33026
33010
  showJumpButton
33027
33011
  } = this;
33028
- const ns2 = useNamespace$1("pagination");
33012
+ const ns2 = useNamespace("pagination");
33029
33013
  const inputProps2 = {
33030
33014
  class: [ns2.e("input"), size ? ns2.em("input", size) : ""],
33031
33015
  size,
@@ -33147,7 +33131,7 @@ var PageNumBtn = defineComponent({
33147
33131
  nextChange,
33148
33132
  showTruePageIndex
33149
33133
  } = this;
33150
- const ns2 = useNamespace$1("pagination");
33134
+ const ns2 = useNamespace("pagination");
33151
33135
  return createVNode("ul", {
33152
33136
  "class": [ns2.e("list"), size ? ns2.m(size) : ""]
33153
33137
  }, [createVNode("li", {
@@ -33233,13 +33217,14 @@ var PageNumBtn = defineComponent({
33233
33217
  });
33234
33218
  var PageSize = defineComponent({
33235
33219
  setup() {
33236
- const ns2 = useNamespace$1("pagination");
33220
+ const ns2 = useNamespace("pagination");
33237
33221
  const paginationContext = inject(paginationInjectionKey);
33238
33222
  const iconRotate = ref(0);
33239
33223
  const {
33240
33224
  size,
33241
33225
  currentPageSize,
33242
33226
  pageSizeOptions,
33227
+ pageSizeDirection,
33243
33228
  pageSizeChange,
33244
33229
  t
33245
33230
  } = paginationContext;
@@ -33247,7 +33232,7 @@ var PageSize = defineComponent({
33247
33232
  iconRotate.value = e ? 180 : 0;
33248
33233
  };
33249
33234
  return () => createVNode(Fragment, null, [createVNode(Dropdown$1, {
33250
- "position": ["bottom", "top"],
33235
+ "position": pageSizeDirection.value,
33251
33236
  "class": ns2.e("size-list"),
33252
33237
  "onToggle": onDropdownToggle
33253
33238
  }, {
@@ -33265,9 +33250,9 @@ var PageSize = defineComponent({
33265
33250
  "class": {
33266
33251
  active: item === currentPageSize.value
33267
33252
  },
33268
- "onClick": withModifiers(pageSizeChange.bind(null, {
33269
- value: item
33270
- }), ["stop"]),
33253
+ "onClick": () => {
33254
+ pageSizeChange(item);
33255
+ },
33271
33256
  "key": index2
33272
33257
  }, [item]))])
33273
33258
  }), createVNode("span", {
@@ -33294,6 +33279,7 @@ var Pagination = defineComponent({
33294
33279
  const {
33295
33280
  autoHide,
33296
33281
  pageSizeOptions,
33282
+ pageSizeDirection,
33297
33283
  total,
33298
33284
  canChangePageSize,
33299
33285
  lite,
@@ -33311,7 +33297,7 @@ var Pagination = defineComponent({
33311
33297
  showJumpButton,
33312
33298
  haveConfigMenu
33313
33299
  } = toRefs(props);
33314
- const ns2 = useNamespace$1("pagination");
33300
+ const ns2 = useNamespace("pagination");
33315
33301
  const totalPages = computed(() => Math.ceil(props.total / props.pageSize));
33316
33302
  const litePageOptions = computed(() => liteSelectOptions(totalPages.value));
33317
33303
  const cursor = computed({
@@ -33339,7 +33325,7 @@ var Pagination = defineComponent({
33339
33325
  emit("pageIndexChange", val);
33340
33326
  };
33341
33327
  const pageSizeChange = (val) => {
33342
- currentPageSize.value = val.value;
33328
+ currentPageSize.value = val;
33343
33329
  if (props.autoFixPageIndex) {
33344
33330
  nextTick(() => {
33345
33331
  if (cursor.value > totalPages.value) {
@@ -33347,7 +33333,7 @@ var Pagination = defineComponent({
33347
33333
  }
33348
33334
  });
33349
33335
  }
33350
- emit("pageSizeChange", val.value);
33336
+ emit("pageSizeChange", val);
33351
33337
  };
33352
33338
  const litePageIndexChange = (page) => {
33353
33339
  changeCursorEmit(page.value);
@@ -33356,6 +33342,7 @@ var Pagination = defineComponent({
33356
33342
  size,
33357
33343
  currentPageSize,
33358
33344
  pageSizeOptions,
33345
+ pageSizeDirection,
33359
33346
  pageSizeChange,
33360
33347
  t
33361
33348
  });
@@ -44043,7 +44030,7 @@ const installs = [
44043
44030
  VirtualListInstall
44044
44031
  ];
44045
44032
  var vueDevui = {
44046
- version: "1.5.13",
44033
+ version: "1.5.14",
44047
44034
  install(app) {
44048
44035
  installs.forEach((p) => app.use(p));
44049
44036
  }