vue-devui 1.0.0-rc.12 → 1.0.0-rc.15

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 (130) hide show
  1. package/README.md +161 -149
  2. package/alert/index.umd.js +1 -1
  3. package/auto-complete/index.es.js +243 -83
  4. package/auto-complete/index.umd.js +29 -18
  5. package/auto-complete/style.css +1 -1
  6. package/avatar/index.umd.js +1 -1
  7. package/badge/index.umd.js +1 -1
  8. package/button/index.es.js +23 -43
  9. package/button/index.umd.js +9 -9
  10. package/button/style.css +1 -1
  11. package/card/index.umd.js +1 -1
  12. package/checkbox/index.es.js +94 -77
  13. package/checkbox/index.umd.js +26 -15
  14. package/checkbox/style.css +1 -1
  15. package/collapse/index.es.js +3 -21
  16. package/collapse/index.umd.js +1 -1
  17. package/countdown/index.umd.js +1 -1
  18. package/date-picker-pro/index.es.js +1423 -248
  19. package/date-picker-pro/index.umd.js +25 -14
  20. package/date-picker-pro/style.css +1 -1
  21. package/drawer/index.es.js +4 -17
  22. package/drawer/index.umd.js +1 -1
  23. package/dropdown/index.es.js +12 -23
  24. package/dropdown/index.umd.js +1 -1
  25. package/editable-select/index.es.js +260 -105
  26. package/editable-select/index.umd.js +1 -1
  27. package/editable-select/style.css +1 -1
  28. package/form/index.es.js +85 -71
  29. package/form/index.umd.js +21 -10
  30. package/fullscreen/index.umd.js +1 -1
  31. package/grid/index.es.js +7 -20
  32. package/grid/index.umd.js +1 -1
  33. package/icon/index.es.js +2 -1
  34. package/icon/index.umd.js +1 -1
  35. package/icon/style.css +1 -1
  36. package/image-preview/index.es.js +12 -23
  37. package/image-preview/index.umd.js +1 -1
  38. package/image-preview/style.css +1 -1
  39. package/input/index.es.js +241 -76
  40. package/input/index.umd.js +27 -16
  41. package/input/style.css +1 -1
  42. package/input-number/index.es.js +2 -20
  43. package/input-number/index.umd.js +1 -1
  44. package/layout/index.es.js +1 -1
  45. package/layout/index.umd.js +1 -1
  46. package/loading/index.es.js +15 -38
  47. package/loading/index.umd.js +1 -1
  48. package/message/index.d.ts +7 -0
  49. package/message/index.es.js +534 -0
  50. package/message/index.umd.js +1 -0
  51. package/message/package.json +7 -0
  52. package/message/style.css +1 -0
  53. package/modal/index.es.js +13 -44
  54. package/modal/index.umd.js +1 -1
  55. package/modal/style.css +1 -1
  56. package/notification/index.es.js +45 -54
  57. package/notification/index.umd.js +1 -1
  58. package/notification/style.css +1 -1
  59. package/nuxt/components/Message.js +3 -0
  60. package/nuxt/components/animationInjectionKey.js +3 -0
  61. package/nuxt/components/messageProps.js +3 -0
  62. package/nuxt/components/roundInjectionKey.js +3 -0
  63. package/nuxt/components/skeletonItemProps.js +3 -0
  64. package/overlay/index.es.js +1 -1
  65. package/overlay/index.umd.js +1 -1
  66. package/package.json +2 -2
  67. package/pagination/index.es.js +152 -2
  68. package/pagination/index.umd.js +1 -1
  69. package/panel/index.umd.js +1 -1
  70. package/popover/index.es.js +1 -1
  71. package/popover/index.umd.js +4 -4
  72. package/progress/index.umd.js +3 -3
  73. package/radio/index.es.js +91 -75
  74. package/radio/index.umd.js +28 -17
  75. package/radio/style.css +1 -1
  76. package/rate/index.umd.js +1 -1
  77. package/result/index.es.js +2 -1
  78. package/result/index.umd.js +1 -1
  79. package/result/style.css +1 -1
  80. package/ripple/index.es.js +5 -18
  81. package/ripple/index.umd.js +1 -1
  82. package/search/index.es.js +258 -80
  83. package/search/index.umd.js +27 -16
  84. package/search/style.css +1 -1
  85. package/select/index.es.js +352 -146
  86. package/select/index.umd.js +28 -17
  87. package/select/style.css +1 -1
  88. package/skeleton/index.es.js +87 -261
  89. package/skeleton/index.umd.js +1 -1
  90. package/skeleton/style.css +1 -1
  91. package/slider/index.umd.js +1 -1
  92. package/splitter/index.es.js +175 -32
  93. package/splitter/index.umd.js +13 -13
  94. package/statistic/index.es.js +0 -21
  95. package/statistic/index.umd.js +1 -1
  96. package/status/index.umd.js +1 -1
  97. package/steps/index.es.js +2 -1
  98. package/steps/index.umd.js +1 -1
  99. package/steps/style.css +1 -1
  100. package/style.css +1 -1
  101. package/switch/index.es.js +85 -71
  102. package/switch/index.umd.js +25 -14
  103. package/table/index.es.js +465 -130
  104. package/table/index.umd.js +24 -13
  105. package/table/style.css +1 -1
  106. package/tabs/index.es.js +21 -11
  107. package/tabs/index.umd.js +1 -1
  108. package/tabs/style.css +1 -1
  109. package/tag/index.umd.js +1 -1
  110. package/textarea/index.es.js +88 -72
  111. package/textarea/index.umd.js +26 -15
  112. package/time-picker/index.es.js +289 -116
  113. package/time-picker/index.umd.js +27 -16
  114. package/time-picker/style.css +1 -1
  115. package/time-select/index.es.js +352 -146
  116. package/time-select/index.umd.js +26 -15
  117. package/time-select/style.css +1 -1
  118. package/timeline/index.es.js +2 -1
  119. package/timeline/index.umd.js +1 -1
  120. package/timeline/style.css +1 -1
  121. package/tooltip/index.es.js +1 -1
  122. package/tooltip/index.umd.js +4 -4
  123. package/tree/index.es.js +515 -144
  124. package/tree/index.umd.js +26 -15
  125. package/tree/style.css +1 -1
  126. package/upload/index.es.js +197 -81
  127. package/upload/index.umd.js +1 -1
  128. package/upload/style.css +1 -1
  129. package/vue-devui.es.js +13710 -12898
  130. package/vue-devui.umd.js +30 -19
@@ -1,37 +1,155 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
- import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, unref, nextTick, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, onBeforeMount, vShow, resolveComponent, getCurrentInstance } from "vue";
1
+ import { ref, reactive, defineComponent, watch, provide, toRefs, createVNode, onUnmounted, Transition, mergeProps, nextTick, unref, Comment, Text, Fragment, h, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, onBeforeMount, vShow, resolveComponent, getCurrentInstance } from "vue";
33
2
  import { onClickOutside } from "@vueuse/core";
34
3
  import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
4
+ function deepAssign(...objects) {
5
+ const isObject2 = (obj) => obj && typeof obj === "object";
6
+ return objects.reduce((prev, from) => {
7
+ Object.keys(from).forEach((key) => {
8
+ const pVal = prev[key];
9
+ const oVal = from[key];
10
+ if (Array.isArray(pVal) && Array.isArray(oVal)) {
11
+ prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
12
+ } else if (isObject2(pVal) && isObject2(oVal)) {
13
+ prev[key] = deepAssign(pVal, oVal);
14
+ } else {
15
+ prev[key] = oVal;
16
+ }
17
+ });
18
+ return prev;
19
+ }, {});
20
+ }
21
+ var zhCN = {
22
+ pagination: {
23
+ totalItemText: "\u6240\u6709\u6761\u76EE",
24
+ goToText: "\u8DF3\u81F3"
25
+ },
26
+ accordion: {
27
+ loading: "\u52A0\u8F7D\u4E2D",
28
+ noData: "\u6CA1\u6709\u6570\u636E"
29
+ },
30
+ autoCompleteDropdown: {
31
+ latestInput: "\u6700\u8FD1\u8F93\u5165"
32
+ },
33
+ cascaderList: {
34
+ noData: "\u6CA1\u6709\u6570\u636E"
35
+ },
36
+ colorPicker: {
37
+ foundationPanel: "\u57FA\u7840\u9762\u677F",
38
+ advancedPanel: "\u9AD8\u7EA7\u9762\u677F"
39
+ },
40
+ datePickerPro: {
41
+ ok: "\u786E\u5B9A",
42
+ placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
43
+ month1: "1\u6708",
44
+ month2: "2\u6708",
45
+ month3: "3\u6708",
46
+ month4: "4\u6708",
47
+ month5: "5\u6708",
48
+ month6: "6\u6708",
49
+ month7: "7\u6708",
50
+ month8: "8\u6708",
51
+ month9: "9\u6708",
52
+ month10: "10\u6708",
53
+ month11: "11\u6708",
54
+ month12: "12\u6708",
55
+ year: "\u5E74",
56
+ startPlaceholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
57
+ endPlaceholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
58
+ getWeekDays() {
59
+ return ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
60
+ },
61
+ getTimeArr() {
62
+ return ["\u65F6", "\u5206", "\u79D2"];
63
+ },
64
+ getYearMonthStr(year, month) {
65
+ return `${year}\u5E74${month}\u6708`;
66
+ }
67
+ },
68
+ editableSelect: {
69
+ noRelatedRecords: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
70
+ noData: "\u6CA1\u6709\u6570\u636E"
71
+ },
72
+ input: {
73
+ placeholder: "\u8BF7\u8F93\u5165"
74
+ },
75
+ splitterBar: {
76
+ collapse: "\u6536\u8D77",
77
+ expand: "\u5C55\u5F00"
78
+ },
79
+ stepsGuide: {
80
+ previous: "\u4E0A\u4E00\u6B65",
81
+ continue: "\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",
82
+ ok: "\u6211\u77E5\u9053\u5566"
83
+ },
84
+ table: {
85
+ selectAll: "\u5168\u9009",
86
+ ok: "\u786E\u5B9A"
87
+ },
88
+ timePopup: {
89
+ ok: "\u786E\u5B9A"
90
+ },
91
+ transfer: {
92
+ unit: "\u9879",
93
+ panelUnit: "\u9879",
94
+ headerUnit: "\u9879",
95
+ noData: "\u6682\u65E0\u6570\u636E",
96
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"
97
+ },
98
+ tree: {
99
+ loading: "\u52A0\u8F7D\u4E2D",
100
+ newNode: "\u65B0\u8282\u70B9",
101
+ selectPlaceholder: "\u8BF7\u9009\u62E9"
102
+ },
103
+ upload: {
104
+ placeholder: "\u9009\u62E9\u6587\u4EF6",
105
+ getExistSameNameFilesMsg(sameNames) {
106
+ return `\u60A8\u4E0A\u4F20\u7684 "${sameNames}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
107
+ },
108
+ getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
109
+ return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
110
+ },
111
+ getBeyondMaximalFileSizeMsg(filename, maximalSize) {
112
+ return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
113
+ },
114
+ getNotAllowedFileTypeMsg(filename, scope) {
115
+ return `\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${scope}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
116
+ }
117
+ },
118
+ search: {
119
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57"
120
+ },
121
+ select: {
122
+ placeholder: "\u8BF7\u9009\u62E9",
123
+ noDataText: "\u65E0\u6570\u636E",
124
+ noMatchText: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
125
+ loadingText: "\u52A0\u8F7D\u4E2D..."
126
+ },
127
+ tagInput: {
128
+ maxTagsText: "\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"
129
+ },
130
+ timeSelect: {
131
+ placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
132
+ }
133
+ };
134
+ const lang = ref("zh-CN");
135
+ let langMessages = reactive({
136
+ [lang.value]: zhCN
137
+ });
138
+ const Locale = {
139
+ messages() {
140
+ return langMessages[lang.value];
141
+ },
142
+ lang() {
143
+ return lang.value;
144
+ },
145
+ use(newLang, newMessages2) {
146
+ lang.value = newLang;
147
+ this.add({ [newLang]: newMessages2 });
148
+ },
149
+ add(newMessages2 = {}) {
150
+ langMessages = deepAssign(langMessages, newMessages2);
151
+ }
152
+ };
35
153
  const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
36
154
  function get(object4, path) {
37
155
  const keys = path.split(".");
@@ -45,7 +163,8 @@ function get(object4, path) {
45
163
  function createI18nTranslate(name, app, newPrefix) {
46
164
  const prefix = newPrefix || camelize(name) + ".";
47
165
  return (path) => {
48
- const messages2 = app == null ? void 0 : app.appContext.config.globalProperties.langMessages.value;
166
+ var _a;
167
+ const messages2 = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
49
168
  const message = get(messages2, prefix + path) || get(messages2, path);
50
169
  return message;
51
170
  };
@@ -793,7 +912,7 @@ var lodash = { exports: {} };
793
912
  var objectCtorString = funcToString.call(Object2);
794
913
  var oldDash = root._;
795
914
  var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
796
- var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
915
+ var Buffer = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
797
916
  var defineProperty = function() {
798
917
  try {
799
918
  var func = getNative(Object2, "defineProperty");
@@ -803,11 +922,11 @@ var lodash = { exports: {} };
803
922
  }
804
923
  }();
805
924
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
806
- var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
807
- var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
808
- var metaMap = WeakMap2 && new WeakMap2();
925
+ var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
926
+ var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
927
+ var metaMap = WeakMap && new WeakMap();
809
928
  var realNames = {};
810
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2);
929
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
811
930
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
812
931
  function lodash2(value) {
813
932
  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
@@ -1262,7 +1381,7 @@ var lodash = { exports: {} };
1262
1381
  if (typeof func != "function") {
1263
1382
  throw new TypeError2(FUNC_ERROR_TEXT);
1264
1383
  }
1265
- return setTimeout(function() {
1384
+ return setTimeout2(function() {
1266
1385
  func.apply(undefined$1, args);
1267
1386
  }, wait);
1268
1387
  }
@@ -2055,7 +2174,7 @@ var lodash = { exports: {} };
2055
2174
  }
2056
2175
  function cloneArrayBuffer(arrayBuffer) {
2057
2176
  var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
2058
- new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer));
2177
+ new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
2059
2178
  return result2;
2060
2179
  }
2061
2180
  function cloneDataView(dataView, isDeep) {
@@ -2499,8 +2618,8 @@ var lodash = { exports: {} };
2499
2618
  return func(number4);
2500
2619
  };
2501
2620
  }
2502
- var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) {
2503
- return new Set(values2);
2621
+ var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values2) {
2622
+ return new Set2(values2);
2504
2623
  };
2505
2624
  function createToPairs(keysFunc) {
2506
2625
  return function(object4) {
@@ -2637,7 +2756,7 @@ var lodash = { exports: {} };
2637
2756
  object4 = object4.buffer;
2638
2757
  other = other.buffer;
2639
2758
  case arrayBufferTag:
2640
- if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object4), new Uint8Array2(other))) {
2759
+ if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array(object4), new Uint8Array(other))) {
2641
2760
  return false;
2642
2761
  }
2643
2762
  return true;
@@ -2799,7 +2918,7 @@ var lodash = { exports: {} };
2799
2918
  return result2;
2800
2919
  };
2801
2920
  var getTag = baseGetTag;
2802
- if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
2921
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
2803
2922
  getTag = function(value) {
2804
2923
  var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
2805
2924
  if (ctorString) {
@@ -3071,7 +3190,7 @@ var lodash = { exports: {} };
3071
3190
  return object4[key];
3072
3191
  }
3073
3192
  var setData = shortOut(baseSetData);
3074
- var setTimeout = ctxSetTimeout || function(func, wait) {
3193
+ var setTimeout2 = ctxSetTimeout || function(func, wait) {
3075
3194
  return root.setTimeout(func, wait);
3076
3195
  };
3077
3196
  var setToString = shortOut(baseSetToString);
@@ -3863,7 +3982,7 @@ var lodash = { exports: {} };
3863
3982
  }
3864
3983
  function leadingEdge(time) {
3865
3984
  lastInvokeTime = time;
3866
- timerId = setTimeout(timerExpired, wait);
3985
+ timerId = setTimeout2(timerExpired, wait);
3867
3986
  return leading ? invokeFunc(time) : result2;
3868
3987
  }
3869
3988
  function remainingWait(time) {
@@ -3879,7 +3998,7 @@ var lodash = { exports: {} };
3879
3998
  if (shouldInvoke(time)) {
3880
3999
  return trailingEdge(time);
3881
4000
  }
3882
- timerId = setTimeout(timerExpired, remainingWait(time));
4001
+ timerId = setTimeout2(timerExpired, remainingWait(time));
3883
4002
  }
3884
4003
  function trailingEdge(time) {
3885
4004
  timerId = undefined$1;
@@ -3910,12 +4029,12 @@ var lodash = { exports: {} };
3910
4029
  }
3911
4030
  if (maxing) {
3912
4031
  clearTimeout(timerId);
3913
- timerId = setTimeout(timerExpired, wait);
4032
+ timerId = setTimeout2(timerExpired, wait);
3914
4033
  return invokeFunc(lastCallTime);
3915
4034
  }
3916
4035
  }
3917
4036
  if (timerId === undefined$1) {
3918
- timerId = setTimeout(timerExpired, wait);
4037
+ timerId = setTimeout2(timerExpired, wait);
3919
4038
  }
3920
4039
  return result2;
3921
4040
  }
@@ -5571,7 +5690,10 @@ function useFormValidation(itemContexts) {
5571
5690
  try {
5572
5691
  await field.validate("");
5573
5692
  } catch (err) {
5574
- errors = __spreadValues(__spreadValues({}, errors), err);
5693
+ errors = {
5694
+ ...errors,
5695
+ ...err
5696
+ };
5575
5697
  }
5576
5698
  }
5577
5699
  if (!Object.keys(errors).length) {
@@ -5628,11 +5750,12 @@ defineComponent({
5628
5750
  }, {
5629
5751
  deep: true
5630
5752
  });
5631
- provide(FORM_TOKEN, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
5753
+ provide(FORM_TOKEN, reactive({
5754
+ ...toRefs(props),
5632
5755
  emit: ctx.emit,
5633
5756
  addItemContext,
5634
5757
  removeItemContext
5635
- })));
5758
+ }));
5636
5759
  ctx.expose({
5637
5760
  validate,
5638
5761
  validateFields,
@@ -6509,7 +6632,7 @@ var FormControl = defineComponent({
6509
6632
  }
6510
6633
  });
6511
6634
  function _extends() {
6512
- _extends = Object.assign || function(target) {
6635
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
6513
6636
  for (var i = 1; i < arguments.length; i++) {
6514
6637
  var source = arguments[i];
6515
6638
  for (var key in source) {
@@ -6528,13 +6651,13 @@ function _inheritsLoose(subClass, superClass) {
6528
6651
  _setPrototypeOf(subClass, superClass);
6529
6652
  }
6530
6653
  function _getPrototypeOf(o) {
6531
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
6654
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
6532
6655
  return o2.__proto__ || Object.getPrototypeOf(o2);
6533
6656
  };
6534
6657
  return _getPrototypeOf(o);
6535
6658
  }
6536
6659
  function _setPrototypeOf(o, p) {
6537
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
6660
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
6538
6661
  o2.__proto__ = p2;
6539
6662
  return o2;
6540
6663
  };
@@ -6557,7 +6680,7 @@ function _isNativeReflectConstruct() {
6557
6680
  }
6558
6681
  function _construct(Parent, args, Class) {
6559
6682
  if (_isNativeReflectConstruct()) {
6560
- _construct = Reflect.construct;
6683
+ _construct = Reflect.construct.bind();
6561
6684
  } else {
6562
6685
  _construct = function _construct2(Parent2, args2, Class2) {
6563
6686
  var a = [null];
@@ -6835,9 +6958,45 @@ var whitespace = function whitespace2(rule, value, source, errors, options) {
6835
6958
  errors.push(format(options.messages.whitespace, rule.fullField));
6836
6959
  }
6837
6960
  };
6961
+ var urlReg;
6962
+ var getUrlRegex = function() {
6963
+ if (urlReg) {
6964
+ return urlReg;
6965
+ }
6966
+ var word = "[a-fA-F\\d:]";
6967
+ var b = function b2(options) {
6968
+ return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
6969
+ };
6970
+ var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
6971
+ var v6seg = "[a-fA-F\\d]{1,4}";
6972
+ var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
6973
+ var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
6974
+ var v4exact = new RegExp("^" + v4 + "$");
6975
+ var v6exact = new RegExp("^" + v6 + "$");
6976
+ var ip = function ip2(options) {
6977
+ return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
6978
+ };
6979
+ ip.v4 = function(options) {
6980
+ return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
6981
+ };
6982
+ ip.v6 = function(options) {
6983
+ return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
6984
+ };
6985
+ var protocol = "(?:(?:[a-z]+:)?//)";
6986
+ var auth = "(?:\\S+(?::\\S*)?@)?";
6987
+ var ipv4 = ip.v4().source;
6988
+ var ipv6 = ip.v6().source;
6989
+ var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
6990
+ var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
6991
+ var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
6992
+ var port = "(?::\\d{2,5})?";
6993
+ var path = '(?:[/?#][^\\s"]*)?';
6994
+ var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
6995
+ urlReg = new RegExp("(?:^" + regex + "$)", "i");
6996
+ return urlReg;
6997
+ };
6838
6998
  var pattern$2 = {
6839
6999
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
6840
- url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i"),
6841
7000
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
6842
7001
  };
6843
7002
  var types = {
@@ -6879,7 +7038,7 @@ var types = {
6879
7038
  return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
6880
7039
  },
6881
7040
  url: function url(value) {
6882
- return typeof value === "string" && value.length <= 2048 && !!value.match(pattern$2.url);
7041
+ return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
6883
7042
  },
6884
7043
  hex: function hex(value) {
6885
7044
  return typeof value === "string" && !!value.match(pattern$2.hex);
@@ -7454,7 +7613,17 @@ var Schema = /* @__PURE__ */ function() {
7454
7613
  if (rule.asyncValidator) {
7455
7614
  res = rule.asyncValidator(rule, data.value, cb, data.source, options);
7456
7615
  } else if (rule.validator) {
7457
- res = rule.validator(rule, data.value, cb, data.source, options);
7616
+ try {
7617
+ res = rule.validator(rule, data.value, cb, data.source, options);
7618
+ } catch (error) {
7619
+ console.error == null ? void 0 : console.error(error);
7620
+ if (!options.suppressValidatorError) {
7621
+ setTimeout(function() {
7622
+ throw error;
7623
+ }, 0);
7624
+ }
7625
+ cb(error.message);
7626
+ }
7458
7627
  if (res === true) {
7459
7628
  cb();
7460
7629
  } else if (res === false) {
@@ -7575,10 +7744,7 @@ function useFormItemValidate(props, _rules) {
7575
7744
  } else {
7576
7745
  return rule.trigger === triggerVal;
7577
7746
  }
7578
- }).map((_a) => {
7579
- var _b = _a, { trigger } = _b, rule = __objRest(_b, ["trigger"]);
7580
- return rule;
7581
- });
7747
+ }).map(({ ...rule }) => rule);
7582
7748
  };
7583
7749
  const onValidateSuccess = () => {
7584
7750
  validateState.value = "success";
@@ -7651,15 +7817,12 @@ defineComponent({
7651
7817
  props: formItemProps,
7652
7818
  setup(props, ctx) {
7653
7819
  const formContext = inject(FORM_TOKEN);
7654
- const _a = toRefs(props), {
7820
+ const {
7655
7821
  messageType: itemMessageType,
7656
7822
  popPosition: itemPopPosition,
7657
- showFeedback: itemShowFeedback
7658
- } = _a, otherProps = __objRest(_a, [
7659
- "messageType",
7660
- "popPosition",
7661
- "showFeedback"
7662
- ]);
7823
+ showFeedback: itemShowFeedback,
7824
+ ...otherProps
7825
+ } = toRefs(props);
7663
7826
  const {
7664
7827
  label,
7665
7828
  helpTips,
@@ -7689,7 +7852,8 @@ defineComponent({
7689
7852
  labelAlign: formContext.labelAlign
7690
7853
  }));
7691
7854
  provide(LABEL_DATA, labelData);
7692
- const context = reactive(__spreadProps(__spreadValues({}, otherProps), {
7855
+ const context = reactive({
7856
+ ...otherProps,
7693
7857
  showFeedback,
7694
7858
  messageType,
7695
7859
  popPosition,
@@ -7699,7 +7863,7 @@ defineComponent({
7699
7863
  validate,
7700
7864
  resetField,
7701
7865
  clearValidate
7702
- }));
7866
+ });
7703
7867
  provide(FORM_ITEM_TOKEN, context);
7704
7868
  ctx.expose({
7705
7869
  resetField,
@@ -7724,8 +7888,8 @@ defineComponent({
7724
7888
  "extra-info": extraInfo.value
7725
7889
  }, {
7726
7890
  default: () => {
7727
- var _a2, _b;
7728
- return [(_b = (_a2 = ctx.slots).default) == null ? void 0 : _b.call(_a2)];
7891
+ var _a, _b;
7892
+ return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
7729
7893
  }
7730
7894
  })]);
7731
7895
  }
@@ -7761,6 +7925,14 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
7761
7925
  const selectDisabled = computed(() => (formContext == null ? void 0 : formContext.disabled) || props.disabled);
7762
7926
  const selectSize = computed(() => (formContext == null ? void 0 : formContext.size) || props.size);
7763
7927
  const isObjectOption = ref(false);
7928
+ const originRef = ref();
7929
+ const dropdownWidth = computed(() => {
7930
+ var _a;
7931
+ if (!((_a = originRef == null ? void 0 : originRef.value) == null ? void 0 : _a.clientWidth)) {
7932
+ return "100%";
7933
+ }
7934
+ return originRef.value.clientWidth + "px";
7935
+ });
7764
7936
  const isOpen = ref(false);
7765
7937
  const toggleChange = (bool) => {
7766
7938
  if (selectDisabled.value) {
@@ -7790,10 +7962,11 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
7790
7962
  return props.options.map((item) => {
7791
7963
  let option;
7792
7964
  if (typeof item === "object") {
7793
- option = __spreadValues({
7965
+ option = {
7794
7966
  name: item.name ? item.name : item.value + "",
7795
- _checked: false
7796
- }, item);
7967
+ _checked: false,
7968
+ ...item
7969
+ };
7797
7970
  } else {
7798
7971
  option = {
7799
7972
  name: item + "",
@@ -7842,18 +8015,14 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
7842
8015
  }
7843
8016
  });
7844
8017
  };
7845
- const selectedOptions = ref([]);
7846
8018
  const filterQuery = ref("");
7847
- const inputValue = computed(() => {
7848
- var _a;
8019
+ const selectedOptions = computed(() => {
7849
8020
  if (props.multiple && Array.isArray(props.modelValue)) {
7850
- selectedOptions.value = getInjectOptions(props.modelValue).filter((item) => item ? true : false);
7851
- return selectedOptions.value.map((item) => (item == null ? void 0 : item.name) || (item == null ? void 0 : item.value) || "").join(",");
8021
+ return getInjectOptions(props.modelValue).filter((item) => item ? true : false);
7852
8022
  } else if (!Array.isArray(props.modelValue)) {
7853
- selectedOptions.value = getInjectOptions([props.modelValue]).filter((item) => item ? true : false);
7854
- return ((_a = selectedOptions.value[0]) == null ? void 0 : _a.name) || "";
8023
+ return getInjectOptions([props.modelValue]).filter((item) => item ? true : false);
7855
8024
  }
7856
- return "";
8025
+ return [];
7857
8026
  });
7858
8027
  const onClick = function(e) {
7859
8028
  e.preventDefault();
@@ -7910,8 +8079,8 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
7910
8079
  getMultipleSelected(checkedItems);
7911
8080
  } else {
7912
8081
  ctx.emit("update:modelValue", item.value);
7913
- toggleChange(false);
7914
8082
  getSingleSelected(item);
8083
+ toggleChange(false);
7915
8084
  }
7916
8085
  };
7917
8086
  const handleClose = () => {
@@ -7934,9 +8103,11 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
7934
8103
  };
7935
8104
  const tagDelete = (data) => {
7936
8105
  let { modelValue } = props;
7937
- data._checked = !data._checked;
7938
8106
  const checkedItems = [];
7939
8107
  for (const child of injectOptions.value.values()) {
8108
+ if (data.value === child.value) {
8109
+ child._checked = false;
8110
+ }
7940
8111
  if (child._checked) {
7941
8112
  checkedItems.push(child.value);
7942
8113
  }
@@ -8014,16 +8185,17 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
8014
8185
  selectDisabled,
8015
8186
  selectSize,
8016
8187
  containerRef,
8188
+ originRef,
8017
8189
  dropdownRef,
8018
8190
  isOpen,
8019
8191
  selectCls,
8020
8192
  mergeOptions,
8021
- inputValue,
8022
8193
  selectedOptions,
8023
8194
  filterQuery,
8024
8195
  emptyText,
8025
8196
  isLoading,
8026
8197
  isShowEmptyText,
8198
+ dropdownWidth,
8027
8199
  onClick,
8028
8200
  handleClear,
8029
8201
  valueChange,
@@ -8146,12 +8318,6 @@ const optionProps = {
8146
8318
  default: false
8147
8319
  }
8148
8320
  };
8149
- const selectContentProps = {
8150
- value: {
8151
- type: String,
8152
- default: ""
8153
- }
8154
- };
8155
8321
  const optionGroupProps = {
8156
8322
  label: {
8157
8323
  type: String
@@ -8200,7 +8366,8 @@ const commonProps = {
8200
8366
  default: "md"
8201
8367
  }
8202
8368
  };
8203
- const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
8369
+ const checkboxProps = {
8370
+ ...commonProps,
8204
8371
  checked: {
8205
8372
  type: Boolean,
8206
8373
  default: false
@@ -8230,8 +8397,9 @@ const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
8230
8397
  type: Boolean,
8231
8398
  default: false
8232
8399
  }
8233
- });
8234
- const checkboxGroupProps = __spreadProps(__spreadValues({}, commonProps), {
8400
+ };
8401
+ const checkboxGroupProps = {
8402
+ ...commonProps,
8235
8403
  modelValue: {
8236
8404
  type: Array,
8237
8405
  required: true
@@ -8268,7 +8436,7 @@ const checkboxGroupProps = __spreadProps(__spreadValues({}, commonProps), {
8268
8436
  type: String,
8269
8437
  default: ""
8270
8438
  }
8271
- });
8439
+ };
8272
8440
  const checkboxGroupInjectionKey = Symbol("d-checkbox-group");
8273
8441
  function useCheckbox(props, ctx) {
8274
8442
  const formContext = inject(FORM_TOKEN, void 0);
@@ -8544,9 +8712,10 @@ defineComponent({
8544
8712
  value: opt
8545
8713
  });
8546
8714
  } else if (typeof opt === "object") {
8547
- mergedOpt = Object.assign({}, defaultOpt, __spreadProps(__spreadValues({}, opt), {
8715
+ mergedOpt = Object.assign({}, defaultOpt, {
8716
+ ...opt,
8548
8717
  label: opt.name
8549
- }));
8718
+ });
8550
8719
  }
8551
8720
  return createVNode(Checkbox, mergedOpt, null);
8552
8721
  });
@@ -8853,7 +9022,7 @@ var Tag = defineComponent({
8853
9022
  };
8854
9023
  }
8855
9024
  });
8856
- function useSelectContent(props) {
9025
+ function useSelectContent() {
8857
9026
  const ns2 = useNamespace("select");
8858
9027
  const select2 = inject(SELECT_TOKEN);
8859
9028
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
@@ -8874,8 +9043,16 @@ function useSelectContent(props) {
8874
9043
  return true;
8875
9044
  }
8876
9045
  });
9046
+ const displayInputValue = computed(() => {
9047
+ var _a;
9048
+ if (select2 == null ? void 0 : select2.selectedOptions) {
9049
+ 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) || "";
9050
+ } else {
9051
+ return "";
9052
+ }
9053
+ });
8877
9054
  const mergeClearable = computed(() => {
8878
- return !isSelectDisable.value && !!(select2 == null ? void 0 : select2.allowClear) && props.value.length > 0;
9055
+ return !isSelectDisable.value && !!(select2 == null ? void 0 : select2.allowClear) && (displayInputValue.value ? true : false);
8879
9056
  });
8880
9057
  const isDisabledTooltip = computed(() => {
8881
9058
  return !isSupportTagsTooltip.value || !!(select2 == null ? void 0 : select2.isOpen);
@@ -8893,7 +9070,7 @@ function useSelectContent(props) {
8893
9070
  });
8894
9071
  });
8895
9072
  const tagSize = computed(() => (select2 == null ? void 0 : select2.selectSize) || "sm");
8896
- const placeholder = computed(() => props.value.length > 0 ? "" : (select2 == null ? void 0 : select2.placeholder) || t("placeholder"));
9073
+ const placeholder = computed(() => displayInputValue.value ? "" : (select2 == null ? void 0 : select2.placeholder) || t("placeholder"));
8897
9074
  const isMultiple = computed(() => !!(select2 == null ? void 0 : select2.multiple));
8898
9075
  const handleClear = (e) => {
8899
9076
  e.preventDefault();
@@ -8931,6 +9108,7 @@ function useSelectContent(props) {
8931
9108
  tagSize,
8932
9109
  placeholder,
8933
9110
  isMultiple,
9111
+ displayInputValue,
8934
9112
  handleClear,
8935
9113
  tagDelete,
8936
9114
  onFocus,
@@ -8940,8 +9118,7 @@ function useSelectContent(props) {
8940
9118
  }
8941
9119
  var SelectContent = defineComponent({
8942
9120
  name: "SelectContent",
8943
- props: selectContentProps,
8944
- setup(props) {
9121
+ setup() {
8945
9122
  const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
8946
9123
  const ns2 = useNamespace("select");
8947
9124
  const clearCls = computed(() => ({
@@ -8966,12 +9143,13 @@ var SelectContent = defineComponent({
8966
9143
  tagSize,
8967
9144
  placeholder,
8968
9145
  isMultiple,
9146
+ displayInputValue,
8969
9147
  handleClear,
8970
9148
  tagDelete,
8971
9149
  onFocus,
8972
9150
  onBlur,
8973
9151
  queryFilter
8974
- } = useSelectContent(props);
9152
+ } = useSelectContent();
8975
9153
  return () => {
8976
9154
  return createVNode("div", {
8977
9155
  "class": selectionCls.value
@@ -9002,7 +9180,9 @@ var SelectContent = defineComponent({
9002
9180
  "trigger": "hover",
9003
9181
  "disabled": isDisabledTooltip.value
9004
9182
  }, {
9005
- default: () => createVNode(Tag, null, {
9183
+ default: () => createVNode(Tag, {
9184
+ "size": tagSize.value
9185
+ }, {
9006
9186
  default: () => [`+${selectedData.value.length - 1}`]
9007
9187
  }),
9008
9188
  content: () => createVNode("div", null, [selectedData.value.map((item) => createVNode(Tag, {
@@ -9032,7 +9212,7 @@ var SelectContent = defineComponent({
9032
9212
  "onBlur": onBlur
9033
9213
  }, null)])]) : createVNode("input", {
9034
9214
  "ref": "input",
9035
- "value": props.value,
9215
+ "value": displayInputValue.value,
9036
9216
  "type": "text",
9037
9217
  "class": inputCls.value,
9038
9218
  "placeholder": placeholder.value,
@@ -9091,16 +9271,17 @@ var Select = defineComponent({
9091
9271
  selectDisabled,
9092
9272
  selectSize,
9093
9273
  containerRef,
9274
+ originRef,
9094
9275
  dropdownRef,
9095
9276
  isOpen,
9096
9277
  selectCls,
9097
9278
  mergeOptions,
9098
- inputValue,
9099
9279
  selectedOptions,
9100
9280
  filterQuery,
9101
9281
  emptyText,
9102
9282
  isLoading,
9103
9283
  isShowEmptyText,
9284
+ dropdownWidth,
9104
9285
  onClick,
9105
9286
  valueChange,
9106
9287
  handleClear,
@@ -9126,7 +9307,13 @@ var Select = defineComponent({
9126
9307
  blur,
9127
9308
  toggleChange
9128
9309
  });
9129
- provide(SELECT_TOKEN, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
9310
+ const isRender = ref(false);
9311
+ const position = ref(["bottom-start", "top-start"]);
9312
+ onMounted(() => {
9313
+ isRender.value = true;
9314
+ });
9315
+ provide(SELECT_TOKEN, reactive({
9316
+ ...toRefs(props),
9130
9317
  selectDisabled,
9131
9318
  selectSize,
9132
9319
  isOpen,
@@ -9139,49 +9326,66 @@ var Select = defineComponent({
9139
9326
  onFocus,
9140
9327
  onBlur,
9141
9328
  debounceQueryFilter
9142
- })));
9329
+ }));
9143
9330
  return () => {
9144
9331
  return createVNode("div", {
9145
9332
  "class": selectCls.value,
9146
9333
  "ref": containerRef,
9147
9334
  "onClick": onClick
9335
+ }, [createVNode("div", {
9336
+ "ref": originRef
9148
9337
  }, [createVNode(SelectContent, {
9149
- "ref": selectRef,
9150
- "value": inputValue.value
9151
- }, null), createVNode(Transition, {
9152
- "name": "fade",
9153
- "ref": dropdownRef
9338
+ "ref": selectRef
9339
+ }, null)]), createVNode(Transition, {
9340
+ "name": "fade"
9154
9341
  }, {
9155
- default: () => {
9156
- var _a, _b, _c, _d;
9157
- return [withDirectives(createVNode("div", {
9158
- "class": dropdownCls
9159
- }, [withDirectives(createVNode("ul", {
9160
- "class": listCls
9161
- }, [isShowCreateOption.value && createVNode(Option, {
9162
- "value": filterQuery.value,
9163
- "name": filterQuery.value,
9164
- "create": true
9165
- }, {
9166
- default: () => [props.multiple ? createVNode(Checkbox, {
9167
- "modelValue": false,
9168
- "label": filterQuery.value
9169
- }, null) : filterQuery.value]
9170
- }), ((_a = ctx.slots) == null ? void 0 : _a.default) && ctx.slots.default(), !((_b = ctx.slots) == null ? void 0 : _b.default) && mergeOptions.value.length >= 1 && mergeOptions.value.map((item, i) => createVNode(Option, {
9171
- "key": i,
9172
- "value": item.value,
9173
- "name": item.name,
9174
- "disabled": isDisabled(item)
9175
- }, {
9176
- default: () => [props.multiple ? createVNode(Checkbox, {
9177
- "modelValue": item._checked,
9178
- "label": item.name,
9342
+ default: () => [createVNode(FlexibleOverlay, {
9343
+ "modelValue": isRender.value,
9344
+ "onUpdate:modelValue": ($event) => isRender.value = $event,
9345
+ "ref": dropdownRef,
9346
+ "origin": originRef.value,
9347
+ "align": "start",
9348
+ "position": position.value,
9349
+ "style": {
9350
+ visibility: isOpen.value ? "visible" : "hidden",
9351
+ "z-index": isOpen.value ? 1e3 : -1
9352
+ }
9353
+ }, {
9354
+ default: () => {
9355
+ var _a, _b, _c, _d;
9356
+ return [createVNode("div", {
9357
+ "class": dropdownCls,
9358
+ "style": {
9359
+ width: `${dropdownWidth.value}`,
9360
+ visibility: isOpen.value ? "visible" : "hidden"
9361
+ }
9362
+ }, [withDirectives(createVNode("ul", {
9363
+ "class": listCls
9364
+ }, [isShowCreateOption.value && createVNode(Option, {
9365
+ "value": filterQuery.value,
9366
+ "name": filterQuery.value,
9367
+ "create": true
9368
+ }, {
9369
+ default: () => [props.multiple ? createVNode(Checkbox, {
9370
+ "modelValue": false,
9371
+ "label": filterQuery.value
9372
+ }, null) : filterQuery.value]
9373
+ }), ((_a = ctx.slots) == null ? void 0 : _a.default) && ctx.slots.default(), !((_b = ctx.slots) == null ? void 0 : _b.default) && mergeOptions.value.length >= 1 && mergeOptions.value.map((item) => createVNode(Option, {
9374
+ "key": item.value,
9375
+ "value": item.value,
9376
+ "name": item.name,
9179
9377
  "disabled": isDisabled(item)
9180
- }, null) : item.name || item.value]
9181
- }))]), [[vShow, !isLoading.value]]), isShowEmptyText.value && createVNode("div", null, [((_c = ctx.slots) == null ? void 0 : _c.empty) && ctx.slots.empty(), !((_d = ctx.slots) == null ? void 0 : _d.empty) && createVNode("p", {
9182
- "class": dropdownEmptyCls
9183
- }, [emptyText.value])])]), [[vShow, isOpen.value]])];
9184
- }
9378
+ }, {
9379
+ default: () => [props.multiple ? createVNode(Checkbox, {
9380
+ "modelValue": item._checked,
9381
+ "label": item.name,
9382
+ "disabled": isDisabled(item)
9383
+ }, null) : item.name || item.value]
9384
+ }))]), [[vShow, !isLoading.value]]), isShowEmptyText.value && createVNode("div", null, [((_c = ctx.slots) == null ? void 0 : _c.empty) && ctx.slots.empty(), !((_d = ctx.slots) == null ? void 0 : _d.empty) && createVNode("p", {
9385
+ "class": dropdownEmptyCls
9386
+ }, [emptyText.value])])])];
9387
+ }
9388
+ })]
9185
9389
  })]);
9186
9390
  };
9187
9391
  }
@@ -9191,7 +9395,9 @@ defineComponent({
9191
9395
  props: optionGroupProps,
9192
9396
  setup(props, ctx) {
9193
9397
  const ns2 = useNamespace("select");
9194
- provide(OPTION_GROUP_TOKEN, reactive(__spreadValues({}, toRefs(props))));
9398
+ provide(OPTION_GROUP_TOKEN, reactive({
9399
+ ...toRefs(props)
9400
+ }));
9195
9401
  return () => {
9196
9402
  var _a;
9197
9403
  return createVNode("ul", {