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/select/index.es.js
CHANGED
|
@@ -1,35 +1,4 @@
|
|
|
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 { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, 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";
|
|
35
4
|
function className(classStr, classOpt) {
|
|
@@ -775,7 +744,7 @@ var lodash = { exports: {} };
|
|
|
775
744
|
var objectCtorString = funcToString.call(Object2);
|
|
776
745
|
var oldDash = root._;
|
|
777
746
|
var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
778
|
-
var
|
|
747
|
+
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;
|
|
779
748
|
var defineProperty = function() {
|
|
780
749
|
try {
|
|
781
750
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -785,11 +754,11 @@ var lodash = { exports: {} };
|
|
|
785
754
|
}
|
|
786
755
|
}();
|
|
787
756
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
788
|
-
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer =
|
|
789
|
-
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"),
|
|
790
|
-
var metaMap =
|
|
757
|
+
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;
|
|
758
|
+
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");
|
|
759
|
+
var metaMap = WeakMap && new WeakMap();
|
|
791
760
|
var realNames = {};
|
|
792
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(
|
|
761
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
|
|
793
762
|
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
794
763
|
function lodash2(value) {
|
|
795
764
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
@@ -1244,7 +1213,7 @@ var lodash = { exports: {} };
|
|
|
1244
1213
|
if (typeof func != "function") {
|
|
1245
1214
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
1246
1215
|
}
|
|
1247
|
-
return
|
|
1216
|
+
return setTimeout2(function() {
|
|
1248
1217
|
func.apply(undefined$1, args);
|
|
1249
1218
|
}, wait);
|
|
1250
1219
|
}
|
|
@@ -2037,7 +2006,7 @@ var lodash = { exports: {} };
|
|
|
2037
2006
|
}
|
|
2038
2007
|
function cloneArrayBuffer(arrayBuffer) {
|
|
2039
2008
|
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
2040
|
-
new
|
|
2009
|
+
new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
|
|
2041
2010
|
return result2;
|
|
2042
2011
|
}
|
|
2043
2012
|
function cloneDataView(dataView, isDeep) {
|
|
@@ -2481,8 +2450,8 @@ var lodash = { exports: {} };
|
|
|
2481
2450
|
return func(number4);
|
|
2482
2451
|
};
|
|
2483
2452
|
}
|
|
2484
|
-
var createSet = !(
|
|
2485
|
-
return new
|
|
2453
|
+
var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values2) {
|
|
2454
|
+
return new Set2(values2);
|
|
2486
2455
|
};
|
|
2487
2456
|
function createToPairs(keysFunc) {
|
|
2488
2457
|
return function(object4) {
|
|
@@ -2619,7 +2588,7 @@ var lodash = { exports: {} };
|
|
|
2619
2588
|
object4 = object4.buffer;
|
|
2620
2589
|
other = other.buffer;
|
|
2621
2590
|
case arrayBufferTag:
|
|
2622
|
-
if (object4.byteLength != other.byteLength || !equalFunc(new
|
|
2591
|
+
if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array(object4), new Uint8Array(other))) {
|
|
2623
2592
|
return false;
|
|
2624
2593
|
}
|
|
2625
2594
|
return true;
|
|
@@ -2781,7 +2750,7 @@ var lodash = { exports: {} };
|
|
|
2781
2750
|
return result2;
|
|
2782
2751
|
};
|
|
2783
2752
|
var getTag = baseGetTag;
|
|
2784
|
-
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag ||
|
|
2753
|
+
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) {
|
|
2785
2754
|
getTag = function(value) {
|
|
2786
2755
|
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
|
|
2787
2756
|
if (ctorString) {
|
|
@@ -3053,7 +3022,7 @@ var lodash = { exports: {} };
|
|
|
3053
3022
|
return object4[key];
|
|
3054
3023
|
}
|
|
3055
3024
|
var setData = shortOut(baseSetData);
|
|
3056
|
-
var
|
|
3025
|
+
var setTimeout2 = ctxSetTimeout || function(func, wait) {
|
|
3057
3026
|
return root.setTimeout(func, wait);
|
|
3058
3027
|
};
|
|
3059
3028
|
var setToString = shortOut(baseSetToString);
|
|
@@ -3845,7 +3814,7 @@ var lodash = { exports: {} };
|
|
|
3845
3814
|
}
|
|
3846
3815
|
function leadingEdge(time) {
|
|
3847
3816
|
lastInvokeTime = time;
|
|
3848
|
-
timerId =
|
|
3817
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3849
3818
|
return leading ? invokeFunc(time) : result2;
|
|
3850
3819
|
}
|
|
3851
3820
|
function remainingWait(time) {
|
|
@@ -3861,7 +3830,7 @@ var lodash = { exports: {} };
|
|
|
3861
3830
|
if (shouldInvoke(time)) {
|
|
3862
3831
|
return trailingEdge(time);
|
|
3863
3832
|
}
|
|
3864
|
-
timerId =
|
|
3833
|
+
timerId = setTimeout2(timerExpired, remainingWait(time));
|
|
3865
3834
|
}
|
|
3866
3835
|
function trailingEdge(time) {
|
|
3867
3836
|
timerId = undefined$1;
|
|
@@ -3892,12 +3861,12 @@ var lodash = { exports: {} };
|
|
|
3892
3861
|
}
|
|
3893
3862
|
if (maxing) {
|
|
3894
3863
|
clearTimeout(timerId);
|
|
3895
|
-
timerId =
|
|
3864
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3896
3865
|
return invokeFunc(lastCallTime);
|
|
3897
3866
|
}
|
|
3898
3867
|
}
|
|
3899
3868
|
if (timerId === undefined$1) {
|
|
3900
|
-
timerId =
|
|
3869
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3901
3870
|
}
|
|
3902
3871
|
return result2;
|
|
3903
3872
|
}
|
|
@@ -5553,7 +5522,10 @@ function useFormValidation(itemContexts) {
|
|
|
5553
5522
|
try {
|
|
5554
5523
|
await field.validate("");
|
|
5555
5524
|
} catch (err) {
|
|
5556
|
-
errors =
|
|
5525
|
+
errors = {
|
|
5526
|
+
...errors,
|
|
5527
|
+
...err
|
|
5528
|
+
};
|
|
5557
5529
|
}
|
|
5558
5530
|
}
|
|
5559
5531
|
if (!Object.keys(errors).length) {
|
|
@@ -5610,11 +5582,12 @@ defineComponent({
|
|
|
5610
5582
|
}, {
|
|
5611
5583
|
deep: true
|
|
5612
5584
|
});
|
|
5613
|
-
provide(FORM_TOKEN, reactive(
|
|
5585
|
+
provide(FORM_TOKEN, reactive({
|
|
5586
|
+
...toRefs(props),
|
|
5614
5587
|
emit: ctx.emit,
|
|
5615
5588
|
addItemContext,
|
|
5616
5589
|
removeItemContext
|
|
5617
|
-
}))
|
|
5590
|
+
}));
|
|
5618
5591
|
ctx.expose({
|
|
5619
5592
|
validate,
|
|
5620
5593
|
validateFields,
|
|
@@ -6491,7 +6464,7 @@ var FormControl = defineComponent({
|
|
|
6491
6464
|
}
|
|
6492
6465
|
});
|
|
6493
6466
|
function _extends() {
|
|
6494
|
-
_extends = Object.assign
|
|
6467
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
6495
6468
|
for (var i = 1; i < arguments.length; i++) {
|
|
6496
6469
|
var source = arguments[i];
|
|
6497
6470
|
for (var key in source) {
|
|
@@ -6510,13 +6483,13 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
6510
6483
|
_setPrototypeOf(subClass, superClass);
|
|
6511
6484
|
}
|
|
6512
6485
|
function _getPrototypeOf(o) {
|
|
6513
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
|
|
6486
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
|
|
6514
6487
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
6515
6488
|
};
|
|
6516
6489
|
return _getPrototypeOf(o);
|
|
6517
6490
|
}
|
|
6518
6491
|
function _setPrototypeOf(o, p) {
|
|
6519
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
6492
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
6520
6493
|
o2.__proto__ = p2;
|
|
6521
6494
|
return o2;
|
|
6522
6495
|
};
|
|
@@ -6539,7 +6512,7 @@ function _isNativeReflectConstruct() {
|
|
|
6539
6512
|
}
|
|
6540
6513
|
function _construct(Parent, args, Class) {
|
|
6541
6514
|
if (_isNativeReflectConstruct()) {
|
|
6542
|
-
_construct = Reflect.construct;
|
|
6515
|
+
_construct = Reflect.construct.bind();
|
|
6543
6516
|
} else {
|
|
6544
6517
|
_construct = function _construct2(Parent2, args2, Class2) {
|
|
6545
6518
|
var a = [null];
|
|
@@ -6817,9 +6790,45 @@ var whitespace = function whitespace2(rule, value, source, errors, options) {
|
|
|
6817
6790
|
errors.push(format(options.messages.whitespace, rule.fullField));
|
|
6818
6791
|
}
|
|
6819
6792
|
};
|
|
6793
|
+
var urlReg;
|
|
6794
|
+
var getUrlRegex = function() {
|
|
6795
|
+
if (urlReg) {
|
|
6796
|
+
return urlReg;
|
|
6797
|
+
}
|
|
6798
|
+
var word = "[a-fA-F\\d:]";
|
|
6799
|
+
var b = function b2(options) {
|
|
6800
|
+
return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
|
|
6801
|
+
};
|
|
6802
|
+
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}";
|
|
6803
|
+
var v6seg = "[a-fA-F\\d]{1,4}";
|
|
6804
|
+
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();
|
|
6805
|
+
var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
|
|
6806
|
+
var v4exact = new RegExp("^" + v4 + "$");
|
|
6807
|
+
var v6exact = new RegExp("^" + v6 + "$");
|
|
6808
|
+
var ip = function ip2(options) {
|
|
6809
|
+
return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
|
|
6810
|
+
};
|
|
6811
|
+
ip.v4 = function(options) {
|
|
6812
|
+
return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
|
|
6813
|
+
};
|
|
6814
|
+
ip.v6 = function(options) {
|
|
6815
|
+
return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
|
|
6816
|
+
};
|
|
6817
|
+
var protocol = "(?:(?:[a-z]+:)?//)";
|
|
6818
|
+
var auth = "(?:\\S+(?::\\S*)?@)?";
|
|
6819
|
+
var ipv4 = ip.v4().source;
|
|
6820
|
+
var ipv6 = ip.v6().source;
|
|
6821
|
+
var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
|
|
6822
|
+
var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
|
|
6823
|
+
var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
|
|
6824
|
+
var port = "(?::\\d{2,5})?";
|
|
6825
|
+
var path = '(?:[/?#][^\\s"]*)?';
|
|
6826
|
+
var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
|
|
6827
|
+
urlReg = new RegExp("(?:^" + regex + "$)", "i");
|
|
6828
|
+
return urlReg;
|
|
6829
|
+
};
|
|
6820
6830
|
var pattern$2 = {
|
|
6821
6831
|
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,}))$/,
|
|
6822
|
-
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"),
|
|
6823
6832
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
6824
6833
|
};
|
|
6825
6834
|
var types = {
|
|
@@ -6861,7 +6870,7 @@ var types = {
|
|
|
6861
6870
|
return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
|
|
6862
6871
|
},
|
|
6863
6872
|
url: function url(value) {
|
|
6864
|
-
return typeof value === "string" && value.length <= 2048 && !!value.match(
|
|
6873
|
+
return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
|
|
6865
6874
|
},
|
|
6866
6875
|
hex: function hex(value) {
|
|
6867
6876
|
return typeof value === "string" && !!value.match(pattern$2.hex);
|
|
@@ -7436,7 +7445,17 @@ var Schema = /* @__PURE__ */ function() {
|
|
|
7436
7445
|
if (rule.asyncValidator) {
|
|
7437
7446
|
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
|
|
7438
7447
|
} else if (rule.validator) {
|
|
7439
|
-
|
|
7448
|
+
try {
|
|
7449
|
+
res = rule.validator(rule, data.value, cb, data.source, options);
|
|
7450
|
+
} catch (error) {
|
|
7451
|
+
console.error == null ? void 0 : console.error(error);
|
|
7452
|
+
if (!options.suppressValidatorError) {
|
|
7453
|
+
setTimeout(function() {
|
|
7454
|
+
throw error;
|
|
7455
|
+
}, 0);
|
|
7456
|
+
}
|
|
7457
|
+
cb(error.message);
|
|
7458
|
+
}
|
|
7440
7459
|
if (res === true) {
|
|
7441
7460
|
cb();
|
|
7442
7461
|
} else if (res === false) {
|
|
@@ -7557,10 +7576,7 @@ function useFormItemValidate(props, _rules) {
|
|
|
7557
7576
|
} else {
|
|
7558
7577
|
return rule.trigger === triggerVal;
|
|
7559
7578
|
}
|
|
7560
|
-
}).map((
|
|
7561
|
-
var rule = __objRest(_a, []);
|
|
7562
|
-
return rule;
|
|
7563
|
-
});
|
|
7579
|
+
}).map(({ ...rule }) => rule);
|
|
7564
7580
|
};
|
|
7565
7581
|
const onValidateSuccess = () => {
|
|
7566
7582
|
validateState.value = "success";
|
|
@@ -7633,15 +7649,12 @@ defineComponent({
|
|
|
7633
7649
|
props: formItemProps,
|
|
7634
7650
|
setup(props, ctx) {
|
|
7635
7651
|
const formContext = inject(FORM_TOKEN);
|
|
7636
|
-
const
|
|
7652
|
+
const {
|
|
7637
7653
|
messageType: itemMessageType,
|
|
7638
7654
|
popPosition: itemPopPosition,
|
|
7639
|
-
showFeedback: itemShowFeedback
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
"popPosition",
|
|
7643
|
-
"showFeedback"
|
|
7644
|
-
]);
|
|
7655
|
+
showFeedback: itemShowFeedback,
|
|
7656
|
+
...otherProps
|
|
7657
|
+
} = toRefs(props);
|
|
7645
7658
|
const {
|
|
7646
7659
|
label,
|
|
7647
7660
|
helpTips,
|
|
@@ -7671,7 +7684,8 @@ defineComponent({
|
|
|
7671
7684
|
labelAlign: formContext.labelAlign
|
|
7672
7685
|
}));
|
|
7673
7686
|
provide(LABEL_DATA, labelData);
|
|
7674
|
-
const context = reactive(
|
|
7687
|
+
const context = reactive({
|
|
7688
|
+
...otherProps,
|
|
7675
7689
|
showFeedback,
|
|
7676
7690
|
messageType,
|
|
7677
7691
|
popPosition,
|
|
@@ -7681,7 +7695,7 @@ defineComponent({
|
|
|
7681
7695
|
validate,
|
|
7682
7696
|
resetField,
|
|
7683
7697
|
clearValidate
|
|
7684
|
-
})
|
|
7698
|
+
});
|
|
7685
7699
|
provide(FORM_ITEM_TOKEN, context);
|
|
7686
7700
|
ctx.expose({
|
|
7687
7701
|
resetField,
|
|
@@ -7706,8 +7720,8 @@ defineComponent({
|
|
|
7706
7720
|
"extra-info": extraInfo.value
|
|
7707
7721
|
}, {
|
|
7708
7722
|
default: () => {
|
|
7709
|
-
var
|
|
7710
|
-
return [(_b = (
|
|
7723
|
+
var _a, _b;
|
|
7724
|
+
return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
|
|
7711
7725
|
}
|
|
7712
7726
|
})]);
|
|
7713
7727
|
}
|
|
@@ -7780,10 +7794,11 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
|
|
|
7780
7794
|
return props.options.map((item) => {
|
|
7781
7795
|
let option;
|
|
7782
7796
|
if (typeof item === "object") {
|
|
7783
|
-
option =
|
|
7797
|
+
option = {
|
|
7784
7798
|
name: item.name ? item.name : item.value + "",
|
|
7785
|
-
_checked: false
|
|
7786
|
-
|
|
7799
|
+
_checked: false,
|
|
7800
|
+
...item
|
|
7801
|
+
};
|
|
7787
7802
|
} else {
|
|
7788
7803
|
option = {
|
|
7789
7804
|
name: item + "",
|
|
@@ -7832,18 +7847,14 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
|
|
|
7832
7847
|
}
|
|
7833
7848
|
});
|
|
7834
7849
|
};
|
|
7835
|
-
const selectedOptions = ref([]);
|
|
7836
7850
|
const filterQuery = ref("");
|
|
7837
|
-
const
|
|
7838
|
-
var _a;
|
|
7851
|
+
const selectedOptions = computed(() => {
|
|
7839
7852
|
if (props.multiple && Array.isArray(props.modelValue)) {
|
|
7840
|
-
|
|
7841
|
-
return selectedOptions.value.map((item) => (item == null ? void 0 : item.name) || (item == null ? void 0 : item.value) || "").join(",");
|
|
7853
|
+
return getInjectOptions(props.modelValue).filter((item) => item ? true : false);
|
|
7842
7854
|
} else if (!Array.isArray(props.modelValue)) {
|
|
7843
|
-
|
|
7844
|
-
return ((_a = selectedOptions.value[0]) == null ? void 0 : _a.name) || "";
|
|
7855
|
+
return getInjectOptions([props.modelValue]).filter((item) => item ? true : false);
|
|
7845
7856
|
}
|
|
7846
|
-
return
|
|
7857
|
+
return [];
|
|
7847
7858
|
});
|
|
7848
7859
|
const onClick = function(e) {
|
|
7849
7860
|
e.preventDefault();
|
|
@@ -7924,9 +7935,11 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
|
|
|
7924
7935
|
};
|
|
7925
7936
|
const tagDelete = (data) => {
|
|
7926
7937
|
let { modelValue } = props;
|
|
7927
|
-
data._checked = !data._checked;
|
|
7928
7938
|
const checkedItems = [];
|
|
7929
7939
|
for (const child of injectOptions.value.values()) {
|
|
7940
|
+
if (data.value === child.value) {
|
|
7941
|
+
child._checked = false;
|
|
7942
|
+
}
|
|
7930
7943
|
if (child._checked) {
|
|
7931
7944
|
checkedItems.push(child.value);
|
|
7932
7945
|
}
|
|
@@ -8009,7 +8022,6 @@ function useSelect(props, ctx, focus, blur, isSelectFocus, t) {
|
|
|
8009
8022
|
isOpen,
|
|
8010
8023
|
selectCls,
|
|
8011
8024
|
mergeOptions,
|
|
8012
|
-
inputValue,
|
|
8013
8025
|
selectedOptions,
|
|
8014
8026
|
filterQuery,
|
|
8015
8027
|
emptyText,
|
|
@@ -8138,12 +8150,6 @@ const optionProps = {
|
|
|
8138
8150
|
default: false
|
|
8139
8151
|
}
|
|
8140
8152
|
};
|
|
8141
|
-
const selectContentProps = {
|
|
8142
|
-
value: {
|
|
8143
|
-
type: String,
|
|
8144
|
-
default: ""
|
|
8145
|
-
}
|
|
8146
|
-
};
|
|
8147
8153
|
const optionGroupProps = {
|
|
8148
8154
|
label: {
|
|
8149
8155
|
type: String
|
|
@@ -8192,7 +8198,8 @@ const commonProps = {
|
|
|
8192
8198
|
default: "md"
|
|
8193
8199
|
}
|
|
8194
8200
|
};
|
|
8195
|
-
const checkboxProps =
|
|
8201
|
+
const checkboxProps = {
|
|
8202
|
+
...commonProps,
|
|
8196
8203
|
checked: {
|
|
8197
8204
|
type: Boolean,
|
|
8198
8205
|
default: false
|
|
@@ -8222,8 +8229,9 @@ const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
|
8222
8229
|
type: Boolean,
|
|
8223
8230
|
default: false
|
|
8224
8231
|
}
|
|
8225
|
-
}
|
|
8226
|
-
const checkboxGroupProps =
|
|
8232
|
+
};
|
|
8233
|
+
const checkboxGroupProps = {
|
|
8234
|
+
...commonProps,
|
|
8227
8235
|
modelValue: {
|
|
8228
8236
|
type: Array,
|
|
8229
8237
|
required: true
|
|
@@ -8260,7 +8268,7 @@ const checkboxGroupProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
|
8260
8268
|
type: String,
|
|
8261
8269
|
default: ""
|
|
8262
8270
|
}
|
|
8263
|
-
}
|
|
8271
|
+
};
|
|
8264
8272
|
const checkboxGroupInjectionKey = Symbol("d-checkbox-group");
|
|
8265
8273
|
function useCheckbox(props, ctx) {
|
|
8266
8274
|
const formContext = inject(FORM_TOKEN, void 0);
|
|
@@ -8536,9 +8544,10 @@ defineComponent({
|
|
|
8536
8544
|
value: opt
|
|
8537
8545
|
});
|
|
8538
8546
|
} else if (typeof opt === "object") {
|
|
8539
|
-
mergedOpt = Object.assign({}, defaultOpt,
|
|
8547
|
+
mergedOpt = Object.assign({}, defaultOpt, {
|
|
8548
|
+
...opt,
|
|
8540
8549
|
label: opt.name
|
|
8541
|
-
})
|
|
8550
|
+
});
|
|
8542
8551
|
}
|
|
8543
8552
|
return createVNode(Checkbox, mergedOpt, null);
|
|
8544
8553
|
});
|
|
@@ -8845,6 +8854,155 @@ var Tag = defineComponent({
|
|
|
8845
8854
|
};
|
|
8846
8855
|
}
|
|
8847
8856
|
});
|
|
8857
|
+
function deepAssign(...objects) {
|
|
8858
|
+
const isObject2 = (obj) => obj && typeof obj === "object";
|
|
8859
|
+
return objects.reduce((prev, from) => {
|
|
8860
|
+
Object.keys(from).forEach((key) => {
|
|
8861
|
+
const pVal = prev[key];
|
|
8862
|
+
const oVal = from[key];
|
|
8863
|
+
if (Array.isArray(pVal) && Array.isArray(oVal)) {
|
|
8864
|
+
prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
|
|
8865
|
+
} else if (isObject2(pVal) && isObject2(oVal)) {
|
|
8866
|
+
prev[key] = deepAssign(pVal, oVal);
|
|
8867
|
+
} else {
|
|
8868
|
+
prev[key] = oVal;
|
|
8869
|
+
}
|
|
8870
|
+
});
|
|
8871
|
+
return prev;
|
|
8872
|
+
}, {});
|
|
8873
|
+
}
|
|
8874
|
+
var zhCN = {
|
|
8875
|
+
pagination: {
|
|
8876
|
+
totalItemText: "\u6240\u6709\u6761\u76EE",
|
|
8877
|
+
goToText: "\u8DF3\u81F3"
|
|
8878
|
+
},
|
|
8879
|
+
accordion: {
|
|
8880
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
8881
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
8882
|
+
},
|
|
8883
|
+
autoCompleteDropdown: {
|
|
8884
|
+
latestInput: "\u6700\u8FD1\u8F93\u5165"
|
|
8885
|
+
},
|
|
8886
|
+
cascaderList: {
|
|
8887
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
8888
|
+
},
|
|
8889
|
+
colorPicker: {
|
|
8890
|
+
foundationPanel: "\u57FA\u7840\u9762\u677F",
|
|
8891
|
+
advancedPanel: "\u9AD8\u7EA7\u9762\u677F"
|
|
8892
|
+
},
|
|
8893
|
+
datePickerPro: {
|
|
8894
|
+
ok: "\u786E\u5B9A",
|
|
8895
|
+
placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
|
|
8896
|
+
month1: "1\u6708",
|
|
8897
|
+
month2: "2\u6708",
|
|
8898
|
+
month3: "3\u6708",
|
|
8899
|
+
month4: "4\u6708",
|
|
8900
|
+
month5: "5\u6708",
|
|
8901
|
+
month6: "6\u6708",
|
|
8902
|
+
month7: "7\u6708",
|
|
8903
|
+
month8: "8\u6708",
|
|
8904
|
+
month9: "9\u6708",
|
|
8905
|
+
month10: "10\u6708",
|
|
8906
|
+
month11: "11\u6708",
|
|
8907
|
+
month12: "12\u6708",
|
|
8908
|
+
year: "\u5E74",
|
|
8909
|
+
startPlaceholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
|
|
8910
|
+
endPlaceholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
|
|
8911
|
+
getWeekDays() {
|
|
8912
|
+
return ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
|
|
8913
|
+
},
|
|
8914
|
+
getTimeArr() {
|
|
8915
|
+
return ["\u65F6", "\u5206", "\u79D2"];
|
|
8916
|
+
},
|
|
8917
|
+
getYearMonthStr(year, month) {
|
|
8918
|
+
return `${year}\u5E74${month}\u6708`;
|
|
8919
|
+
}
|
|
8920
|
+
},
|
|
8921
|
+
editableSelect: {
|
|
8922
|
+
noRelatedRecords: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
|
|
8923
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
8924
|
+
},
|
|
8925
|
+
input: {
|
|
8926
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
8927
|
+
},
|
|
8928
|
+
splitterBar: {
|
|
8929
|
+
collapse: "\u6536\u8D77",
|
|
8930
|
+
expand: "\u5C55\u5F00"
|
|
8931
|
+
},
|
|
8932
|
+
stepsGuide: {
|
|
8933
|
+
previous: "\u4E0A\u4E00\u6B65",
|
|
8934
|
+
continue: "\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",
|
|
8935
|
+
ok: "\u6211\u77E5\u9053\u5566"
|
|
8936
|
+
},
|
|
8937
|
+
table: {
|
|
8938
|
+
selectAll: "\u5168\u9009",
|
|
8939
|
+
ok: "\u786E\u5B9A"
|
|
8940
|
+
},
|
|
8941
|
+
timePopup: {
|
|
8942
|
+
ok: "\u786E\u5B9A"
|
|
8943
|
+
},
|
|
8944
|
+
transfer: {
|
|
8945
|
+
unit: "\u9879",
|
|
8946
|
+
panelUnit: "\u9879",
|
|
8947
|
+
headerUnit: "\u9879",
|
|
8948
|
+
noData: "\u6682\u65E0\u6570\u636E",
|
|
8949
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"
|
|
8950
|
+
},
|
|
8951
|
+
tree: {
|
|
8952
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
8953
|
+
newNode: "\u65B0\u8282\u70B9",
|
|
8954
|
+
selectPlaceholder: "\u8BF7\u9009\u62E9"
|
|
8955
|
+
},
|
|
8956
|
+
upload: {
|
|
8957
|
+
placeholder: "\u9009\u62E9\u6587\u4EF6",
|
|
8958
|
+
getExistSameNameFilesMsg(sameNames) {
|
|
8959
|
+
return `\u60A8\u4E0A\u4F20\u7684 "${sameNames}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
|
|
8960
|
+
},
|
|
8961
|
+
getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
|
|
8962
|
+
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`;
|
|
8963
|
+
},
|
|
8964
|
+
getBeyondMaximalFileSizeMsg(filename, maximalSize) {
|
|
8965
|
+
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`;
|
|
8966
|
+
},
|
|
8967
|
+
getNotAllowedFileTypeMsg(filename, scope) {
|
|
8968
|
+
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`;
|
|
8969
|
+
}
|
|
8970
|
+
},
|
|
8971
|
+
search: {
|
|
8972
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57"
|
|
8973
|
+
},
|
|
8974
|
+
select: {
|
|
8975
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
8976
|
+
noDataText: "\u65E0\u6570\u636E",
|
|
8977
|
+
noMatchText: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
|
|
8978
|
+
loadingText: "\u52A0\u8F7D\u4E2D..."
|
|
8979
|
+
},
|
|
8980
|
+
tagInput: {
|
|
8981
|
+
maxTagsText: "\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"
|
|
8982
|
+
},
|
|
8983
|
+
timeSelect: {
|
|
8984
|
+
placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
|
|
8985
|
+
}
|
|
8986
|
+
};
|
|
8987
|
+
const lang = ref("zh-CN");
|
|
8988
|
+
let langMessages = reactive({
|
|
8989
|
+
[lang.value]: zhCN
|
|
8990
|
+
});
|
|
8991
|
+
const Locale = {
|
|
8992
|
+
messages() {
|
|
8993
|
+
return langMessages[lang.value];
|
|
8994
|
+
},
|
|
8995
|
+
lang() {
|
|
8996
|
+
return lang.value;
|
|
8997
|
+
},
|
|
8998
|
+
use(newLang, newMessages2) {
|
|
8999
|
+
lang.value = newLang;
|
|
9000
|
+
this.add({ [newLang]: newMessages2 });
|
|
9001
|
+
},
|
|
9002
|
+
add(newMessages2 = {}) {
|
|
9003
|
+
langMessages = deepAssign(langMessages, newMessages2);
|
|
9004
|
+
}
|
|
9005
|
+
};
|
|
8848
9006
|
const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
|
|
8849
9007
|
function get(object4, path) {
|
|
8850
9008
|
const keys = path.split(".");
|
|
@@ -8858,12 +9016,13 @@ function get(object4, path) {
|
|
|
8858
9016
|
function createI18nTranslate(name, app, newPrefix) {
|
|
8859
9017
|
const prefix = newPrefix || camelize(name) + ".";
|
|
8860
9018
|
return (path) => {
|
|
8861
|
-
|
|
9019
|
+
var _a;
|
|
9020
|
+
const messages2 = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
|
|
8862
9021
|
const message = get(messages2, prefix + path) || get(messages2, path);
|
|
8863
9022
|
return message;
|
|
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 @@ var OptionGroup = 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", {
|