vue-devui 1.0.0-rc.13 → 1.0.0-rc.16
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.
- package/README.md +161 -156
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +241 -82
- package/auto-complete/index.umd.js +28 -17
- package/auto-complete/style.css +1 -1
- package/avatar/index.umd.js +1 -1
- package/badge/index.umd.js +1 -1
- package/button/index.es.js +21 -42
- package/button/index.umd.js +9 -9
- package/card/index.umd.js +1 -1
- package/checkbox/index.es.js +94 -77
- package/checkbox/index.umd.js +26 -15
- package/collapse/index.es.js +3 -21
- package/collapse/index.umd.js +1 -1
- package/countdown/index.umd.js +1 -1
- package/date-picker-pro/index.es.js +1384 -220
- package/date-picker-pro/index.umd.js +25 -14
- package/date-picker-pro/style.css +1 -1
- package/drawer/index.es.js +4 -17
- package/drawer/index.umd.js +1 -1
- package/dropdown/index.es.js +4 -22
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.es.js +254 -99
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +85 -71
- package/form/index.umd.js +22 -11
- package/fullscreen/index.umd.js +1 -1
- package/grid/index.es.js +7 -20
- package/grid/index.umd.js +1 -1
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +12 -23
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +239 -75
- package/input/index.umd.js +27 -16
- package/input-number/index.es.js +1 -16
- package/input-number/index.umd.js +1 -1
- package/layout/index.es.js +1 -1
- package/layout/index.umd.js +1 -1
- package/loading/index.es.js +15 -38
- package/loading/index.umd.js +1 -1
- package/message/index.d.ts +7 -0
- package/message/index.es.js +534 -0
- package/message/index.umd.js +1 -0
- package/message/package.json +7 -0
- package/message/style.css +1 -0
- package/modal/index.es.js +11 -43
- package/modal/index.umd.js +1 -1
- package/notification/index.es.js +16 -22
- package/notification/index.umd.js +1 -1
- package/nuxt/components/Message.js +3 -0
- package/nuxt/components/animationInjectionKey.js +3 -0
- package/nuxt/components/messageProps.js +3 -0
- package/nuxt/components/roundInjectionKey.js +3 -0
- package/nuxt/components/skeletonItemProps.js +3 -0
- package/overlay/index.es.js +1 -1
- package/overlay/index.umd.js +1 -1
- package/package.json +4 -2
- package/pagination/index.es.js +152 -2
- package/pagination/index.umd.js +1 -1
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +1 -1
- package/popover/index.umd.js +4 -4
- package/progress/index.umd.js +3 -3
- package/radio/index.es.js +91 -75
- package/radio/index.umd.js +28 -17
- package/radio/style.css +1 -1
- package/rate/index.umd.js +1 -1
- package/result/index.umd.js +1 -1
- package/ripple/index.es.js +5 -18
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +255 -78
- package/search/index.umd.js +27 -16
- package/search/style.css +1 -1
- package/select/index.es.js +283 -114
- package/select/index.umd.js +27 -16
- package/select/style.css +1 -1
- package/skeleton/index.es.js +87 -261
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +175 -32
- package/splitter/index.umd.js +13 -13
- package/statistic/index.es.js +0 -21
- package/statistic/index.umd.js +1 -1
- package/status/index.umd.js +1 -1
- package/steps/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +85 -71
- package/switch/index.umd.js +25 -14
- package/table/index.es.js +309 -96
- package/table/index.umd.js +25 -14
- package/table/style.css +1 -1
- package/tabs/index.umd.js +1 -1
- package/tag/index.umd.js +1 -1
- package/textarea/index.es.js +88 -72
- package/textarea/index.umd.js +26 -15
- package/time-picker/index.es.js +248 -89
- package/time-picker/index.umd.js +25 -14
- package/time-select/index.es.js +283 -114
- package/time-select/index.umd.js +26 -15
- package/time-select/style.css +1 -1
- package/timeline/index.umd.js +1 -1
- package/tooltip/index.es.js +1 -1
- package/tooltip/index.umd.js +4 -4
- package/tree/index.es.js +422 -110
- package/tree/index.umd.js +25 -14
- package/tree/style.css +1 -1
- package/upload/index.es.js +168 -49
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +13601 -13023
- package/vue-devui.umd.js +32 -21
- package/LICENSE +0 -23
package/time-select/index.es.js
CHANGED
|
@@ -1,37 +1,155 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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
|
|
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 =
|
|
807
|
-
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"),
|
|
808
|
-
var metaMap =
|
|
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(
|
|
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
|
|
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
|
|
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 = !(
|
|
2503
|
-
return new
|
|
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
|
|
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 ||
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
4032
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3914
4033
|
return invokeFunc(lastCallTime);
|
|
3915
4034
|
}
|
|
3916
4035
|
}
|
|
3917
4036
|
if (timerId === undefined$1) {
|
|
3918
|
-
timerId =
|
|
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 =
|
|
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(
|
|
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
|
|
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
|
|
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(
|
|
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
|
-
|
|
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((
|
|
7579
|
-
var rule = __objRest(_a, []);
|
|
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
|
|
7820
|
+
const {
|
|
7655
7821
|
messageType: itemMessageType,
|
|
7656
7822
|
popPosition: itemPopPosition,
|
|
7657
|
-
showFeedback: itemShowFeedback
|
|
7658
|
-
|
|
7659
|
-
|
|
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(
|
|
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
|
|
7728
|
-
return [(_b = (
|
|
7891
|
+
var _a, _b;
|
|
7892
|
+
return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
|
|
7729
7893
|
}
|
|
7730
7894
|
})]);
|
|
7731
7895
|
}
|
|
@@ -7798,10 +7962,11 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
|
|
|
7798
7962
|
return props.options.map((item) => {
|
|
7799
7963
|
let option;
|
|
7800
7964
|
if (typeof item === "object") {
|
|
7801
|
-
option =
|
|
7965
|
+
option = {
|
|
7802
7966
|
name: item.name ? item.name : item.value + "",
|
|
7803
|
-
_checked: false
|
|
7804
|
-
|
|
7967
|
+
_checked: false,
|
|
7968
|
+
...item
|
|
7969
|
+
};
|
|
7805
7970
|
} else {
|
|
7806
7971
|
option = {
|
|
7807
7972
|
name: item + "",
|
|
@@ -7850,18 +8015,14 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
|
|
|
7850
8015
|
}
|
|
7851
8016
|
});
|
|
7852
8017
|
};
|
|
7853
|
-
const selectedOptions = ref([]);
|
|
7854
8018
|
const filterQuery = ref("");
|
|
7855
|
-
const
|
|
7856
|
-
var _a;
|
|
8019
|
+
const selectedOptions = computed(() => {
|
|
7857
8020
|
if (props.multiple && Array.isArray(props.modelValue)) {
|
|
7858
|
-
|
|
7859
|
-
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);
|
|
7860
8022
|
} else if (!Array.isArray(props.modelValue)) {
|
|
7861
|
-
|
|
7862
|
-
return ((_a = selectedOptions.value[0]) == null ? void 0 : _a.name) || "";
|
|
8023
|
+
return getInjectOptions([props.modelValue]).filter((item) => item ? true : false);
|
|
7863
8024
|
}
|
|
7864
|
-
return
|
|
8025
|
+
return [];
|
|
7865
8026
|
});
|
|
7866
8027
|
const onClick = function(e) {
|
|
7867
8028
|
e.preventDefault();
|
|
@@ -7942,9 +8103,11 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
|
|
|
7942
8103
|
};
|
|
7943
8104
|
const tagDelete = (data) => {
|
|
7944
8105
|
let { modelValue } = props;
|
|
7945
|
-
data._checked = !data._checked;
|
|
7946
8106
|
const checkedItems = [];
|
|
7947
8107
|
for (const child of injectOptions.value.values()) {
|
|
8108
|
+
if (data.value === child.value) {
|
|
8109
|
+
child._checked = false;
|
|
8110
|
+
}
|
|
7948
8111
|
if (child._checked) {
|
|
7949
8112
|
checkedItems.push(child.value);
|
|
7950
8113
|
}
|
|
@@ -8027,7 +8190,6 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
|
|
|
8027
8190
|
isOpen,
|
|
8028
8191
|
selectCls,
|
|
8029
8192
|
mergeOptions,
|
|
8030
|
-
inputValue,
|
|
8031
8193
|
selectedOptions,
|
|
8032
8194
|
filterQuery,
|
|
8033
8195
|
emptyText,
|
|
@@ -8156,12 +8318,6 @@ const optionProps = {
|
|
|
8156
8318
|
default: false
|
|
8157
8319
|
}
|
|
8158
8320
|
};
|
|
8159
|
-
const selectContentProps = {
|
|
8160
|
-
value: {
|
|
8161
|
-
type: String,
|
|
8162
|
-
default: ""
|
|
8163
|
-
}
|
|
8164
|
-
};
|
|
8165
8321
|
const optionGroupProps = {
|
|
8166
8322
|
label: {
|
|
8167
8323
|
type: String
|
|
@@ -8210,7 +8366,8 @@ const commonProps = {
|
|
|
8210
8366
|
default: "md"
|
|
8211
8367
|
}
|
|
8212
8368
|
};
|
|
8213
|
-
const checkboxProps =
|
|
8369
|
+
const checkboxProps = {
|
|
8370
|
+
...commonProps,
|
|
8214
8371
|
checked: {
|
|
8215
8372
|
type: Boolean,
|
|
8216
8373
|
default: false
|
|
@@ -8240,8 +8397,9 @@ const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
|
8240
8397
|
type: Boolean,
|
|
8241
8398
|
default: false
|
|
8242
8399
|
}
|
|
8243
|
-
}
|
|
8244
|
-
const checkboxGroupProps =
|
|
8400
|
+
};
|
|
8401
|
+
const checkboxGroupProps = {
|
|
8402
|
+
...commonProps,
|
|
8245
8403
|
modelValue: {
|
|
8246
8404
|
type: Array,
|
|
8247
8405
|
required: true
|
|
@@ -8278,7 +8436,7 @@ const checkboxGroupProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
|
8278
8436
|
type: String,
|
|
8279
8437
|
default: ""
|
|
8280
8438
|
}
|
|
8281
|
-
}
|
|
8439
|
+
};
|
|
8282
8440
|
const checkboxGroupInjectionKey = Symbol("d-checkbox-group");
|
|
8283
8441
|
function useCheckbox(props, ctx) {
|
|
8284
8442
|
const formContext = inject(FORM_TOKEN, void 0);
|
|
@@ -8554,9 +8712,10 @@ defineComponent({
|
|
|
8554
8712
|
value: opt
|
|
8555
8713
|
});
|
|
8556
8714
|
} else if (typeof opt === "object") {
|
|
8557
|
-
mergedOpt = Object.assign({}, defaultOpt,
|
|
8715
|
+
mergedOpt = Object.assign({}, defaultOpt, {
|
|
8716
|
+
...opt,
|
|
8558
8717
|
label: opt.name
|
|
8559
|
-
})
|
|
8718
|
+
});
|
|
8560
8719
|
}
|
|
8561
8720
|
return createVNode(Checkbox, mergedOpt, null);
|
|
8562
8721
|
});
|
|
@@ -8863,7 +9022,7 @@ var Tag = defineComponent({
|
|
|
8863
9022
|
};
|
|
8864
9023
|
}
|
|
8865
9024
|
});
|
|
8866
|
-
function useSelectContent(
|
|
9025
|
+
function useSelectContent() {
|
|
8867
9026
|
const ns2 = useNamespace("select");
|
|
8868
9027
|
const select2 = inject(SELECT_TOKEN);
|
|
8869
9028
|
const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
|
|
@@ -8884,8 +9043,16 @@ function useSelectContent(props) {
|
|
|
8884
9043
|
return true;
|
|
8885
9044
|
}
|
|
8886
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
|
+
});
|
|
8887
9054
|
const mergeClearable = computed(() => {
|
|
8888
|
-
return !isSelectDisable.value && !!(select2 == null ? void 0 : select2.allowClear) &&
|
|
9055
|
+
return !isSelectDisable.value && !!(select2 == null ? void 0 : select2.allowClear) && (displayInputValue.value ? true : false);
|
|
8889
9056
|
});
|
|
8890
9057
|
const isDisabledTooltip = computed(() => {
|
|
8891
9058
|
return !isSupportTagsTooltip.value || !!(select2 == null ? void 0 : select2.isOpen);
|
|
@@ -8903,7 +9070,7 @@ function useSelectContent(props) {
|
|
|
8903
9070
|
});
|
|
8904
9071
|
});
|
|
8905
9072
|
const tagSize = computed(() => (select2 == null ? void 0 : select2.selectSize) || "sm");
|
|
8906
|
-
const placeholder = computed(() =>
|
|
9073
|
+
const placeholder = computed(() => displayInputValue.value ? "" : (select2 == null ? void 0 : select2.placeholder) || t("placeholder"));
|
|
8907
9074
|
const isMultiple = computed(() => !!(select2 == null ? void 0 : select2.multiple));
|
|
8908
9075
|
const handleClear = (e) => {
|
|
8909
9076
|
e.preventDefault();
|
|
@@ -8941,6 +9108,7 @@ function useSelectContent(props) {
|
|
|
8941
9108
|
tagSize,
|
|
8942
9109
|
placeholder,
|
|
8943
9110
|
isMultiple,
|
|
9111
|
+
displayInputValue,
|
|
8944
9112
|
handleClear,
|
|
8945
9113
|
tagDelete,
|
|
8946
9114
|
onFocus,
|
|
@@ -8950,8 +9118,7 @@ function useSelectContent(props) {
|
|
|
8950
9118
|
}
|
|
8951
9119
|
var SelectContent = defineComponent({
|
|
8952
9120
|
name: "SelectContent",
|
|
8953
|
-
|
|
8954
|
-
setup(props) {
|
|
9121
|
+
setup() {
|
|
8955
9122
|
const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
|
|
8956
9123
|
const ns2 = useNamespace("select");
|
|
8957
9124
|
const clearCls = computed(() => ({
|
|
@@ -8976,12 +9143,13 @@ var SelectContent = defineComponent({
|
|
|
8976
9143
|
tagSize,
|
|
8977
9144
|
placeholder,
|
|
8978
9145
|
isMultiple,
|
|
9146
|
+
displayInputValue,
|
|
8979
9147
|
handleClear,
|
|
8980
9148
|
tagDelete,
|
|
8981
9149
|
onFocus,
|
|
8982
9150
|
onBlur,
|
|
8983
9151
|
queryFilter
|
|
8984
|
-
} = useSelectContent(
|
|
9152
|
+
} = useSelectContent();
|
|
8985
9153
|
return () => {
|
|
8986
9154
|
return createVNode("div", {
|
|
8987
9155
|
"class": selectionCls.value
|
|
@@ -9044,7 +9212,7 @@ var SelectContent = defineComponent({
|
|
|
9044
9212
|
"onBlur": onBlur
|
|
9045
9213
|
}, null)])]) : createVNode("input", {
|
|
9046
9214
|
"ref": "input",
|
|
9047
|
-
"value":
|
|
9215
|
+
"value": displayInputValue.value,
|
|
9048
9216
|
"type": "text",
|
|
9049
9217
|
"class": inputCls.value,
|
|
9050
9218
|
"placeholder": placeholder.value,
|
|
@@ -9108,7 +9276,6 @@ var Select = defineComponent({
|
|
|
9108
9276
|
isOpen,
|
|
9109
9277
|
selectCls,
|
|
9110
9278
|
mergeOptions,
|
|
9111
|
-
inputValue,
|
|
9112
9279
|
selectedOptions,
|
|
9113
9280
|
filterQuery,
|
|
9114
9281
|
emptyText,
|
|
@@ -9145,7 +9312,8 @@ var Select = defineComponent({
|
|
|
9145
9312
|
onMounted(() => {
|
|
9146
9313
|
isRender.value = true;
|
|
9147
9314
|
});
|
|
9148
|
-
provide(SELECT_TOKEN, reactive(
|
|
9315
|
+
provide(SELECT_TOKEN, reactive({
|
|
9316
|
+
...toRefs(props),
|
|
9149
9317
|
selectDisabled,
|
|
9150
9318
|
selectSize,
|
|
9151
9319
|
isOpen,
|
|
@@ -9158,7 +9326,7 @@ var Select = defineComponent({
|
|
|
9158
9326
|
onFocus,
|
|
9159
9327
|
onBlur,
|
|
9160
9328
|
debounceQueryFilter
|
|
9161
|
-
}))
|
|
9329
|
+
}));
|
|
9162
9330
|
return () => {
|
|
9163
9331
|
return createVNode("div", {
|
|
9164
9332
|
"class": selectCls.value,
|
|
@@ -9167,8 +9335,7 @@ var Select = defineComponent({
|
|
|
9167
9335
|
}, [createVNode("div", {
|
|
9168
9336
|
"ref": originRef
|
|
9169
9337
|
}, [createVNode(SelectContent, {
|
|
9170
|
-
"ref": selectRef
|
|
9171
|
-
"value": inputValue.value
|
|
9338
|
+
"ref": selectRef
|
|
9172
9339
|
}, null)]), createVNode(Transition, {
|
|
9173
9340
|
"name": "fade"
|
|
9174
9341
|
}, {
|
|
@@ -9203,8 +9370,8 @@ var Select = defineComponent({
|
|
|
9203
9370
|
"modelValue": false,
|
|
9204
9371
|
"label": filterQuery.value
|
|
9205
9372
|
}, null) : filterQuery.value]
|
|
9206
|
-
}), ((_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
|
|
9207
|
-
"key":
|
|
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,
|
|
9208
9375
|
"value": item.value,
|
|
9209
9376
|
"name": item.name,
|
|
9210
9377
|
"disabled": isDisabled(item)
|
|
@@ -9228,7 +9395,9 @@ defineComponent({
|
|
|
9228
9395
|
props: optionGroupProps,
|
|
9229
9396
|
setup(props, ctx) {
|
|
9230
9397
|
const ns2 = useNamespace("select");
|
|
9231
|
-
provide(OPTION_GROUP_TOKEN, reactive(
|
|
9398
|
+
provide(OPTION_GROUP_TOKEN, reactive({
|
|
9399
|
+
...toRefs(props)
|
|
9400
|
+
}));
|
|
9232
9401
|
return () => {
|
|
9233
9402
|
var _a;
|
|
9234
9403
|
return createVNode("ul", {
|