vue-devui 1.0.0-beta.220801 → 1.0.0-beta.220808
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/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +90 -81
- package/auto-complete/index.umd.js +24 -13
- 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/button/style.css +1 -1
- 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 +131 -114
- package/date-picker-pro/index.umd.js +23 -12
- 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 +15 -38
- 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/input/index.es.js +86 -72
- package/input/index.umd.js +24 -13
- package/input-number/index.es.js +1 -16
- package/input-number/index.umd.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/loading/style.css +1 -1
- package/mention/index.es.js +82 -66
- package/mention/index.umd.js +25 -14
- package/menu/index.es.js +144 -123
- package/menu/index.umd.js +1 -1
- package/menu/style.css +1 -1
- package/message/index.es.js +29 -34
- package/message/index.umd.js +1 -1
- package/modal/index.es.js +12 -44
- package/modal/index.umd.js +1 -1
- package/notification/index.es.js +4 -21
- package/notification/index.umd.js +1 -1
- package/overlay/index.es.js +1 -1
- package/overlay/index.umd.js +1 -1
- package/package.json +1 -1
- 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 +27 -16
- 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 +86 -72
- package/search/index.umd.js +26 -15
- package/select/index.es.js +104 -83
- package/select/index.umd.js +26 -15
- package/select/style.css +1 -1
- package/skeleton/index.umd.js +1 -1
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +22 -29
- package/splitter/index.umd.js +9 -9
- 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/switch/style.css +1 -1
- package/table/index.es.js +106 -91
- package/table/index.umd.js +21 -10
- 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 +97 -88
- package/time-picker/index.umd.js +25 -14
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +104 -83
- package/time-select/index.umd.js +25 -14
- 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 +132 -104
- package/tree/index.umd.js +26 -15
- package/tree/style.css +1 -1
- package/upload/index.es.js +5 -47
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +413 -354
- package/vue-devui.umd.js +32 -21
package/switch/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, withModifiers, createTextVNode, onBeforeUnmount, renderSlot, useSlots } 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, withModifiers, createTextVNode, onBeforeUnmount, renderSlot, useSlots } from "vue";
|
|
33
2
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
34
3
|
const switchProps = {
|
|
35
4
|
modelValue: {
|
|
@@ -854,7 +823,7 @@ var lodash = { exports: {} };
|
|
|
854
823
|
var objectCtorString = funcToString.call(Object2);
|
|
855
824
|
var oldDash = root._;
|
|
856
825
|
var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
857
|
-
var
|
|
826
|
+
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;
|
|
858
827
|
var defineProperty = function() {
|
|
859
828
|
try {
|
|
860
829
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -864,11 +833,11 @@ var lodash = { exports: {} };
|
|
|
864
833
|
}
|
|
865
834
|
}();
|
|
866
835
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
867
|
-
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer =
|
|
868
|
-
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"),
|
|
869
|
-
var metaMap =
|
|
836
|
+
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;
|
|
837
|
+
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
838
|
+
var metaMap = WeakMap && new WeakMap();
|
|
870
839
|
var realNames = {};
|
|
871
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(
|
|
840
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
|
|
872
841
|
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
873
842
|
function lodash2(value) {
|
|
874
843
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
@@ -1323,7 +1292,7 @@ var lodash = { exports: {} };
|
|
|
1323
1292
|
if (typeof func != "function") {
|
|
1324
1293
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
1325
1294
|
}
|
|
1326
|
-
return
|
|
1295
|
+
return setTimeout2(function() {
|
|
1327
1296
|
func.apply(undefined$1, args);
|
|
1328
1297
|
}, wait);
|
|
1329
1298
|
}
|
|
@@ -2116,7 +2085,7 @@ var lodash = { exports: {} };
|
|
|
2116
2085
|
}
|
|
2117
2086
|
function cloneArrayBuffer(arrayBuffer) {
|
|
2118
2087
|
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
2119
|
-
new
|
|
2088
|
+
new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
|
|
2120
2089
|
return result2;
|
|
2121
2090
|
}
|
|
2122
2091
|
function cloneDataView(dataView, isDeep) {
|
|
@@ -2698,7 +2667,7 @@ var lodash = { exports: {} };
|
|
|
2698
2667
|
object4 = object4.buffer;
|
|
2699
2668
|
other = other.buffer;
|
|
2700
2669
|
case arrayBufferTag:
|
|
2701
|
-
if (object4.byteLength != other.byteLength || !equalFunc(new
|
|
2670
|
+
if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array(object4), new Uint8Array(other))) {
|
|
2702
2671
|
return false;
|
|
2703
2672
|
}
|
|
2704
2673
|
return true;
|
|
@@ -2860,7 +2829,7 @@ var lodash = { exports: {} };
|
|
|
2860
2829
|
return result2;
|
|
2861
2830
|
};
|
|
2862
2831
|
var getTag = baseGetTag;
|
|
2863
|
-
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag ||
|
|
2832
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
2864
2833
|
getTag = function(value) {
|
|
2865
2834
|
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
|
|
2866
2835
|
if (ctorString) {
|
|
@@ -3132,7 +3101,7 @@ var lodash = { exports: {} };
|
|
|
3132
3101
|
return object4[key];
|
|
3133
3102
|
}
|
|
3134
3103
|
var setData = shortOut(baseSetData);
|
|
3135
|
-
var
|
|
3104
|
+
var setTimeout2 = ctxSetTimeout || function(func, wait) {
|
|
3136
3105
|
return root.setTimeout(func, wait);
|
|
3137
3106
|
};
|
|
3138
3107
|
var setToString = shortOut(baseSetToString);
|
|
@@ -3924,7 +3893,7 @@ var lodash = { exports: {} };
|
|
|
3924
3893
|
}
|
|
3925
3894
|
function leadingEdge(time) {
|
|
3926
3895
|
lastInvokeTime = time;
|
|
3927
|
-
timerId =
|
|
3896
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3928
3897
|
return leading ? invokeFunc(time) : result2;
|
|
3929
3898
|
}
|
|
3930
3899
|
function remainingWait(time) {
|
|
@@ -3940,7 +3909,7 @@ var lodash = { exports: {} };
|
|
|
3940
3909
|
if (shouldInvoke(time)) {
|
|
3941
3910
|
return trailingEdge(time);
|
|
3942
3911
|
}
|
|
3943
|
-
timerId =
|
|
3912
|
+
timerId = setTimeout2(timerExpired, remainingWait(time));
|
|
3944
3913
|
}
|
|
3945
3914
|
function trailingEdge(time) {
|
|
3946
3915
|
timerId = undefined$1;
|
|
@@ -3971,12 +3940,12 @@ var lodash = { exports: {} };
|
|
|
3971
3940
|
}
|
|
3972
3941
|
if (maxing) {
|
|
3973
3942
|
clearTimeout(timerId);
|
|
3974
|
-
timerId =
|
|
3943
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3975
3944
|
return invokeFunc(lastCallTime);
|
|
3976
3945
|
}
|
|
3977
3946
|
}
|
|
3978
3947
|
if (timerId === undefined$1) {
|
|
3979
|
-
timerId =
|
|
3948
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3980
3949
|
}
|
|
3981
3950
|
return result2;
|
|
3982
3951
|
}
|
|
@@ -5577,7 +5546,10 @@ function useFormValidation(itemContexts) {
|
|
|
5577
5546
|
try {
|
|
5578
5547
|
await field.validate("");
|
|
5579
5548
|
} catch (err) {
|
|
5580
|
-
errors =
|
|
5549
|
+
errors = {
|
|
5550
|
+
...errors,
|
|
5551
|
+
...err
|
|
5552
|
+
};
|
|
5581
5553
|
}
|
|
5582
5554
|
}
|
|
5583
5555
|
if (!Object.keys(errors).length) {
|
|
@@ -5634,11 +5606,12 @@ defineComponent({
|
|
|
5634
5606
|
}, {
|
|
5635
5607
|
deep: true
|
|
5636
5608
|
});
|
|
5637
|
-
provide(FORM_TOKEN, reactive(
|
|
5609
|
+
provide(FORM_TOKEN, reactive({
|
|
5610
|
+
...toRefs(props),
|
|
5638
5611
|
emit: ctx.emit,
|
|
5639
5612
|
addItemContext,
|
|
5640
5613
|
removeItemContext
|
|
5641
|
-
}))
|
|
5614
|
+
}));
|
|
5642
5615
|
ctx.expose({
|
|
5643
5616
|
validate,
|
|
5644
5617
|
validateFields,
|
|
@@ -6517,7 +6490,7 @@ var FormControl = defineComponent({
|
|
|
6517
6490
|
}
|
|
6518
6491
|
});
|
|
6519
6492
|
function _extends() {
|
|
6520
|
-
_extends = Object.assign
|
|
6493
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
6521
6494
|
for (var i = 1; i < arguments.length; i++) {
|
|
6522
6495
|
var source = arguments[i];
|
|
6523
6496
|
for (var key in source) {
|
|
@@ -6536,13 +6509,13 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
6536
6509
|
_setPrototypeOf(subClass, superClass);
|
|
6537
6510
|
}
|
|
6538
6511
|
function _getPrototypeOf(o) {
|
|
6539
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
|
|
6512
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
|
|
6540
6513
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
6541
6514
|
};
|
|
6542
6515
|
return _getPrototypeOf(o);
|
|
6543
6516
|
}
|
|
6544
6517
|
function _setPrototypeOf(o, p) {
|
|
6545
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
6518
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
6546
6519
|
o2.__proto__ = p2;
|
|
6547
6520
|
return o2;
|
|
6548
6521
|
};
|
|
@@ -6565,7 +6538,7 @@ function _isNativeReflectConstruct() {
|
|
|
6565
6538
|
}
|
|
6566
6539
|
function _construct(Parent, args, Class) {
|
|
6567
6540
|
if (_isNativeReflectConstruct()) {
|
|
6568
|
-
_construct = Reflect.construct;
|
|
6541
|
+
_construct = Reflect.construct.bind();
|
|
6569
6542
|
} else {
|
|
6570
6543
|
_construct = function _construct2(Parent2, args2, Class2) {
|
|
6571
6544
|
var a = [null];
|
|
@@ -6843,9 +6816,45 @@ var whitespace = function whitespace2(rule, value, source, errors, options) {
|
|
|
6843
6816
|
errors.push(format(options.messages.whitespace, rule.fullField));
|
|
6844
6817
|
}
|
|
6845
6818
|
};
|
|
6819
|
+
var urlReg;
|
|
6820
|
+
var getUrlRegex = function() {
|
|
6821
|
+
if (urlReg) {
|
|
6822
|
+
return urlReg;
|
|
6823
|
+
}
|
|
6824
|
+
var word = "[a-fA-F\\d:]";
|
|
6825
|
+
var b = function b2(options) {
|
|
6826
|
+
return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
|
|
6827
|
+
};
|
|
6828
|
+
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}";
|
|
6829
|
+
var v6seg = "[a-fA-F\\d]{1,4}";
|
|
6830
|
+
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();
|
|
6831
|
+
var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
|
|
6832
|
+
var v4exact = new RegExp("^" + v4 + "$");
|
|
6833
|
+
var v6exact = new RegExp("^" + v6 + "$");
|
|
6834
|
+
var ip = function ip2(options) {
|
|
6835
|
+
return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
|
|
6836
|
+
};
|
|
6837
|
+
ip.v4 = function(options) {
|
|
6838
|
+
return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
|
|
6839
|
+
};
|
|
6840
|
+
ip.v6 = function(options) {
|
|
6841
|
+
return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
|
|
6842
|
+
};
|
|
6843
|
+
var protocol = "(?:(?:[a-z]+:)?//)";
|
|
6844
|
+
var auth = "(?:\\S+(?::\\S*)?@)?";
|
|
6845
|
+
var ipv4 = ip.v4().source;
|
|
6846
|
+
var ipv6 = ip.v6().source;
|
|
6847
|
+
var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
|
|
6848
|
+
var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
|
|
6849
|
+
var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
|
|
6850
|
+
var port = "(?::\\d{2,5})?";
|
|
6851
|
+
var path = '(?:[/?#][^\\s"]*)?';
|
|
6852
|
+
var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
|
|
6853
|
+
urlReg = new RegExp("(?:^" + regex + "$)", "i");
|
|
6854
|
+
return urlReg;
|
|
6855
|
+
};
|
|
6846
6856
|
var pattern$2 = {
|
|
6847
6857
|
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,}))$/,
|
|
6848
|
-
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"),
|
|
6849
6858
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
6850
6859
|
};
|
|
6851
6860
|
var types = {
|
|
@@ -6887,7 +6896,7 @@ var types = {
|
|
|
6887
6896
|
return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
|
|
6888
6897
|
},
|
|
6889
6898
|
url: function url(value) {
|
|
6890
|
-
return typeof value === "string" && value.length <= 2048 && !!value.match(
|
|
6899
|
+
return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
|
|
6891
6900
|
},
|
|
6892
6901
|
hex: function hex(value) {
|
|
6893
6902
|
return typeof value === "string" && !!value.match(pattern$2.hex);
|
|
@@ -7462,7 +7471,17 @@ var Schema = /* @__PURE__ */ function() {
|
|
|
7462
7471
|
if (rule.asyncValidator) {
|
|
7463
7472
|
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
|
|
7464
7473
|
} else if (rule.validator) {
|
|
7465
|
-
|
|
7474
|
+
try {
|
|
7475
|
+
res = rule.validator(rule, data.value, cb, data.source, options);
|
|
7476
|
+
} catch (error) {
|
|
7477
|
+
console.error == null ? void 0 : console.error(error);
|
|
7478
|
+
if (!options.suppressValidatorError) {
|
|
7479
|
+
setTimeout(function() {
|
|
7480
|
+
throw error;
|
|
7481
|
+
}, 0);
|
|
7482
|
+
}
|
|
7483
|
+
cb(error.message);
|
|
7484
|
+
}
|
|
7466
7485
|
if (res === true) {
|
|
7467
7486
|
cb();
|
|
7468
7487
|
} else if (res === false) {
|
|
@@ -7583,10 +7602,7 @@ function useFormItemValidate(props, _rules) {
|
|
|
7583
7602
|
} else {
|
|
7584
7603
|
return rule.trigger === triggerVal;
|
|
7585
7604
|
}
|
|
7586
|
-
}).map((
|
|
7587
|
-
var rule = __objRest(_a, []);
|
|
7588
|
-
return rule;
|
|
7589
|
-
});
|
|
7605
|
+
}).map(({ ...rule }) => rule);
|
|
7590
7606
|
};
|
|
7591
7607
|
const onValidateSuccess = () => {
|
|
7592
7608
|
validateState.value = "success";
|
|
@@ -7659,15 +7675,12 @@ defineComponent({
|
|
|
7659
7675
|
props: formItemProps,
|
|
7660
7676
|
setup(props, ctx) {
|
|
7661
7677
|
const formContext = inject(FORM_TOKEN);
|
|
7662
|
-
const
|
|
7678
|
+
const {
|
|
7663
7679
|
messageType: itemMessageType,
|
|
7664
7680
|
popPosition: itemPopPosition,
|
|
7665
|
-
showFeedback: itemShowFeedback
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
"popPosition",
|
|
7669
|
-
"showFeedback"
|
|
7670
|
-
]);
|
|
7681
|
+
showFeedback: itemShowFeedback,
|
|
7682
|
+
...otherProps
|
|
7683
|
+
} = toRefs(props);
|
|
7671
7684
|
const {
|
|
7672
7685
|
label,
|
|
7673
7686
|
helpTips,
|
|
@@ -7697,7 +7710,8 @@ defineComponent({
|
|
|
7697
7710
|
labelAlign: formContext.labelAlign
|
|
7698
7711
|
}));
|
|
7699
7712
|
provide(LABEL_DATA, labelData);
|
|
7700
|
-
const context = reactive(
|
|
7713
|
+
const context = reactive({
|
|
7714
|
+
...otherProps,
|
|
7701
7715
|
showFeedback,
|
|
7702
7716
|
messageType,
|
|
7703
7717
|
popPosition,
|
|
@@ -7707,7 +7721,7 @@ defineComponent({
|
|
|
7707
7721
|
validate,
|
|
7708
7722
|
resetField,
|
|
7709
7723
|
clearValidate
|
|
7710
|
-
})
|
|
7724
|
+
});
|
|
7711
7725
|
provide(FORM_ITEM_TOKEN, context);
|
|
7712
7726
|
ctx.expose({
|
|
7713
7727
|
resetField,
|
|
@@ -7732,8 +7746,8 @@ defineComponent({
|
|
|
7732
7746
|
"extra-info": extraInfo.value
|
|
7733
7747
|
}, {
|
|
7734
7748
|
default: () => {
|
|
7735
|
-
var
|
|
7736
|
-
return [(_b = (
|
|
7749
|
+
var _a, _b;
|
|
7750
|
+
return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
|
|
7737
7751
|
}
|
|
7738
7752
|
})]);
|
|
7739
7753
|
}
|